"Legend" or "key"?

Question: What is the difference between a legend or a key? Is it still called a legend if it is located at the top, rather than the bottom of results?
Answer: "Legend" implies that its entries are generics, as with terrain types on a map, while "key" implies that its entries are specific, as with one symbol designating the Museum of Natural History, another the Metropolitan Museum of Art, etc.  Generally, nobody is going to get real mad no matter which you use.  It doesn't matter where they're located.
Answer: A "Caption" used to be a box you put at the top of a map, hence the "Cap" part. Today, Wikipedia still requires a Map Caption and provides a template with the following explanation: "Template intended to simplify adding a standardized and formatted caption below a map indicating the location of something (e.g. a country), possibly referring to the map's main region and optionally also to a shown subregion." They place this caption below the map.Template:Map caption
The "Legend" is the explanatory information within a Caption that allows you to understand how to use the map, defining the meaning of the symbols, especially the Keys.  It is a syllogistic synopsis, a short story if you will."Building a Legend | GEOG 486: Cartography and Visualization". www.e-education.psu.edu.
The "Keys" are the symbols and numbers within the Caption that the Legend explains, and they tend to be part of the map's Legend.Map Key — Definition, Symbols, and ExamplesHow a Map Key Works
Somehow the two got mixed up over the centuries.
Imagine if you had a Caption with Keys but no Legend to explain what they mean.  These types of maps are actually all too common.  They are fun and challenging but sometimes impossible to understand because you have to be a bit of a cryptologist to decipher what the symbols mean sometimes. We've all seen the dotted line which represents a trail, a straight line a road, a wavy line a river, a circle with a triangle in it a campground, a skull and bones something dangerous etc.
Now imagine if you had a Caption with a Legend but no symbols.  These maps exist too, as the explanation could be about shaded areas on the map with no need for designating symbols.
Somehow the Legend came to be called the "Key", which is bizarre, as if the map had a single symbol.  Just as odd, some Captions are called the "Compass" which is actually the Rose Compass, which is a diagram explaining the cardinal directions relevant to the map.
This is a description of ArcGIS Pro which allows you to create Legends, Captions and Keys in maps with bivariate color symbology: "The tools in ArcGIS Pro give you great flexibility in presenting the information in your map. To more effectively communicate your message, you may want to modify the text for titles or labels, rearrange graphic elements, or add a caption that identifies the data source. Map marginalia, such as legends, scale bars, and north arrows, help explain or support your map's message. Effective legends make the symbology used in the map clear and eliminate confusion".Customize Legends in ArcGIS Pro
Maps and their marginalia are modernly organized into five basic parts: the Title and Headings (the old Caption); the Legend & Keys; the Scale Indicator; the Grid; and the Compass Rose or North Arrow.5 Basic Parts of Any Map
Comment: First off, welcome to English.se. It'd be helpful to see this substantiated. Can you source this answer in some way?
Comment: Sounds familiar, mb what I learnt in Waldorf school as a kid. A legend defines generic/diffuse map features/zones not specific places: striped/colored areas, could be forests, regions of control, and lines/dots/dashes could be roads, rivers, paths taken by famous people; keys are nameable, geographically centered places/features that don't represent well as areas or straight/curved lines: stars for capitals, circles of different sizes for cities of relative size, waterfall symbols, a tree symbol for a Named Tree of interest, a house that's a historic landmark...
Answer: A legend is a caption, a title or brief explanation appended to an article, illustration, cartoon, or poster.
A key is an explanatory list of symbols used in a map, table, etc.
Legend is more generic, while key is more specific. Neither word implicates anything about the location of the text/list.
Answer: A legend explains symbology and iconography on a map. For instance, a cross icon may symbolize the location of a church, or a heavy black line may represent a highway. A key on the other hand, conveys the meaning of thematic information. Thematic information would be something like an area being colored in a certain way to identify a statistical attribute (e.g. a choropleth map that shows California colored blue and Texas colored red to communicate political affiliation).

"Legend" or "key"?


With Jetstar domestic flights in New Zealand, can you use multiple bags in your luggage allowance?

Question: My brother is on a Jetstar flight from Christchurch to Wellington and the allowance is 20kg.  The question is - is the weight limit limited to a single checked bag, or can you use more than one bag, as long as it's under 20kg total weight?
Comment: I'm guessing you've checked the e-ticket receipt? Often it'll give the full details there, but sadly not always...
Comment: @Gagravarr no, the e-ticket was conveniently vague.
Answer: From the Jetstar baggage help page:

Your baggage allowance is given by combined weight, not by number of bags. As long as your bags have a combined weight within your allowance, bring as many as you like. No single bag can weigh more than 32kg

So, as long as your brother stays under 20kg total, he's fine with no matter how many bags. The 32kg per bag limit would only matter if he was in business, and/or bought extra luggage allowance.
Answer: The answer came at the airport - and it's yes, Jetstar limits by weight, not by number of bags.
At check-in, you're simply asked how many bags you're checking solely to print out the baggage tags.  The total is then weighed (if at all) and as long as your total is under 20kg, which his was, then everything works just fine.


Are free shell accounts safe?

Question: I am trying to identify how safe the free shell accounts provided by the likes of shellmix.com are. I have never used one myself but want to suggest it to someone interested in learning shell programming. Are they safe to use for this purpose? What should I watch out for?
Comment: Consider the advantages of a [Live CD](http://en.wikipedia.org/wiki/Live_CD) distribution too. No privacy issues, no security restrictions, no network speed annoyances.
Comment: ive used shellmix. its ok. a livecd is better imho, or even better install virtualbox (if you have a multi-core cpu)
Comment: VirtualBox and a Linux distro of your choice are free. Unlike mucking around with cygwin or mingw, you have a complete native OS to work with and the security worries from rogue admins go away.
Answer: A general rule of thumb I go by is only trust a machine as much as you trust its root user(s), both in terms of technical competence (especially in security), and general trustworthiness.  Since it is unlikely you know the admins of shellmix very well, it's probably a bad idea to trust the machine(s) your account is on any more than you would any random box on the Internet.  If all you do is write shell scripts and compile the occasional hello world, you should be fine.  Assume everything you type into the remote shell can potentially be read by others.  Do not put anything you wouldn't want public there, even temporarily.  This includes hard-coding personal information or information about your own computer like host names, user names, directory layout, etc. in shell scripts.  As mentioned by @SamBisbee in the comments, use a unique password you never reuse for anything else.  Also, there are security risks to forwarding X11 connections (i.e. ssh -X to the shellmix machine) from an untrusted machine so I'd avoid doing that as well.
Comment: I also have never heard of such honeypots but there is always the possibility of a user who manages privilege escalation or even a rogue admin.  Nevertheless, "it's never happened before" is not exactly the most sound security principle to lean on.
Comment: Also, use a throw away password. As root they can see your unshadowed password and rip that sucker. And under NO circumstances should you EVER have private keys (GPG, SSH, etc.) on that box.
Comment: I agree with you general paranoia, but are there any documented cases of folks setting up a full-featured shell environment as a honeypot?  I mean, I've had nyx.net and sdf.lonestar.org accounts over the years, and I've never heard of such weirdness as you propose could happen.
Comment: Note that even semi-modern ssh has both -X and -Y. In those versions, -X is much safer. See the ssh docs.
Answer: Have you considered Cygwin? Most likely you can do whatever you're trying to do within the comfort of your Windows OS (and your own machine).
Answer: Here is a bash-like shell for Windows, which might be an alternative or extension to a shell account. A benefit is, that you can watch in a GUI-filemanager what effect your mkdir, touch, rmdir ... - commands had from a second perspective.
Another benefit is the rich toolset (grep, sed, awk, ...) of the GNU-toolkit, if you work on Windows. After being used to it, you will be happy not to miss them.
Comment: Why only a handful of utils? Install [Cygwin](http://www.cygwin.com/) and be done with it.
Comment: Because it is lean, and convenient, if you rarely use windows. For real work, I use Linux with virtual Desktops and so on - I never liked cygwin.

Are free shell accounts safe?


Can power ups spawns be predicted?

Question: I find that I miss a lot of power-up spawns on blind turns where I am not fast enough to react to jump and get them.  I realize their spawns are random, but are they completely random?  Should I look for them every 100 m, every 250 m, or triggered my score levels or something else?
Comment: I've wondered this also. My guess is that the power-up type is generated randomly but at predefined times or distances. I've never encountered two power-ups within 250 m of each other.
Comment: I just played a quick 3 rounds collecting two power-ups in each round. I hit the first at about 550 m and the second at about 1300 m for all rounds. Note that this was on an account with one Pickup Spawn upgrade (10% increase in frequency).
Answer: By how I've played, you usually get one during 500-650m and the second one is at 1000-1200m. Even further, you get into a mine, soon after you get out, there will soon be another power up. This is about how far I have gotten.I hope to get even further to find more power ups to improve this answer even farther.
Comment: Yes, the first two are consistently at those distances. And there is always a power up just outside of mine exits.
Answer: Power-ups appear fairly consistently - once you've gone 600 meters (without any frequency upgrades) without a powerup, one should appear.  Failing to collect the power-up doesn't seem to affect the distance that the next one appears.
Power-ups can't appear above rope slides or during mine cart sections, but the distance traveled on those counts towards distance without a power-up and if you've reached the required distance in one of those areas the power-up should appear at the exit.
Gems and treasures always replace a power-up.
When using boost as your active power and power-up frequency are both fully leveled by coins:  I find the best strategy is to only manually activate boost within a short window after the power-up spawn.  Otherwise, you are likely to be boosting at the next power-up, making it extremely hard to collect.

Can power ups spawns be predicted?


grep the man page of a command for hyphenated options

Question: Suppose I want to know the usage of -i switch in grep command without scrolling. I need the specification just for that command or at least see the screen show that first. So how? As you can say that in general not just for grep -i.
Comment: learn [searching in Vim](http://vim.wikia.com/wiki/Searching)
Comment: this might be your interest https://askubuntu.com/a/1281460/283843 :  )
Answer: Type the below command on terminal:
man grep

Then type slash character, /, and write your search, like -i, followed by Enter. This will position the cursor at the first occurrence of the search string. Pressing n moves the cursor to the next occurrence. Pressing Shift+n moves the cursor to the previous occurrence.
Comment: @AvinashRaj no, it will allow you to cycle through each occurrence of `-i`. That's exactly what the OP wants.
Comment: It will locate all the `-i`'s the `man grep` page.But OP wants only the description related to `-i` flag in man page.
Answer: Try this simple sed command,
$ man grep | sed -n '/-i, --ignore-case/,+2p'
    -i, --ignore-case
              Ignore  case  distinctions  in  both  the  PATTERN and the input
              files.  (-i is specified by POSIX.)

Explanation:
sed -n '/-i, --ignore-case/,+2p'

        |<-Search pattern->|

It will print the line which contains the search pattern along with 2 lines which present just below to the search pattern line.
OR
You can simply give only the flags  in the search patten like below.
avinash@avinash-Lenovo-IdeaPad-Z500:~$ man grep | sed -n '/ *i, -/,+3p'
       -i, --ignore-case
              Ignore  case  distinctions  in  both  the  PATTERN and the input
              files.  (-i is specified by POSIX.)

avinash@avinash-Lenovo-IdeaPad-Z500:~$ man grep | sed -n '/ *V, -/,+3p'
       -V, --version
              Print  the version number of grep to the standard output stream.
              This version number should be included in all bug  reports  (see
              below).
avinash@avinash-Lenovo-IdeaPad-Z500:~$ man grep | sed -n '/ *F, -/,+3p'
       -F, --fixed-strings
              Interpret PATTERN as a  list  of  fixed  strings,  separated  by
              newlines,  any  of  which is to be matched.  (-F is specified by
              POSIX.)
avinash@avinash-Lenovo-IdeaPad-Z500:~$ man grep | sed -n '/ *G, -/,+3p'
       -G, --basic-regexp
              Interpret PATTERN  as  a  basic  regular  expression  (BRE,  see
              below).  This is the default.

You can add this script to your .bashrc ($HOME/.bashrc) for quick access:
mangrep(){
    USAGE="mangrep <application> <switch>"
    if [[ "$#" -ne "2" ]]
      then
          echo "Usage: $USAGE"
      else
          man "$1" | sed -n "/ *"$2", -/,+3p"
    fi
}

Answer: While the simplest approach is to search with / as suggested by @girardengo, you can also use grep instead of sed which I find simpler:
$ man grep | grep -A 1 '^ *-i'
   -i, --ignore-case
          Ignore  case  distinctions  in  both  the  PATTERN and the input
          files.  (-i is specified by POSIX.)

The -A N means "Print N lines after the matching one. Just a trick to get the next few lines, similar to Avinash's sed approach.
Answer: You can use the search function inside man, just pres "s", type the key you're looking for, (-i in your case) and press intro.
Comment: I type man grep after that I press s after that I see log file: after that I type -i and ENTER but I do not see the description Or there is somthing which I do not know
Answer: The most efficient method I am aware of is to search the man page for -i (This site seems to fail to render my code. What I mean is <space><space><space>-i). That's 3 spaces (you may need more/less spaces) followed by the flag you're looking for. It almost always works in my experience, and you can change to some variant of it in cases where it doesn't work.
It works because the actual documentation of the flags are typically indented. It avoids finding other mentions of the flag in other sections, because there's usually only one space before them.
Answer: Or, you can let this site do the searching for you:
http://explainshell.com/explain?cmd=grep+-i
You have to switch from using the terminal to a browser for a bit, but there's ways around that too.
Answer: Through all answers may be fine, but I think you are focusing in only a piece of documentation, not all. For example, to find the -i switch of the grep documentation:
info grep Invoking Command-line\ Options Matching\ Control

I will find all the information about "grep", how to "invoke" the specific "command-line options" for "matching control". Sadly it doesn't go more deeper than that, but it has -i, -y, --ignore-case in the firsts 25 lines, something reasonable that you don't have to scroll all your way down.
This solution is the more flexible and also allows you to search all the infopages:
info --apropos=--ignore-case
"(coreutils)join invocation" -- --ignore-case <1>
"(coreutils)uniq invocation" -- --ignore-case <2>
"(coreutils)sort invocation" -- --ignore-case
"(gettext)msggrep Invocation" -- --ignore-case, 'msggrep' option
"(grep)Matching Control" -- --ignore-case

(had to use --ignore-case instead of -i since it was too common, but you can just process the output to info in any case)
In this case, you have both the name of the info page and the exact section. Ah, almost forgot, you can also just tab your way through most section of the info pages.
Answer: You can use Perl and its "paragraph mode" to extract only the relevant paragraph:
man grep | perl -00 -ne 'print if / -i/'

Answer: My favorite approach to find a given option in a man page is to use a regex like \s{2,}-option. For the question in hand, you can do man grep and then type the regex:
/\s{3,}-i

or
/ {3,}-i
 ^------------- space here

This will match -i only when followed by three or more spaces.
Answer: If you want to grep the man <program> results for a pattern beginning with a hyphen, use -- before the pattern you specify. -- is a flag that most programs interpret as "nothing after this should be taken as a flag". Example using man find :
man find | grep -- -type

If you want more info, for example the entire section describing an
option, try using sed:
$ man find | sed -n '/-mindepth/,/^$/p'
   -mindepth levels
          Do  not apply any tests or actions at levels less than levels (a
          non-negative integer).  -mindepth  1  means  process  all  files
          except the command line arguments.

Source
Answer: As less is used by default as the pager for man, you can use the LESS environment variable to pass a pattern to search for when less opens the page. This is identical to doing e.g. man ls and then searching for the option --all or -a by typing / and then inputting the pattern e.g. --all or -a.
All these can be done by:
LESS='+/--all' man ls

Or
LESS='+/-a' man ls

Input what you want to search after /.
Presumably this works best for the long options (e.g. --all) compared to the short ones (e.g. -a).
Answer: If you search for multiple options, you may use egrep:
man shutdown | egrep -- "-(r|H|h)"

if you don't want to search them one by one with /-(r|H|h) in the interactive pager less, which is possible, but better shown with a larger man page like that of ls:
man ls | egrep -- "-(a|f|h)"

man ls
# interactive
/-(a|f|h)

Filtering for leading whitespace has been shown already. Grep can be invoked to show N lines after the option with A:
man ls | egrep -- "-(a|f|h)"

man ls | egrep -A1 -- "^ *-(a|f|h)"
       -a, --all
              do not ignore entries starting with .
--
       -f     do not sort, enable -aU, disable -ls --color

--
       -h, --human-readable
              with -l and -s, print sizes like 1K 234M 2G etc.

With sed you may specify "from Option X to the next" but in a hurry, I didn't find out, how to suppress the first line of the next, terminating option. If you need it often, you might write a shell function, to make it easy to use:
man ls | sed -rn "/^ *-(a|f|h)/,/^ *-/p"
   -a, --all
          do not ignore entries starting with .

   -A, --almost-all
   -f     do not sort, enable -aU, disable -ls --color

   -F, --classify
   -h, --human-readable
          with -l and -s, print sizes like 1K 234M 2G etc.

   --si   likewise, but use powers of 1000 not 1024


Can I take a 5-foot Step and perform any standard action after?

Question: If I'm in a threatened square can I take a 5-foot step back (to an non-threatened square) and perform a standard action like a ranged attack or cast a spell?
Answer: Yes
That is precisely how the 5-foot step rules work.
Watch Out Though
Step Up and its sequel feats are designed to counter this tactic; you may end up facing this down.
Comment: In fact, you can take a 5 foot step and perform a full action. Or a standard and a move action other than moving.
Comment: Just an addendum to the other answer - yes, in general this is exactly how the 5 foot step works. As an added thing to watch for, you (generally) can't 5 foot step in difficult terrain, and so casting spells and using missile weapons often becomes harder in these sorts of areas. Being grappled also prevents you from moving at all unless you escape it, so this would also prevent a 5 foot step.
Comment: Reinforcing @mxyzplk, you explicitly cannot do a five-foot-step and then move as a Move action or vice versa. So no "5 foot step back, attack, move back 30 feet" shenanigans.
Answer: Can't remember if Pathfinder works the same, but in 3.5 you can use a standard action to perform a move action. But you can't 5 foot step in a turn in which you make a move.
So yes, you can 5 foot step and shoot/cast but you can't take a 5 foot step and then perform ANY standard action, such as 5 foot step and then 2 x 30 ft movements.
Comment: Scott, please verify this is the case in Pathfinder and base your answer on Pathfinder's rules. 3.5e's rules do not necessarily have any relevance here.
Comment: Welcome to rpg.se! Please take a look at the [about] and the [help]; they're a useful introduction to the site.
 If Pathfinder's rules for this are identical to 3.5's, this is useful--but it's not actually answering the question. Since Stack Exchange is a Q&A site (not a forum), every answer must stand on its own as a complete response to the question. When you have a bit more rep you can make this kind of thing a comment to enhance an existing answer. (And in the future, it's a good idea to make sure your answers are accurate to the system being asked about.)


Seeming Unrelated Regression (SUR) for logistic regression

Question: I would like to perform linear hypothesis testing on whether $\beta_{11}=\beta_{21}$ in the logistic regressions
\begin{align*}
\text{logit}[P(Y_1=1|X)]=(\beta_{10}+\beta_{11}X)\\
\text{logit}[P(Y_2=1|X)]=(\beta_{20}+\beta_{21}X)\\
\end{align*}
The models are not nested within each other since the outcomes $Y_1$ and $Y_2$ are not the same (but the covariate $X$ is the same). I looked into SUR but realized logistic regressions cannot be solved via OLS. Is there a way to obtain variance-covariance matrix for the 4 model parameters above or perform the said hypothesis test? (I understand there are multinomial regression methods but would like to keep the above model structure).
Answer: It seems to me that the literature around this baffling process--Seemingly Unrelated Regression (SUR) models--concerns ordinary least squares and not logistic regression. The only reason SUR is of any interest is that the error terms are estimated jointly from several regression models using the same exposure variable(s).
Logistic regression has no error terms because of the mean variance relationship captured in the GLM. So these models (that you've written) are more than just seemingly unrelated. They're completely unrelated.
Multinomial regression models are not necessarily appropriate for analyzing multiple binary variables. In a multinomial model you only observe 1 event in rows of $Y$ variables. If $Y_1$ and $Y_2$ have the structure of, say, an educational outcome: college grad / HS grad / no HS diploma... then these events are conditionally dependent. However, if you have $Y_1$ is Democratic voting preference and $Y_2$ is marital status (married vs not married). You might have $Y_1 = Y_2 = 0$ or $1$.
So, at face value, I can see no reason why you're interested in joining these models and you should probably describe your data and what you're trying to do.
If you are interested in regression models that can borrow specific information across groups in this case--not just error terms, but odds ratios--you should consider log-linear models as an alternative.
Comment: @user77873 you should definitely be considering log linear models.
Comment: $Y_1$ and $Y_1$ are two causes of death in a population so they are mutually exclusive. There are survivors as reference group for whom $Y_1=Y_2=0$. I am trying to see if the effect of $X$ on mortality due to the two causes are the same, without using multinomial regression methods.
Comment: @user77873 they are causes of death in a population, not in an individual?


Varying the Relative Amounts of Light Passing Through Each Slit in the Double Slit Experiment

Question: What happens if different amounts of light pass through each slit in the double slit experiment? For example, if twice as much light passed through one slit as through the other slit, how would the interference be affected. Could this phenomena be predicted with the Englert-Greenberger-Yasin duality relation?
Comment: How do you know twice as much light passed though?
Comment: Well you could polarize the laser. Then you could attach two polarizer, the first which changes the polarization to 45 degrees with respect to the initial polarization and a second which would bring the polarization back to the initial polarization, to each other and put then over one of the slits. In general, equal amounts of light pass through each slit, so the transmitted light from the slit with the polarizers would have half the intensity of the second slit according to Malus' law.
Answer: In general it is a lot more boring than you'd think.
The two patterns are some complex-valued functions $\psi_{1,2}(z)$ on the screen which you only see in absolute value, $|\psi_{1,2}(z)|^2$ being the actual pattern seen. Typically for example you might have $$\psi_\pm(z) = {(2\pi\sigma^2)}^{1/4}\exp\left[\frac{(z \pm \mu)^2}{4\sigma^2}\right] e^{i k (x \pm \mu)}$$for the two functions; you can confirm that $|\psi_\pm(z)|^2$ are both Gaussian probability distributions with unit integrals, so the light appears in two bell curves centered each at $z = \mp \mu$ with characteristic width $\sigma.$
As for the superposition, let $I_+$ be the intensity transmitted through $\psi_+$ and $I_-$ be the intensity transmitted through $\psi_-,$ then the overlap in the double-slit experiment is simply $$I(z) = {\left|\sqrt{I_+}~\psi_+(z) + \sqrt{I_-}~\psi_-(z)\right|}^2.$$
Comment: Sorry, I am only a sophomore in high school, so a dumbed down version would be appreciated. Essentially, I am wondering if the observed intensity would match that predicted by the Englert-Greenberger-Yasin duality relation.


Definition of Relation of a Set

Question: The standard definition of a relation of an arbitrary set A is a subset of the set product of A, AxA.  Is it okay to define relation R to be a subset of the set product AxA such that R has at least one property P (i.e. inequality, equality, difference, etc.), where any two element of a relation obeys P, and any two element of a set A either obeys P or not?  The standard definition of a relation seems to me little ambiguous.
Comment: But all those properties $P$ are defined via relations. The properties that you seem to be describing are equivalence relations that, besides being relations, also have to be reflexive, symmetric, and transitive.
Comment: Yes, I meant P to be any property that any two element of the set A can either satisfy or not.
Comment: Yeah, but those are just specific kinds of relations; inequality and strict inequality are [order](http://mathworld.wolfram.com/PartialOrder.html) relations, congruence and equality are [equivalence](http://mathworld.wolfram.com/EquivalenceRelation.html) relations. Basically you are asking if you can define a relation, and then induce some structure on that relation that is, itself, given by some specific kind of relation.
Comment: What a great little exchange! Please let me add my misunderstanding. The questioner appeared to not appreciate that he has to define '<' beforehand. Having defined the operators, he can then feel perfectly 'safe' to use them in definitions.
Of course, he can just borrow library functions, trusting the provenance of the library.
Perhaps, the important thing is that ALL functional operators are defined - you have to begin, at the beginning!
Answer: Well I personally disagree with your sense of ambiguity that you feel.  I think this definition perfectly encapsulates the intuitive notion of a relation.  For example, for $a, b \in A$, the statement "$a$ is related to $b$" can be written in shorthand as $(a,b)$.  A "relation" is then a specific way of grouping these related pairs together, so it seems intuitive to me to make $R \subseteq A \times A$ containing these $(a, b)$'s.  Your addition specification of a property doesn't seem necessary to me.
Comment: Yes, but books use symbols like <, >, =, modulo notation, etc. to denote a relation.   I just did not fee safe of using such symbols for notating the relation.  Is it still okay to define relation < as R = {(a,b): <}
Comment: @MathWanderer This is why the statement $(a,b) \in R$ is often written as $a \sim b$, especially when denoting an equivalence relation.
Comment: Of course, I am ware of it.  I was wandering if it would be good to specify given equivalence relation in some arbitrary sets so I can specify the relation under interest.
Comment: Given a set of integers Z, a~b can mean any equivalence relation possible for Z, and I would like to specify by giving property like = or congruence to a specific relation of interest rather than saying a~b.
Comment: @MathWanderer The relation is typically defined in a specific enough way.  I'm unclear on why this seems to be an insufficient definition for you.  "...I would like to specify by giving property like = or congruence..." I'm not sure what you mean by that.  = is a relation, and so is < or congruence, so we are allowed to say a=b as shorthand for $(a, b) \in R$.
Answer: $R$ is a relation over the set $A$, if and only if, $R$ is a subset of the Cartesian square of $A$.   $$R\subseteq A{\times}A$$
That is unambiguous.   All possible subsets of $A^2$ are each a relation over $A$.

Now we can describe some relations by set constructions when given some identified predicate, $P$. $$R=\{(a,b)\in A^2: P(a,b)\}$$
But there's a bit of chicken-and-egg redundancy there, and often there's no readily identifiable predicate other than asserting that the pair is in the given subset, $R$.
Comment: I assume P(a,b) can be things like <, >, etc.?
Comment: @MathWanderer Yes, Including but not limited to those comparison operators.
Answer: A relation is designed to be as generic a thing as possible, hence why it's just a set of pairs of elements. It's possible to create a rule, or identify a property, that defines the relation, but that's just a shorthand so you don't always have to write out all the pairs manually (which is particularly a pain when the relation isn't finite). It's like how a set is just a collection of objects (with a few caveats), so that $\{0, 1, 2, \mbox{cat}, \mbox{dog}, \mbox{eggplant emoji}, \emptyset, \pi, \{3+2i\}, \mbox{a lingering sense of dread}\}$ is as valid a set as $\mathbb{C}$ or $\mathbb{N}$ or $\{x \in \mathbb{R} | \sin{(x)} = 0\}$.
Comment: Yes, I noticed that the notation of relation can be things like <, >, =, congruence notation, etc.  I just did not like to use < as a notation.
Answer: I think what you're trying to do could be illustrated in the following example, here's a way to define a relation:

Let $ \sim $ be a relation over $\mathbb{Z}$ defined by $$ x \sim y \iff (x=y) \lor (x+y=3).$$

In this case, $\sim$ represents $R$ and, by giving the appropriate definition, you can specify which elements are in the relation. In my example $(x,y) \in R$ (or $x \sim y$) if and only if $x$ and $y$ meet the chosen definition.  Of course '$\sim$' could be any symbol you choose.
Answer: Your intuition is correct, but it's not necessary to add another part to it  since
what you're suggesting is already implied by the definition of a Relation of a Set.
A relation describes what elements in a Cartesian product are related to each other. Say we have set $A$ and set $B$,
then $A \times B$ gives us all the possible ordered pairs resulting from the cross product.
Within the set of ordered pairs in $A \times B$, lies a
subset that consists of elements which are $\mathbf{related\ in\
some\ way\ by\ a\ certain\ condition}$ (this is our relation $R$ from $A$ to $B$).
It makes sense that $R$ is a subset of $A \times B$, because all the ordered pairs that
fall within $R$ are the ordered pairs from $A \times B$ that
either meet or don't meet the condition given by $R$.
I believe the definition that you are trying to add is already implied by the definition of a
relation. The only way to $\mathbf{distinguish}$ whether an ordered pair is an element of $R$, is to test
that pair against a condition given by $R$.
Here's a quick example:
Let, $A = \{2 , 6, 5 \}$ and $B = \{3, 7, 8 \}$ and $R$ be a relation from $A$ to $B$, and given any ordered pair $(a , b) \in A \times B$
Our condition is $( a , b ) \in R$  iff $a \lt b$
Ok, so we have a condition that an ordered pair must meet to fall into the relation: $a \lt b$
(This is what you were adding in your definition)
First, here's our $A \times B$:
$ A \times B = \{ (2,3) , (2,7) , (2,8), (6,3), (6,7), (6,8) , (5,3) , (5,7) , (5,8) \}$
Here's a few examples showing which ordered pairs meets the relation $R$ condition:
$2 \lt 3$ , so $(2 , 3) \in R$
$6 \not\lt 3$, so $( 6 , 3 ) \notin R$
... and so on giving us:
$R = \{ (2,3) , (2,7) , (2,8) , (6,7), (6,8), (5,7) , (5,8) \}$
Here's the key: all the elements that fall within our relation $R$ are $\mathbf{contained\ in}$ $A \times B$ and
are the ordered pairs that $\mathbf{meet\ a\ certain\ condition}$.
Answer: A relation on $A$ is as such defined to be a subset of $A\times A$.
Defining a relation on $A$ is to explicitly enumerate which elements of $A\times A$ that is included in the relation or determine the relation implicitly as those elements in $A\times A$ which are related by some predicate $P(x,y)$.
I think you mix up the definitions of the term relation with the definition of a specific relation.

Definition of Relation of a Set


How do you setup an offline Chocolatey instance?

Question: My company has a disconnected network that is used for development. I enjoy using Chocolatey at home, and would like to setup a similar instance at work. From what I have read, I need to setup a Nu-get server, but is there a good way to get all of the packages imported?
Comment: Have a look http://docs.nuget.org/docs/creating-packages/hosting-your-own-nuget-feeds and http://www.adamjamesnaylor.com/2013/04/26/Setting-Up-A-Private-NuGet-Server.aspx
Comment: The main "issue" that you are going to have is that although you can add the Chocolatey packages to your own, internal nuget server, the contents of those packages will still look to the internet to download the msi/exes. If you want to host them locally, you will need to modify the download link in each package. There is a tool that claims to help with this: https://github.com/BahKoo/ChocolateStore but I haven't had a chance to try this out yet.
Answer: This is a normal usage of Chocolatey, completely disconnected. Most companies set up their own servers (as you have noted) and make their own packages or pull in and change packages to look at local resources instead of the internet.
We are going to be getting better at making Chocolatey proper able to handle this. The process of taking an existing package and editing it so that it is completely offline is what we call internalizing - see https://chocolatey.org/docs/how-to-recompile-packages. And Chocolatey for Business offers Package Internalizer - https://chocolatey.org/docs/features-automatically-recompile-packages


Other claimants to throne of David besides Jesus?

Question: Since Jesus was in the royal line, it seems likely he had contemporaries in the royal line also. Is it possible to estimate how many legitimate candidates for King of Israel lived at the time of Jesus, based on genealogies? Do we have any historical record of such people?
Answer: None of the seed of David, through Jeconiah, could ever inherit the throne of David due to the curse upon Jeconiah recorded by the prophet Jeremiah.
Jeremiah states of Jeconiah, king of Judah :

Thus saith the LORD, Write ye this man childless, a man that shall not prosper in his days: for no man of his seed shall prosper, sitting upon the throne of David, and ruling any more in Judah.      [Jeremiah 22:30 KJV]

Of this curse upon not only Jeconiah himself but on the succession of any king to the throne who was of that seed, Matthew Henry's commentary records the following :

Now that which is here to be taken notice of is that Jeconiah is written childless (v. 30), that is, as it follows, No man of his seed shall prosper, sitting upon the throne of David. In him the line of David was extinct as a royal line

Biblehub - Jeremiah
Thus only Jesus, the child of Mary (and the child of Mary's husband Joseph) who, alone, inherited all the rights to the throne from Joseph, but inherited none of the curse, being not of the seed of Jeconiah by natural generation.
Ellicott also comments :

The meaning of the prediction, as explained by the latter clause of the verse, was fulfilled in Jeconiah's being the last kingly representative of the house of David, his uncle Zedekiah, who succeeded him, perishing before him (Jeremiah 52:31). In him the sceptre departed, and not even Zerubbabel sat upon the throne of Judah.

Biblehub - Ellicott
Comment: How could Jesus be the only descendent of David who was not also a descendent of Jeconiah? What about Mary's brothers, cousins, second cousins etc?
Comment: Would this not also be true for any other adopted child and their descendants along the way?
Comment: @matt2048 Mary was a 'close relative' of Elizabeth who was 'of the daughters of Aaron', thus of the tribe of Levi. Mary, herself, had no part in Judah (other than marriage to Joseph) and had no personal part in the royal line through David. The royal line comes from David through Joseph, but cannot come by natural generation because of the curse on Jeconiah.
Comment: Would there have been anyone descended from David and not descended from Jeconiah?
Comment: @matt2048 That would not have been a direct (and therefore a royal) line.I suggest you read up on the subject. It is widely, and extensively, documented.


AnyCPU C# DLL in 64bit process loads 32bit DLL

Question: I have a 64bit C++ process that loads an AnyCPU C# DLL.
Can this AnyCPU C# DLL can load 32bit C++ DLLs, or can it load only 64bit DLLs?
Thanks! :-)
Answer: An AnyCPU DLL runs in the context of the calling process, which is x64 according to your question. If this AnyCPU DLL loads another DLL, this also runs in the context of the x64 calling process that loaded the AnyCPU DLL. This is the problem with running code across different platforms. If you want to run a 32 bit DLL by the x64process that calls the AnyCPU DLL, then you need to have create something called as the SURROGATE process - this is basically a x86(32 bit) process that can run and load the 32 bit DLL you want to access from the calling x64 process. Once you have this x86 process running, this x64 process can communicate with the x86 process (that has loaded x86 DLL) using Inter Process Communication, and the indirect calling of x86 DLL functions from x64 process can be achieved.
Answer: You can only load dlls with the same bit-ness as the process. The Any CPU dll itself can be loaded in both 64 and 32 bit processes, but that doesn't mean in can load native 32bit dlls into a 64 bit process.
The only workaround I know is having a 32 bit helper process that loads your 32 bit dll and then communicate with that process.
Comment: other workaround is to have the AnyCPU assembly load the C++ DLL corresponding to the architecture
Comment: If you have a 64 bit version of the dll that's obviously the nicest solution.
Answer: No, you can't load 32-bit DLLs into a 64-bit process.
AnyCPU means that the C# DLL can be loaded into either 32-bit or 64-bit processes, not that it can load DLLs of either bitness.
Answer: A 32 bit DLL cannot be loaded in a 64 bit process.
I see a problem in your question: it is not possible is your AnyCPU assembly loads a 32bit C++ dll, since it makes the assembly specific to this architecture.
Making it AnyCPU means that it will dynamically load the DLL specific to the architecture on which it's running. This way it runs on Any CPU.
So in short, the assembly is wrongly marked as being AnyCPU.
Comment: 32 bit assembly will run on any CPU also.


Is it more efficient to hold down R2 or repeatedly click when shooting in Battlefront?

Question: If I am in a 1v1 battle with someone in Star Wars Battlefront, I usually hold own the right trigger. If I pressed and released frequently instead of holding my finger down, would that increase the efficiency?
Comment: I've never played it, but it would probably at least increase your accuracy. Weapons tend to get less accurate when not fired in short bursts.
Comment: @Robotnik, not as much, in battlefront.Instead, they overheat, and require you to wait or succeed a quick time event, to continue. Preference usually depends on the player and their ability
Comment: You also have to consider the slight amount of auto-aim this game has and I feel there really is no difference.  Whatever that feels more natural to you I guess.
Comment: Depends which battlefront you mean. In the first two tap-firing produced better accuracy without a firerate penalty, while in the new one I couldn't say as I haven't really played it enough to give a definite answer
Answer: It really depends on your weapon. If you have a rapid fire blaster like a pistol, it would make sense to hold down R2 (but only until your gun is near overheating). For guns like the shock blaster and ranged weapons, intermittent fire is probably best - in the former case, you'll use up your limited ammo too quickly, and for longer range, heavy guns, you want to be able to adjust your line of fire to track distant moving targets more easily.


Will a gas generator survive an EMP?

Question: Not really sure where to ask this question.  I was watching an episode of a TV show involving a gas generator and it got me wondering whether electricity could still be generated by a gas generator after an EMP.  If the engine of the generator is powered solely by gasoline, will it still work after an electromagnetic pulse?
Comment: Starfish Prime (I think it was) took out Hawaii Street lights at about 900 miles away. That was 1.4 MT. Depends on whether you are playing with theatre tactical or big boys toys. With tactical, as a general rule, if the EMP takes out your generator you have a reasonably large chance of being blind and/or burned already, probably already dead from radiation poisoning, but your body doesn't know it yet, and the overpressure wave will be along to finish you off any moment now.
Yes - SFP :
http://en.wikipedia.org/wiki/Starfish_Prime
Comment: Wikipedia says "Starfish Prime caused an electromagnetic pulse (EMP) which was far larger than expected, so much larger that it drove much of the instrumentation off scale, causing great difficulty in getting accurate measurements. The Starfish Prime electromagnetic pulse also made those effects known to the public by causing electrical damage in Hawaii, about 1,445 kilometres (898 mi) away from the detonation point, knocking out about 300 streetlights, setting off numerous burglar alarms and damaging a telephone company microwave link. ..."
Comment: The EMP damage to the microwave link shut down telephone calls from Kauai to the other Hawaiian islands.[5] _______________________________________________________________________________
I recall that we had very pretty sunsets for many days afterwards. That was in New Zealand !
Comment: Is everything that you will power also protected from the EMP?
Comment: A gas engine could lose its solid state ignition.
Answer: Some will, some won't.
Most self respecting engines have electronic motor management these days, to regulate output voltage and frequency. Often you see really decent machines built into a sea container, extremely silent and the only way to tell that a generator is in them is because you're all of a sudden walking through a beam of hot air. These containers work as a Faraday cage, which in turn will probably make them insusceptible again.
The cheap and tiny ones are often consumer stuff, they can't afford electronic management and are unstable in both voltage and frequency aswell as depending on load characteristic.
On the other hand ... it all depends on the energy contained in the EMP ... I guess you can never be really sure. Don't know if EMP is viable to melt generator windings ...
Comment: I would go so far as to say that a sufficiently powerful EMP could cause internal arcing in any generator/transformer windings that could compromise the very thin insulation used there.  How much power it would take to completely fubarize one I do not know.

Will a gas generator survive an EMP?


Android Offload license validation to a trusted server

Question: I've been reading about LVL and have implemented it in my app before with a splash screen checking the license.. but I'm sure you could've guessed it was easily cracked. I'm not trying to secure my app and be 100% fool proof but just want to make it discouraging for crackers to attempt.
Since my app requires an online connection and often fetches data from my server I was wanting to implement license checking on the server side, if license is valid it will return data, if not, nothing will be returned.
I've read this blog post here:
"If your application has an online component, a very powerful technique to prevent piracy is to send a copy of the license server response, contained inside the ResponseData class, along with its signature, to your online server. Your server can then verify that the user is licensed, and if not refuse to serve any online content.
Since the license response is cryptographically signed, your server can check to make sure that the license response hasn't been tampered with by using the public RSA key stored in the Android Market publisher console.
When performing the server-side validation, you will want to check all of the following:
That the response signature is valid.
That the license service returned a LICENSED response.
That the package name and version code match the correct application.
That the license response has not expired (check the VT license response extra).
You should also log the userId field to ensure that a cracked application isn't replaying a license response from another licensed user. (This would be visible by an abnormally high number of license checks coming from a single userId.)"
I just need help to get started on how to perform server-side validation. Yes I can get the response signature, LICENSE or NOT_LICENSED respond, package name, license expiration, but how do I check in on my server?
Any help to get started would be greatly appreciated.  Thanks for your time.
Answer: This may help you get started:  android-market-license verification php project
Answer: This should get you started:
http://php.net/manual/en/function.openssl-verify.php
I cannot verify how well this works though as our PHP guy is still working on it.


What will create a "traffic puck" on the UAT band?

Question: I know that for ADS-B in the US to receive TIS-B information you need to be a participating aircraft (ie ADSB-Out).  My question is more specifically, if you are flying an aircraft with a 1090ES transponder and have a stratux or similar ADSB-In device for your phone or tablet, will the system create the traffic puck around your aircraft and send TIS-B information for you?
Comment: Good question. As I understand it most 1090 MHz transponders transmit in dual-band mode, meaning 1090 and 978 (UAT) MHz. I'm more familiar with general aviation though, not necessarily the high altitude stuff.
Comment: @pugz most, if not all 1090 MHz transponders broadcast ADS-B only on 1090 MHz. I am not aware of any dual band transmitters.
Comment: @DeltaLima fair enough... I just know a lot of the general aviation ones that have 978 do both.
Answer: The answer is "yes" if
a) you configure your 1090 out system to request ADS-B uplink at 978 MHZ (this feature was added to the message structure in DO-260B)
b) your 1090 ADS-B out message is confirming certain minimum "quality" standards related to both the quality of the position information (GPS Integrity or "NIC") and the quality of the avionics (SDA or system design assurance)and the quality of the install or SIL  The specifics of what quality message triggers the system is under review by the FAA, but if you equipment is certified (TSO'd) and the install is in accordance with AC-20/165B you will be fine.
Note, if you have a UAT ADS-B you can specify which uplink frequency you want in the same way.
Further note - almost all ADS-B system are single band transmitters (ADS-B Out) and dual band receivers (ADS-B In).
Nuance - the uplink is broadcast to the quadrant (relative to the ground station) where you are flying.  This can lead to aircraft with no or "below quality" ADS-B out receiving traffic intended for another aircraft.  Depending on geometry this can create a partial traffic picture which can be quite misleading and potentially dangerous
Answer: No, you will most likely not get a TIS-B service dedicated to your aircraft.
The TIS-B transmitting system creates a 'traffic puck' around aircraft that:
a) have a version 2 ADS-B transmitter,
b) transmit the proper quality indicators which indicates that the system is certified and is properly functioning, and
c) indicate in their ADS-B transmissions that the aircraft is equipped with ADS-B IN. (see FAA ADS-B FAQ #34, link provided by @Rigged4Flight )
Typically TIS-B will provide information on the same frequency as the ADS-B transmitter, but the ADS-B protocol allows for indicating a different technology is used for ADS-B IN. I am not sure whether the FAA system uses this information.
Note: currently version 1 ADS-B aircraft with sufficient data quality are also still eligible for TIS-B services, however this will change in the next couple of years.
Comment: Thank you for the information.  I was aware of facts a and b but couldn't find anything on C.  Could you post a reference before I mark your answer as accepted?
Comment: Regarding DeltaLima's answer "C" (and Kevin's clarification question): DeltaLima is correct. The FAA FAQ on ADS-B says "To receive all ADS-B In services from the ADS-B ground infrastructure, aircraft must broadcast valid ADS-B Out messages that indicate their ADS-B-In capability."
https://www.faa.gov/nextgen/programs/adsb/faq/#34
Comment: @Rigged4Flight thank you for the info; I have included it in the answer.
Comment: @KevinJablonski answer is updated to include a reference (provided by R4F)


God loves everyone... Even dictators?

Question: God loves all humans, but does his love have limits? Can God love a person like Adolf Hitler, who killed millions of people who believed in him? What about serial murderers? Could God forgive a person like Hitler, if he was to come to faith?
Comment: @TRiG Very sorry for the offensive second question. Thank you for noticing/editing it.
Comment: It's okay, Claudio. I can see that it is a genuine question, and it might be okay to ask it here, but it really should be phrased very very carefully with a lot of thought beforehand. If you'd asked just that question, it probably wouldn't immediately be deleted. But there's a rule against asking two questions at once anyway, which is a much more straightforward guideline to follow, and made it easy for me to remove that one. You could probably ask it separately, later, but I'd advise you to wait till you're more established on the site, and to discuss it in [chat] before asking.
Comment: Welcome to the site!  This next is just standard to help new visitors avoid misunderstanding the site (as I did at first.)  As a new visitor, I'd recommend checking out the following two posts, which are meant to help newcomers "learn the ropes": [help page](http://christianity.stackexchange.com/help) and [How we are different than other sites?](http://meta.christianity.stackexchange.com/questions/1808/how-we-are-different-than-other-sites)
Answer: ericgorr's answer is really good, but let me write a slightly simpler one.
Yes, absolutely God does love everyone. He totally wants the best for them and wants them to be the perfect person they were intended to be.
Now the trouble is that for Hitler, being the best he was intended to be absolutely involves not killing millions of people and starting a huge war. So God really really wants him to stop doing that - and not just because millions of people are dying, but also because doing this is screwing up Hitler as well and turning him into something he wasn't meant to be. Because of this God hates all the things that Hitler is doing, but still loves Hitler himself. Christians say that God "hates the sin but loves the sinner".
So let's imagine that in 1945 Hitler, instead of killing himself in a bunker, realises that he has been doing entirely the wrong thing this whole time, and is really sorry and genuinely wishes he had never done all those bad things, and asks God for forgiveness. Christians call that repentence. It's as vital to the process of getting right with God as 'coming to faith' is. Because God loves him, and because of Christ's death, God would forgive Hitler. That's pretty fundamental to Christianity.
Forgiveness doesn't mean there are no consequences. Had Hitler repented and lived he would probably still have been tried for war crimes, would certainly have been punished and hated by many people, would probably have been executed. Some Christians believe he might have spent a long time after death in a place called purgatory before going to heaven, possibly to get over the horror of understanding what he had done. Repentance is not an 'easy way out' like a get-out-of-jail-free card. And doing bad things and planning to repent afterwards doesn't work, because that means you thought the things you were doing weren't really bad after all.
There you go. I hope that's a helpful alternative to the more complete answer.
Comment: Thanks. This tells more about this case, unlike ericgorr's answer, that answered a common question.
Comment: I'm using Hitler just as an example, of course, The same applies to anyone who has done anything bad.
Comment: I've lately become a little disenchanted with the aphorism, "God hates the sin but loves the sinner." There is certainly truth in the saying, but there is also a fuller meaning which can be appreciated only by considering the use of the word "hate" in Scripture. See this decent article for further development of the notion of God and hate: http://www.mercifultruth.com/doesgodhate.html    Don
Answer:
God loves all humans, but does his love have limits?

No.

Could God forgive a person like Hitler, if he was to come to faith?

Yes.
From the LCMS FAQ on forgiveness & repentance:

Q:  I don't really understand repentance. Is it being sorry for your
  sins and confessing them to God or does it mean to stop committing a
  certain sin? Like if you are stealing, does repentance mean to stop
  stealing, because that would mean we can stop sinning and we know we
  can never stop sinning. I have sins that I commit over and over again,
  not like I did before I was saved, but I still commit them. So if I
  don't stop committing those sins (repentance), does that mean that I
  am going to hell? And also, when the Bible talks about how worldly
  sorrow brings death but godly sorrow brings repentance and life, how
  do I know which one I have?
A:  Repentance means first of all, to acknowledge our sins, to be
  truly sorry for them. This "godly sorrow" comes from the Holy Spirit
  convicting us with God's law.
But the Bible also uses the work of repentance in a broader sense to
  include faith in Jesus our Savior. This faith is produced by the Holy
  Spirit, who convinces us through the Gospel that our sins are forgiven
  for the sake of Jesus, who lived, died and rose again for us.
Put those two concepts together and you have repentance in its fullest
  sense. (Jesus told His disciples in Luke 24:47 that repentance and
  forgiveness of sins will be preached in His name to all nations.)
According to the Bible, those who are truly sorry for their sins and
  trust in Jesus as their Savior also want to turn away from their sins,
  intending with the help of the Holy Spirit not to keep on living a
  life of sin. If we want to keep on sinning, we need to ask ourselves
  if we have really repented. However, we are weak human beings and
  although we do not want to commit the same sins again and again, we
  may sometimes fall into sin out of weakness.
Whenever we sin, we know (as John says) that "if we confess our sins,
  [God] is faithful and just and will forgive our sins" for the sake of
  Jesus our Savior (1 John 1:9).  If repentance becomes a "game" with
  God and we don't really want or intend to stop committing a certain
  sin (say stealing), and we go on stealing, living always in that sin
  of stealing, then we place ourselves in grave spiritual danger.  We
  need to ask that God the Holy Spirit to give us the power to stop
  committing that sin and trust Him to help us fight against it.
Sad to say, the desire to sin may come back at times, for which we
  will have to repent again. That's not the same as living in sin. We
  all commit all kinds of sins daily, for which we have to daily repent.
  As long as we are sorry for our sins and believe that God forgives our
  sins for Christ's sake, we will be forgiven and have eternal life.
Worldly sorrow is the kind of sorrow Judas Iscariot had, which caused
  him to commit suicide. It was a self-centered remorse and despair that
  wrongly concluded that all was lost in this life, that there was no
  hope, that there was nothing God could do. Second Cor. 7:10 says that
  this kind of sorrow brings death. But godly sorrow is true sorrow over
  sin accompanied by trust in Jesus for forgiveness.  This is the kind
  of sorrow Peter had after he denied Jesus, and King David had after he
  committed adultery and murder (Psalm 51). Godly sorrow leads to life
  and salvation, because it includes faith in Jesus Christ.
Comment: Could you make it in a nutshell for me? I'm really a bad reader. Thank you for your answer.
Comment: Since you mentioned stealing in the third paragraph up from the end of your answer, allow me to quote a verse from Ephesians 4:28 NIV: He who has been stealing must steal no longer, but must work, doing something useful with his own hands, that he may have something to share with those in need. In other words, one way to demonstrate one's repentance is real is to do the opposite of your sin! If you steal, then work and earn some money so that you can share with someone less fortunate. Using a little sanctified imagination, there are probably other sins which could be repented of in this way.
Comment: You can't trick God.
Comment: That's for sure and for certain. Don

God loves everyone... Even dictators?


Can we please change the policy on banning people from asking questions?

Question: Apparently my account is being blocked questions because there are questions that I've previously asked that have not been very popular, or have been down voted or deleted. As a result, I can only ask one new question every six months apparently, and if that question is not very popular then it will continue my question ban. This is odd for a site that is for helping developers answer their pressing technical questions. What you're basically saying is that if my problems are not common enough, then I cannot ask them. I think that is a very odd requirement. Can we please change the policy around question bans to make this site more useful?
Comment: Stack Overflow isn't a personal help desk. It's a repository of high-quality Q&A. "Helping" is a side-effect for the question author and is mainly targeted at future readers. The site is useful _because_ we have high quality standards. _"if my problems are not common enough, then I cannot ask them"_ — Where did you get this idea?
Comment: @Anthony. Question bans occur because you have too many _negatively_ scoring questions. Lack of voters isn't the problem. The question _quality_, which results in downvotes, is the problem.
Comment: _"Therefore I conclude that the issues I'm asking about are maybe not common enough, so therefore I am being penalised for even asking them"_. Another thing one could infer is that the posted questions were found either poor, or unsuitable for the site. Be open to consider this scenario as well.
Comment: You can find out whether an issue is common by searching for it. That's how we find duplicates.
Comment: "Can we please change the policy around question bans to make this site more useful?". The site is not made useful by being able to ask questions, asking questions is what you do when there are no other options. The site is useful and remains to be useful because it is filled with existing knowledge you can *find*. I have not had to ask a question yet, I could find everything.
Comment: Yes please.  As a start, users who ask questions that are dupes of Q on the first page of the tag FAQ sbould be question-banned for life.
Comment: Where did I get that idea? Everytime I ask about this question ban, I'm told that not enough people upvoted my questions. Therefore I conclude that the issues I'm asking about are maybe not common enough, so therefore I am being penalised for even asking them. It's really a crazy catch-22 situation since I can't know how common an issue is until I ask it, and if I ask it and it's not common, then you guys remove my ability to ask further questions... something is wrong with the process.
Comment: @Anthony. Voting on Meta is different. It's often used to expressed (dis)agreement with the question. That doesn't make the voters "a-holes". Note that meta votes down't affect your reputation.
Comment: Did you take [the first step](https://meta.stackoverflow.com/q/416125/#comment895735_416125)? (The canonical is *[What can I do when getting "We are no longer accepting questions/answers..."?](https://meta.stackoverflow.com/q/255583/)* - with a lot of advice.) There are [also  alternative sites](https://meta.stackoverflow.com/a/409391). [A longer, but less credible list](https://www.quora.com/What-are-other-question-asking-websites-like-Quora).
Answer: It would make the site less useful because it would get clogged up with poor quality questions and answerers would have a much harder time finding useful questions to answer.
What we're saying is that if your question is common it's most likely asked already and you should be looking it up rather than asking it yet again and forcing the rest of us to find the duplicate for you. If you don't understand the existing answers you can always ask a question to get them explained then you'd show your research by linking to those existing questions and answers you've already found.
The ban is also there to motivate you to fix your existing poor quality questions. If it doesn't then so be it.
Comment: @Anthony You previously mentioned that you switched to SO from Quora. Why did you do so? Was it not because you found this site more useful than Quora?
Comment: Sorry, this is not the place to vent. Have a good one over on Quora I guess
Comment: @Anthony. no. That "freedom" will significantly affect the signal to noise ratio, with poor quality questions drowning out actual useful information, making it more and more difficult to find an answer to your question.
Comment: Yeah well thanks for your opinions. I've wasted enough of everyone's time. I only came to Meta to vent my frustration over StackOverflow's (in my opinion) draconian policies. I wish it would change, but with people like you obviously agreeing with the way it is run, I guess Quora is the site for me!
Comment: I disagree. Providing more freedom to let people ask the questions to help them solve the issues they're having would improve the site. If I have an issue, most likely others are in the same boat and will benefit from me asking about it. If you mute me, then the site is less useful to everyone.

I'm not going to waste time going back and editing deleted questions I asked years ago sorry.


In 1 Corinthians 11:4 why does Paul consider it a dishonor for a man to cover his head when praying or prophesying?

Question: Why does the apostle Paul consider it a dishonour if a man prays with his head covered in 1 Corinthians 11:4?

NIV-UK Every man who prays or prophesies with his head covered dishonours his head.
Comment: Do you mean "a dishonor if a man... uncovered?" or "covered"?
Answer: This is a bewildering passage indeed. Some context from ancient Greek medical literature can help illuminate it, however.

Hippocratic authors hold that hair is hollow and grows primarily from either male or female reproductive fluid or semen flowing into it and congealing (Hippocrates, Nat. puer. 20). Since hollow body parts create a vacuum and attract fluid, hair attracts semen.... Hair grows most prolifically from the head because the brain is the place where the semen is produced or at least stored (Hippocrates, Genit. 1). Hair grows only on the head of prepubescent humans because semen is stored in the brain and the channels of the body have not yet become large enough for reproductive fluid to travel throughout the body (Hippocrates, Nat. puer. 20; Genit. 2). At puberty, secondary hair growth in the pubic area marks the movement of reproductive fluid from the brain to the rest of the body (Hippocrates, Nat. puer. 20; Genit. 1). Women have less body hair not only because they have less semen but also because their colder bodies do not froth the semen throughout their bodies but reduce semen evaporation at the ends of their hair (Hippocrates, Nat. puer. 20).
According to these medical authors, men have more hair because they have more semen and their hotter bodies froth this semen more readily throughout their whole bodies (Hippocrates, Nat. puer. 20). The nature (φύσις) of men is to release or eject the semen. During intercourse, semen has to fill all the hollow hairs on its way from the male brain to the genital area (Aristotle, Probl. 893b.10-17). Thus, men have hair growth on their face, chest, and stomach. A man with hair on his back reverses the usual position of intercourse. A man with long hair retains much or all of his semen, and his long hollow hair draws the semen toward his head area but away from his genital area, where it should be ejected. Therefore, 1 Cor 11:4 correctly states that it is a shame for a man to have long hair since the male nature (φύσις) is to eject rather than retain semen."1

Conversely, the nature of women was to "draw up" semen, and as such should have long hair to increase this "vacuum" effect, increasing the odds of fertility.
While science has clearly made some advancements in the understanding of human physiology, one can sympathize with this worldview given the instruments available in their day and age for conducting medical research. This worldview explains the passage in 1 Corinthians 11:4 and why long hair was disgraceful to a man in the ancient Greek world.
As such, Paul clearly taught that men should not have long hair, in line with Greco-Roman thought on the function of hair and reproductive science.

Footnotes
1 Troy W. Martin, "Paul's argument from nature for the veil in 1 Corinthians 11:13-15: A testicle instead of a head covering," Journal of Biblical Literature (JBL) 123, no. 1 (2004), 77-78. doi: 10.2307/3268550.
 (read it for free here).
Comment: Appeal to hippocrates is an interesting argument, but I was under the impression that Paul was appealing to traditional Jewish custom, which would predate hippocrates, and then the question becomes whether this custom can be extended to Greek churches. The whole passage is difficult to interpret, partly I assume because Paul is responding to an argument so we are only reading part of this discussion.
Answer: In context, in 1Cor 11, Paul is talking about authority. Jesus is under the father's authority, man is under God's authority, and the woman is under the man (her husband's) authority. The head is the place where decisions are made.
Both men and women are equal, just like Jesus and the father are equal but they have different roles- Jesus himself is subject to the Father.
And when all things shall be subdued unto him, then shall the Son also himself be subject unto him that put all things under him, that God may be all in all.
1 Corinthians 15:28 KJV
To explain this, Paul uses a physical example like he so often does in his epistles. In culture at that time, and even in several cultures today, women cover their head as a symbol of subjection to authority.
So he uses two examples. One -how in culture women cover their head, and two - how even naturally women have longer hair, a natural symbol that they are subject to their husbands.
A woman without a head covering was considered a wanton woman, someone who refused to be subject to her husband's (her head's) authority, who was disrespectful towards him. Similarly for a woman's head to be shaved was considered a disgrace. Paul mentions that here:
But every woman that prayeth or prophesieth with her head uncovered dishonoureth her head: for that is even all one as if she were shaven.  For if the woman be not covered, let her also be shorn: but if it be a shame for a woman to be shorn or shaven, let her be covered.
1 Corinthians 11:5-6 KJV
Jewish men while praying cover their head, a symbol that they are subject to God. However since Paul is writing to gentiles, he is referencing their culture. Men don't cover their head because they aren't subject to someone else's authority, as women are to their husbands.
The line of authority goes thus- Jesus begotten of the Father, Man created by Jesus, woman taken out from the man.
But in case anyone misunderstands,he explains that in Christ both men and women are equal. Just like Jesus and the Father are equal but have different roles.
Nevertheless neither is the man without the woman, neither the woman without the man, in the Lord.
1 Corinthians 11:11 KJV
He summarizes by saying :
But if any man seem to be contentious, we have no such custom, neither the churches of God.
1 Corinthians 11:16 KJV
The example of head coverings is just a physical example to explain to them, there is no such custom or ordinance in the churches.
So no, neither men nor women have to cover their head in church.
Comment: Paul says that a woman *must* be covered when she prays or prophesies (at least!) but that her long hair is a God-given natural covering. But if she cuts off her hair then shame on her. An inconvenient truth for modern women and men. If you disagree all Paul seems to press the point is to say "we have no such custom" perhaps just saying "don't try to make us Christian men cover *our* heads" or "No yarmulkes for us guys, please, thank you very much".
Comment: "A woman without a head covering was considered a wanton woman, someone who refused to be subject to her husband's authority." do you have a source for this? At this site, "showing your work" is expected. This would require citing a source on the culture during first century, second Temple Judaism as a reference for this statement.
Comment: @Dan - Hannah's argument is generally used in reference to "Temple Prostitutes" - and I agree could use a citation.  However - even if such a / Greek / custom existed, it would still have to be shown that this was ever alluded to either in Scripture, held in Palestinian Israel, or an inference made by the early Church - since there really isn't strong evidence from Scripture.  Or - the verse could simply be speaking about "Glory" as it states, in reference to Moses covering his head, and "mourners", and Jesus' commandment to not do these displays, (Matthew 6).
Comment: It is interesting that you say that the head is where decisions are made because in the scriptures it seems they are made in the heart, kidneys, etc. Also, men and women are not equal in the scriptures; neither are God and Jesus.
Answer: Paul does not consider male and female to be the results of random evolution but rather a divine model to illustrate the spiritual truths. Physical realities reflect spiritual realities, or at least they should.
Someone was promoting a custom that sounded spiritual but actually undermined the illustration that God intended, that the man should be the image of Christ as Jesus is the image of God and the woman should bear the image of the man as the bride of Christ bears the image of the Christ.

1 Cor 11:
1      Be imitators of me, just as I also am of Christ.
2      Now I praise you because you remember me in everything and hold firmly to the traditions, just as I delivered them
to you.
3      But I want you to understand that Christ is the head of every man, and the man is the head of a woman, and God is the
head of Christ.
4      Every man who has something on his head while praying or prophesying disgraces his head.
5      But every woman who has her head uncovered while praying or prophesying disgraces her head, for she is one and the same
as the woman whose head is shaved.
6      For if a woman does not cover her head, let her also have her hair cut off; but if it is disgraceful for a woman to have
her hair cut off or her head shaved, let her cover her head.
7      For a man ought not to have his head covered, since he is the image and glory of God; but the woman is the glory of man.
8      For man does not originate from woman, but woman from man;
9      for indeed man was not created for the woman's sake, but woman for the man's sake.
10      Therefore the woman ought to have a symbol of authority on her head, because of the angels.
11      However, in the Lord, neither is woman independent of man, nor is man independent of woman.
12      For as the woman originates from the man, so also the man has his birth through the woman; and all things originate from
God.
13      Judge for yourselves: is it proper for a woman to pray to God with her head uncovered?
14      Does not even nature itself teach you that if a man has long hair, it is a dishonor to him,
15      but if a woman has long hair, it is a glory to her? For her hair is given to her for a covering.
16      But if one is inclined to be contentious, we have no other practice, nor have the churches of God.
New American Standard Bible: 1995 update. (1995). (1 Co 11:1–16). La
Habra, CA: The Lockman Foundation.

In this age of Feminism, Christians (and I use the term loosely) who do not appreciate this, chafe at Paul's teaching finding the submission of wives to their husbands to be cultural rather than of divine design.
Paul is writing in defense of an unequivocal distinction of roles for each gender to properly illustrate the relationship between Christ and his own bride.
In addition Paul alludes to Genesis 6 where the angels/watchers see the daughters of men and pursue the American Dream with them. He says that the woman's covering protects them from these angels and their pursuit of foreign flesh:

[1Co 11:10 NLT] (10) For this reason, and because the angels are watching, a woman should wear a covering on her head to show she is under authority.

Enoch:
[Chapter 7]
1 And all the others together with them took unto themselves wives, and each chose for himself one, and they began to go in unto them and to defile themselves with them, and they taught them charms 2 and enchantments, and the cutting of roots, and made them acquainted with plants. And they 3 became pregnant, and they bare great giants, whose height was three thousand ells: Who consumed 4 all the acquisitions of men. And when men could no longer sustain them, the giants turned against 5 them and devoured mankind. And they began to sin against birds, and beasts, and reptiles, and 6 fish, and to devour one another's flesh, and drink the blood. Then the earth laid accusation against the lawless ones.

Enoch
10.11 And the Lord said to Michael:
"Go, inform Semyaza, and the others
with him, who have associated with the
women to corrupt themselves with them
in all their uncleanness.

10.12 When all their sons kill each
other, and when they see the destruction
of their loved ones, bind them for
seventy generations, under the hills of
the earth, until the day of their judgment
and of their consummation, until the
judgment, which is for all eternity, is
accomplished.

10.13 And in those days, they will lead
them to the Abyss of Fire; in torment,
and in prison they will be shut up for all
eternity.

10.14 And then Semyaza (a Watcher/angel) will be burnt,
and from then on destroyed with them;
together they will be bound until the
end of all generations.

10.15 And destroy all the souls of lust,
and the sons of the Watchers, for they
have wronged men.

[Jde 1:6 NLT] (6) And I remind you of the angels who did not stay within the limits of authority God gave them but left the place where they belonged. God has kept them securely chained in prisons of darkness, waiting for the great day of judgment.

For the case for woman's heads being covered, see this link.
Interestingly John Wesley of all people considered long hair only a shame in a culture where hair had that association:
Comment: +1 for the "case for head covering" link. Also, I would like sources for your comments re: Gen 6.Thanks for your contribution to the discussion!
Comment: I added the sources.
Answer: The immediate answer is given in verse 7:

For a man ought not to have his head covered, since he is the image and glory of God; but the woman is the glory of man  (1 Cor 11:7 NASB)

A head covering is a symbol of authority (v 10). A woman is to cover her head signifying her status as under the authority of man, but a man ought not since he is the image and glory of God. Women are also imagebearers of God (Gen. 1:27), but not the glory of God. Woman is the glory of man.
If a man had something on his head while praying or prophesying, he would be symbolizing the glory of God as under an authority.
This is all in the broader context of discussing Christian order: God is the head of Christ, who is the head of every man, and the man is the head of a woman (v 3). The teaching that man ought to pray or prophesy without something on his head is in recognition of this structure.
Answer: 1. Question Restatement:

Why does the apostle Paul consider it a dishonour if a man prays with his head covered in 1 Corinthians 11:4?

2. Two Potential "Solutions" to the Question:
In context, Paul was explicitly refuting a particular tradition/custom - which is apparent in the text.  There is a Judaic "tradition" which asserts the exact opposite of what Paul is declaring:
2.1. As Jesus Did, Paul Consistently Refuted "Oral Traditions/Authority":

1 Corinthians 11:16 - But if anyone seems to be contentious, we have no such custom, nor do the churches of God.
Jewish Virtual Library, Covering of the Head - Moreover, the covering of the head, as an expression of the "fear of God" (yirat shamayim), and as a continuation of the practice of the Babylonian scholars (Kid. 31a), was gradually endorsed by the Ashkenazi rabbis. Even they stated, however, that it was merely a worthy custom, and that there was no injunction against praying without a head cover (Maharshal, Resp. no. 7; Be'ur ha-Gra to Sh. Ar., OḤ 8:2). The opinion of David Halevy of Ostrog (17th century) is an exception.

2.2. Moses would uncover his head before God, but veil the glory of God on him - before people:

NKJV, Exodus 34:35 - And whenever the children of Israel saw the face of Moses, that the skin of Moses' face shone, then Moses would put the veil on his face again, until he went in to speak with Him.
2 Corinthians 3:12 - 4.. - Therefore, since we have such hope, we use great boldness of speech— 13 unlike Moses, who put a veil over his face so that the children of Israel could not look steadily at the end of what was passing away. 14 But their minds were blinded. For until this day the same veil remains unlifted in the reading of the Old Testament, because the veil is taken away in Christ. 15 But even to this day, when Moses is read, a veil lies on their heart. 16 Nevertheless when one turns to the Lord, the veil is taken away. 17 Now the Lord is the Spirit; and where the Spirit of the Lord is, there is liberty. 18 But we all, with unveiled face, beholding as in a mirror the glory of the Lord, are being transformed into the same image from glory to glory, just as by the Spirit of the Lord.
Answer: We need not look far for the explanation given for why a man is not to be covered and why a woman should be. Paul gives his reason from verse 7 through 9 and concludes it with verse 10.

7 For a man should not have his head covered, since he is the image and glory of God; but the woman is the glory of man. 8 For a man does not originate from woman, but woman from man; 9 For man does not originate from woman. 10 Therefore the woman should have a symbol of authority on her head, because of the angels."

The conclusion of the thought from verses 7 through 9 is given in verse 10 and starts with "Therefore".  The conclusion follows this lead-in phrase.
In verse 7, Paul makes it quite clear that a man is not the same as a woman in what they Represent. He represents the glory of God and she the glory of man.
In verse 8, Paul gives the reason why they do not represent the same glories.  Their Origins are different.  He from God (dust of the earth) and she from the side of man.
In verse 9, Paul explains why they have different origins.  They were made for a different Purpose woman for man's sake so from his side and therefore of his glory.
Explaining this in reverse order the woman and man have a different purpose because of a different origin (in how they were made) and therefore represent a different glory, man representing the glory of God, and woman representing the glory of man.
Now the conclusion verse 10.  Therefore, (or for this REASON) a woman should have a symbol of authority over her head because of the angels.
Shall we propose that whatever else we may think of these verses it is difficult not to see verses 7 through 9 as Paul's explanation and verse 10 as his conclusion for the wearing of the covering?


Does your MMR fall if you dodge a Queue?

Question: Your MMR is calculated by your wins/ loses and what ranked you were at the previous season I believe. My question is, does your MMR fall if you dodge a queue for whatever reason when you lose those 3 or 10 LP after you've left?
Comment: I haven't played ranked in a few months, but the last I knew only your LP falls from dodging not MMR. I'll let someone more informed on the latest patch notes do the answer though in case I'm wrong.
Answer: No your MMR does not drop and it will also not decay from inactivity. Really the only things that affect your MMR are winning and losing. Up until last Season Queue Dodging was used to "troll" the League system by playing into a promotion and then winning one game while dodging the other one. With this trick players were able to reach Diamond MMR while being placed in a Bronze league.
Basically, if you dodge you will lose LP but you will gain slightly more LP next game.
Answer: First of all it seems you may have some misconceptions on MMR. It is not solely calculated based on your wins and losses. There are other factors that are taken into account. Now the specifics will be dependent on the implementation of the specific system that Riot decided on. But in general there are several factors determining how much MMR you gain or lose.
The first factor is the MMR of your allies and your opponents when you win or lose. For instance if your team has a lower MMR than your opponent if you win you will gain more MMR than if you had a higher MMR than your opponent.
Note that teaming up with friends in the dynamic queue is also likely to boost your team's MMR.
Another factor is what is known as 'uncertainty'. Which is a measure of how sure the system is that the MMR for you is correct. Uncertainity is higher when you haven't played many games (this is part of the reason why you need to play 10 promo games before being placed into a league). Or also when you haven't played much for a longer period of time. Although I cannot be sure, but it is likely that dodging will increase your uncertainity factor but not directly change your MMR.
Answer: no it won't , But if you dodge 4 times in 1 week , you can get ban for 1 day cause i did . Dodge 2 times in a row , 30 min ban from playing. And heres a fun fact , if you dodge in your promos , you DONT lose your entire series lol


Can you perform aggregations or joins with falcor?

Question: Often a client needs aggregations or joins over the data. How would you handle that in falcor? I don't see any notion of transform or join in the docs. Perhaps with call? It is introduced as a way of executing side effects, but perhaps could also perform transforms or joins.
However, it seems you'd then have to embed functions throughout your graph for every aggregation you might need.
Update:
For example, return the mean of a property, like
select avg(x) from foo
or the mean, grouped by another property
select g, avg(x) from foo group-by g
Answer: What kind of aggregations and joins do you mean? They are mostly solved by references.
For example, this SQL:
SELECT Customers.CustomerName, Orders.OrderID, Orders.SomeOrderStuff
FROM Customers
LEFT JOIN Orders ON Customers.CustomerID = Orders.CustomerID;

Translates roughly to:
model.get(
    ['customers', {from: 0, to: 100}, 'orders', {from: 0, to: 100}, ['id', 'someOrderStuff']
).then(function(response) {
    // do stuff
});

in the model (client-side). Server-side, you need to implement routes that return $refs.
(Tell me if you need a more detailed explanation.)


Accuracy of Lax-Wendroff scheme

Question: Consider the Lax-Wendroff scheme
$$\frac{u_j^{n+1}-u_j^n}{\Delta t}+\frac{u_{j+1}^n-u_{j-1}^n}{2\Delta x}+\frac{\Delta t}{2}\frac{2u_j^n-u_{j+1}^n-u_{j-1}^n}{\Delta x^2}=0$$
for differential equation
$$\frac{\partial u}{\partial t}+\frac{\partial u}{\partial x}=0.$$ It's known that this scheme is second order accurate in time, $\mathcal{O}(\Delta t^2)$. How is this true since the scheme uses forward difference for time derivative? Recall that
$$\frac{\partial u}{\partial t} \Big|_j^n=\frac{u_j^{n+1}-u_j^n}{\Delta t}+\mathcal{O}(\Delta t).$$ Using this observation, shouldn't this scheme be first order accurate in time, $\mathcal{O}(\Delta t)$? I have read several books on numerical analysis and the authors vaguely explain this. They use the words such as "clearly" or "obviously" instead of elaborate the derivation of the accuracy.
Answer: You can derive the consistency order of the scheme by using the Taylor expansion around (in this case) $u_j^n$. Use the expansion up to the second derivative in time (including it) and up to the third derivative in space and then note that, from the given equation,
$$
u_t=-u_x ~ \text{and} ~ u_{tt}=u_{xx},
$$
which will help to get rid of some of the terms in the expansions. The resulting approximation order should be $\mathcal{O}(h^2+k^2)$, where $h$ is spatial step and $k$ is transient step.
If you follow the derivation of the method, you will see that it uses the Taylor expansion of order $k^3$ ($k^2$ approximation power) and $h^2$ schemes for replacing the first and second derivatives in time by spatial derivatives, which clearly indicates that the method must be $\mathcal{O}(h^2+k^2)$.

Accuracy of Lax-Wendroff scheme


Combine multiple adjoining parts of a single feature

Question:
In QGIS, one polygon feature resulted from merger of several adjacent polygons. This one new polygon feature has a single line through it that I would like to eliminate. When hovering over individual nodes in edit mode a balloon displays polygon number, ring number, and vertex number and in this case the adjacent parts of the new polygon have polygon numbers 0 or 1. How do I combine the polygon parts of this new single polygon feature?
Comment: I should have mentioned I am doing this in QGIS.
Comment: Could you add an image of your polygon to your post? It seems to be an issue that the "Digitizing Tool" plugin may be able to fix.
Answer: So, I suggest my cartographic approach to solving your problem and its name sounds like "wedge" or "insertion" (I'm not sure that Google will translate it correctly, though ...)
Initial data: two broken adjacent polygons.
1) Polygon into points, for which run the tool: Vector-> Geometry Processing-> Extract vertices;
2) Edit the points, as shown in my screenshot below, i.e. leave the adjacent points unchanged (4 - two each next to numbers 1 and 2);

3) Run the Vector-> Geometry-processing tool on points-> Delaunay Triangulation ...
see screenshot below;

4) Select the "wedge", copy it and paste in edit mode into your working layer;
see screenshot below;

5) Combine the three parts of your polygons into one by running the Vector-> Geoprocessing-> Merge by Basis ... tool, replace it in the original layer
and everything seems to be ...


Converting calorie count on standard gym stationary bike to power data

Question: I use the stationary bike in my apartment's gym to train in winter. The bike does not give me power data, but it does give me "calories burned per hour." (as a rate, not a count)  Is there any way to use this to calculate my power output? I assume the machine is measuring my power, because I don't see how it could calculate calories burned otherwise.
Comment: http://mccraw.co.uk/powertap-meter-convert-watts-calories-burned/ gives the figures you need for the maths. How accurate that is has been discussed in questions here (Search for Calories)
Comment: Sounds like these meters are more for comparing subsequent times on this bike.
Answer: Calculating calorie burn from power output is pretty straightforward, but the reverse simply cannot be done. The same number of calories can be burned by doing an hour of 30 second efforts and 2 minute recoveries compared to doing a one hour steady endurance effort. Beyond that,  you also have the inaccuracy of the gym bike measurement which will be the biggest factor to consider. Any bike which does not display power in watts to you also doesn't measure it in a way that is accurate enough to be useful in the slightest when comparing to data from any other unit.
In short, you can use the calorie number to compare between workouts on the same gym bike to know that you're improving if you burn more calories in the same time at the same level of exertion, but nothing more than that.
Comment: I don't understand. If there's an easy conversion one way, how can there not be one in the opposite direction by reversing the calculation?
Comment: @DavidRicherby most of these gym bikes do a very crude calorie calculation with the worst being simply X kcal/hr, and the 'best' adding a multiplier for resistance setting and/or speed.  You will find many bikes for example that give 400kcal/hr at 15speed units, but that 400 will not change regardless of if resistance is set to 1 or 20.
 And that's before considering that they are uncalibrated and vary wildly in states of maintenance.  If you go to a local gym and try 3 bikes next to each other, the resistance they produce for each level is likely to be out by 20-30% compared to its neighbour
Answer: Calories/hour is actually a power measurement (power is the rate of transfer of energy). So naively one could just convert from calories/hour to joules/second (watts). 1 kilocalorie/hour = 1.162 watts. (Remember 'calorie' in a diet or exercise sense is actually a kilocalorie.)
However, I strongly suspect that exercise bikes calorie rate readings are quite inaccurate. No inexpensive exercise bike is going to have a proper accurate power meter in it. I suspect that calorie rate is estimated from speed and current resistance level.
[Update] As pointed out in comments, the calorie burn rate is an estimate of calories used by your body, not an estimate of power output to the cranks.
You also do not know what time interval the calorie rate is calculated over, making the readings not very useful.
Comment: Argenti: I think you've forgotten to adjust for gross metabolic efficiency. Human beings on a bike have a GME around ~20%, so only ~20% of calories burned produce energy. Each kilocalorie burned per hour can be used to produce somewhere around a quarter of a watt, so if Apperson123 were pedaling at a rate of 750 kilocalories per hour (*and if the exercise bike were absolutely accurate*) his average power output would be about 750/4 = 187 watts.
Comment: @DavidRicherby do you use a heart rate monitor that strava understands? HR can be used to estimate when you go anaerobic, which is less efficient (and could be why you get <20% efficiency). Without calibrating yourself on a bike in a lab with some fairly expensive kit this is only a guesstimate but better than just using ~20%.
Comment: @ChrisH I was using a HRM today, yes. Was really struggling up any kind of hill so probably doing about 0.20% efficiency! :)
Comment: @DavidRicherby *For example, on the ride I did today, Strava estimates that I burnt 2200kcal (9200kJ) but only transmitted 1300kJ to the pedals.*  A kcal is 4184 J - a bit over 4 kJ.  But your body only outputs about 20-25% of that energy as usable power.  So that 1300 kJ to the pedals needs to be multiplied by 4 or 5 to tell you how many kcal you burned.  Using 5 (20% metabolic efficiency) means to put 1300 kJ to the pedals you burned 6500 kcal.  Strava is likely miscalculating your kJ along with overestimating your kcal burned. FWIW, I ride with a power meter and use 1 kJ = 1 kcal. It works.
Comment: @ChrisH I figured it out while slogging into a headwind on my way into work. I was slogging into a headwind that day, too, and Strava's estimated power is based on speed, gradient and weight, so it thought my power was low because I was going slowly. And it's probably estimating calorie burn from stuff that includes heart rate, which was about normal.
Comment: I think the exercise bike is actually fairly expensive. But the using that calculation the exercise bike thinks my ftp is at least 890 watts. Clearly I should go pro.
Comment: @Aperson123 I would not be surprised in the calorie burn rate shown is deliberately high
Comment: @R.Chung Yeah, I guess the calorie reading is calories burned rather than energy output.
Comment: This doesn't work at all, for exactly the reason that @R.Chung gives. For example, on the ride I did today, Strava estimates that I burnt 2200kcal (9200kJ) but only transmitted 1300kJ to the pedals. I don't have a power meter so the actual numbers are probably pretty wonky but they clearly show that you can't just use the naive conversion you're suggesting.
Comment: @DavidRicherby we all have days like that
Comment: kcal is commonly approximated as watts*hrs*4 as per: https://fitness.stackexchange.com/questions/15747/what-do-watts-really-mean-on-an-exercise-bike
Comment: @AndrewHenle Completely agree; my point was just to give some data to show that multiplying power at the pedal by duration doesn't give calories burnt.


What is the topological/smooth mapping class group of an n-dimensional torus?

Question: The page "mapping class groups" on wikipedia says the topological MCG of T^n is GL(n,Z), but does anyone know a reference? Also, is the smooth MCG of T^n known?
Comment: If you were to take the mapping class group to be $\pi_0 HomotopyEquiv(M)$, i.e. the path-components of the homotopy equivalences of the manifold $M$, then provided $M$ is a $K(\pi,1)$, the mapping class group would be $Out(\pi_1 M)$.  So provided $\pi_1 M$ is abelian, this is just $Aut(\pi_1 M)$.
Comment: I'm using $MCG(M)$ in the sense of either $\pi_0 Homeo(M)$ or $\pi_0 Diff(M)$, but probably it's your version that is meant by claim on wikipedia.
Comment: I patched-up the Wikipedia page a little.  Still could use work. Thanks Gogolev and Liu.
Comment: For $n=3$ this result is due to Hatcher: http://dx.doi.org/10.1016/0040-9383(76)90027-6
Answer:
Indeed, $MCG(\mathbb T^n)=GL(n,\mathbb Z)$ in dimension $n<4$, but it is not simple. In dimension 2 it was first proved by Earle and Eells using complex analysis.[Edit: As Allen Hatcher points out this was known for a long time, Earle and Eells prove much stronger statement: $\mathbb T^2$ is deformation retraction of $Diff_0(\mathbb T^2)$]
I am not sure what happens in dimension 4.
This is not correct in dimension >4, the MCG is semidirect product of $GL(n,\mathbb Z)$ with another (non-finitely generated group). Let me just quote Hatcher:

If $n\ge 5$ then there are split exact sequences
  $$
0\to \mathbb Z_2^\infty\to\pi_0(Top(\mathbb T^n))\to GL(n,\mathbb Z)\to 0
$$
  $$
0\to \mathbb Z_2^\infty\oplus\binom n2\mathbb Z_2\to\pi_0(PL(\mathbb T^n))\to GL(n,\mathbb Z)\to 0
$$
  $$
0\to \mathbb Z_2^\infty\oplus\binom n2\mathbb Z_2\oplus\sum_{i=0}^n\binom n i\Gamma_{i+1}\to\pi_0(Diff(\mathbb T^n))\to GL(n,\mathbb Z)\to 0
$$
  where $\Gamma_i$ are Kervaire-Milnor finite abelian groups of homotopy spheres, $\mathbb Z_2$ is just the group of order 2 and $\mathbb Z_2^\infty$ is the group of finite strings.

The above quote is from Hatcher "Concordance spaces, higher simple homotopy theory and application."
Comment: In dimension 2 the result is quite a bit older than the theorem of Earle and Eells, which determines the full homotopy type of the diffeomorphism group of a closed orientable surface, not just the mapping class group. The mapping class group of the 2-dimensional torus was known to people like Nielsen, Dehn, and Baer around 1930 or even before. A modern textbook reference is the upcoming book on mapping class groups by Farb and Margalit.
Comment: I doubt there's much known about $\pi_0 Diff( (S^1)^4 )$.
Comment: Thanks for all the answers and comments! I'll also be happy to see any updates about the dim 4 case. BTW does Hatcher's paper imply any partial description in dim 4?
Comment: Hatcher's paper doesn't actually contain a full proof. I think nothing can be said about dimension 4.