Algebraic proof that isometries are surjective

Question: I'm really struggling with an algebraic proof that all isometries $f$ in $\mathbb{R}^2$ are surjective. I start off by letting A be an arbitrary point in $\mathbb{R}^2$. Let $B=f(A)$. Now consider that $f(B)=B'$ must be located in a circle of radius $d(A,B)$, centered at $B$. I call this circle $C_B$ and also form a circle of the same radius around $A$, called $C_A$. Now that there are two intersecting circles, I define a point $C=C_A \cap C_B$. $\vartriangle ABC$ is equilateral, so $f(\vartriangle ABC)$ must also be equilateral, and I believe that this will uniquely identify $f(C)=C'$. Now I think my next step is to consider where $f(C')$ maps? I'm guessing ultimately if I keep doing this I will arrive at a point $D$ in which $f(D)$ will map to $A$ but I'm not not seeing the entire picture. Thanks for any assistance
Answer: Almost. Pick $A,B\in \Bbb R^2$ arbitrarily. They map to $A',B'$, say. Now given $Y\in\Bbb R^2$ (for the generic case: not on the line $AB$) there are exactly two points $X_1,X_2$ such that $ABX_i$ is congruent to $A'B'Y$ (found by intersecting circles as you described). Also, there is only one second point $Z$ such that $A'B'Z$ is congruent to $A'B'Y$. Now $f$ must map $X_1$ and $X_2$ to $Y$ or $Z$ and cannot map  both to $Z$.
To treat all points at once, pick a triangle $ABC\in\Bbb R^2$. This maps under the given isometry to a congruent triangle $A'B'C'$. Now the reflection at the perpendicular bisector of $A,A'$  maps $A'\mapsto A$ (and so $A'B'C'\mapsto AB''C''$). The perpendicular bisector of $B,B''$ passes through $A$ (why?) and maps $AB''C''\mapsto ABC'''$. By the circle-ntersection argument, we have either $C=C'''$, or $AB$ is the perpendicular bisector of $C,C'''$ in which case another reflection maps $ABC'''\mapsto ABC$.
At any rate, a sequence of two or three reflections, i.e., an isometry acts as inverse of $f$ at least as far as $A,B,C$ are concerned. But any other point is uniquely determined by its distances to $A,B,C$ (again, by the intersecting-circles argument) so that the compsed map must be the identity of all of $\Bbb R^2$. A map with a (two-sided) inverse is bijective.
Comment: Am I to assume that $Y$ falls on the intersection of the circles around $A'$ and $B'$?
Answer: Here's another line which may or may not suit you, depending on your context.
Proposition: the isometries are generated by translations and linear orthogonal transformations.
Sketch: pick a scalene triangle with one vertex on the origin. After an isometries has been performed, it is easy to find first the unique translation that aligns the corresponding pair of vertices to the origin, then the unique linear orthogonal transformation aligning the other two corners.
To tackle your question:
Translations are clearly onto: for a translation by v, and arbitrary x, $x=(x-v)+v$.
Linear orthogonal transformations are 1-1 (since they preserve distance) hence onto.
So, the group of transformations these generate together are onto, since composition of two onto maps results in onto maps.


How long does it take for a citation to show up online?

Question: How long does it take for a cited paper to show up online? I can see a couple of papers that were cited very recently and the papers containing those citations are currently online since a week or two. How long should I expect it to take before those citations show up as citations through Google Scholar or other indexing services?
Comment: I'm voting to close this question as off-topic because this is not a question considers academia. Rather, the question is based on indexing algorithms of particular websites.
Comment: I have timed this before and it takes about 4 days.
Answer: Google Scholar, Web of Knowledge, Scopus and other indexing services have their own ways how the papers get into their database. For Scopus, the journal has to be registered there, and then actively send the data. It's similar for Web of Knowledge I think. Google gets the data from who-knows-where and I doubt you can control it efficiently. In general, it takes couple weeks to several months.
As dgraziotin pointed out in comments, Google Scholar indexes citations from arXiv quite quickly, in couple days. However, by many people and many institutions, arXiv papers are not considered at all regarding citations, unless they are published properly elsewhere and properly Journal-ref'ed; even then, many people don't trust that the arXiv version is correct, because nobody makes any check of this (I mean, you can put whatever Journal-ref to whatever your arXiv paper, so it's not trusted).
Comment: I use arXiv to self-archive my published papers, so I mainly employ it as a safe hosting platform to free up my papers.

You are of course right that arXiv-only papers do not count in many institutions. I do not like the current system, but that is another story.
Comment: With the exception of arXiv papers in Google Scholar. In my experience, it takes GS 3-5 days to index an arXiv entry, citations included. It seems it has got quite a preference!
Comment: @dgraziotin However, arXiv is not recognized as "a paper", unless you speak about e-pub arXiv journals, which do exist.
Answer: With Google Scholar, it depends at least in part on the deal the publisher has made with Google about how soon they are allowed to scrape.  For this reason, Google Scholar citations for a year keep going up for months after that year has ended.
Answer: It took four days for a Science paper (four days from online publication, three from official publication / print.)


Where does gravitational energy come from?

Question: We've all heard mass tells space how to curve and curved space tells matter how to move.  But where does the energy to curve space come from?  Likewise where does the energy that curved space uses to push planets around come from?  I mean if I tell my son to clean his room, and he does, then I did not provide him the energy to do so.
Comment: Related to http://physics.stackexchange.com/q/35431/
Comment: Also related: https://physics.stackexchange.com/q/349768/2451 and links therein.
Answer: Mass is the same as energy by $E = mc^2$ So the energy that curves space-time is the mass that curves space-time. Then you could ask why does mass curve space? As far as I know that is equivalent to asking where do Einstein's field equations come from. For that one needs a complete and consistent theory quantum gravity which has Einstein's equation in the low energy limit. No one has that.
"We've all heard mass tells space how to curve and curved space tells matter how to move." This poetic but be a bit misleading. Einstein's equations simply describe in detail how space-time changes as a result of changes in matter. There isn't some process or mechanism happening between matter and space-time i.e when space-time changes there is a process that occurs that then can be used to describe what matter will then do.
Lastly, you are using gravitational energy in the newtonian way of looking at gravity. The gravitational potential which ultimately gives gravitational energy in newton's theory is buried in the metric.
Comment: The metric of space-time in the non-relativistic limit produces the gravitational potential which can ultimately be used to arrive at gravitational energy. Secondly, they way we derive gravitational potential energy in newtonian gravity is not valid in the gr case.
Comment: That may be what energy is but like I said cannot explain how curve space can tell matter how to move. Where did that gravitational energy come from?
Comment: That's what I meant by there's never been a good answer. What causes the initial energy? If something is moving away from a massive object how and why does it turn around and head back toward the massive object?
Answer: The theory of General Relativity works with the energy momentum tensor  and one has to work with the mathematics of it in order to really understand what is happening, not handwaving. It is a fact that all cosmological and astrological data follow the general relativity equations, as one can see in this link
The cosmological model accepted now  is the Big Bang model, based on general realtivity and its constants adjusted with observational values. In this model all the energy of the universe, the one the energy momentum tensor describes, came at the Big Bang singularity:

The expanding universe utilizes this original energy . (Special relativity is part of General relativity, and thus the equivalence of mass with energy is accounted for).  As the Big Bang model is quite successful , the answer is : the energy for everything comes from the original singularity. At the planetary and galactic level it is described well with Newtonian mechanics. At the atomic and nuclear  the laws of quantum mechanics and special relativity are adequate to describe energy transformations.
Answer: If we pick the (most common or most useful) example of the Schwarzchild solution, it is simply the unique geometry that solves the Einstein's equations that is both static and spherically symmetric . It is solved in vacuum (which means that the energy density in the part of spacetime we are solving for is zero, while there may be a mass at the origin). This is similar to solving for the electromagnetic field, where you solve Maxwell's equations in vacuum to get the field due to a point charge. The charge itself is not losing any energy by the generation of the electric field. It is a description of interactions and not something that the charge expends energy in creating.
To answer the second part of the question, objects that are not being acted on by an external force (i.e., objects in free fall), follow geodesics: In simpler terms, if I set a ball rolling on a frictionless surface with constant velocity, it will follow a path where governed by the equation $\vec{F}=0$, which would be a straight line. It is the same concept in general relativity, except that the paths are not necessarily 'straight lines', because of the curvature of spacetime itself. (If I set a ball rolling on the earth, it will not shoot off at a tangent to the surface, but roll on the surface). It is important to note that the geodesics are locally straight. In other words, if I look at a small patch, spacetime looks flat, and bodies move along a continuous path. In other words, 'straightness' in general relativity need not correspond to what we intuitively think of as straight in non-relativistic contexts. In the case of orbiting bodies, the paths they follow $\textit{are}$ the paths that are locally straight in their frame of reference.
Comment: That's the difference between classical Newtonian physics and general relativity. In classical gravity, we see it as an interaction force between masses. But in GR, masses (or energy density in general) curves spacetime itself, and bodies in spacetime follow geodesics which are 'generalizations of the notion of a "straight line" to "curved spaces"'. In other words, gravity isn't seen as a force. Spacetime is curved and objects just follow the paths that correspond to straight lines in the curved space.
Comment: Objects in freefall are being acted on by some external force that is why they are falling. If an object was moving in a perfect straight-line away from the mass what would make it stop, turn around and go back?
Comment: You can see the difference easily if you consider light. With classical physics, light is massless and should not be affected by gravity at all. But in GR, we would expect the curvature of spacetime to affect anything that moves in spacetime, even if it is massless (although massless particles behave a bit differently from massive ones). This is why we have effects like gravitational lensing.
Comment: Everything that happens is an interaction. Even with general relativity you can't explain it without using verbs like follow or curves. Those are both actions. Also the explanation of something following curved space does not explain something that is not moving at all or something moving away from gravity. If an object is not following curved space then what makes it start following curved space? Also how does mass curved space??
Answer: The energy is already there. It just converts from the temporal energy of spacetime to the kinetic energy that curved spacetime causes.
Answer: Asking where energy comes from is like asking about the origin of the universe. Did it all spontaneously pop into existence out of nothing, completely violating every existing law of nature, or has it always been there just waiting to expand out of the singularity when god himself gave the command. The answer is we don't know. We may never know. It's our curiosity about the world that leads to the advancement of science. If we knew the secrets of the universe, we would never learn, and that isn't a life I want to live. There are always things we don't know, and that's why the universe is so amazing. The best answer I can give you is that the energy has just been there since the dawn of creation. What's before that is a mystery.
Comment: Could down-voter please explain? My answer is great. If you know the origins of the universe, feel free to share. If you don't know the origins of the universe, then don't down-vote me.


How does roasting beef in a rotisserie compare to doing so in a regular oven?

Question: When I prepare roast beef at home, it's never as good as the one prepared with a rotisserie.
What is the difference between a roast beef cooked in a rotisserie, and a regular oven?
Answer: Dry and even heat.  There is still a difference, even with the same cut of meat and using a roasting rack to avoid roasting the cut in its juices: meat on a rotating skewer will be exposed to uniform heat.  If you set the temperature of a home oven to 350°F, the top of the roast will be exposed to that temperature, but the bottom, in line of sight to the heat source, will be much hotter.
Commercial rotisserie ovens also cook the meat by convection and use the heating elements to create the outside crust.  As the meat roasts, it becomes darker and absorbs more of the radiant heat from the roasting coils.  So the outside ends up getting overcooked unless the roasting coils are carefully controlled, which is kind of hard to do.  In a convection oven the temperature is constant around the roast.
Answer: Additionally, the roast done on a spit is going to lose less juice because of the rotating action. As gravity is pulling the juices downward the meat is rotating so what would have been the bottom is now becoming the top, thus the juices can't run out as easily.
Comment: Is that really true?  If the roast is being heated to at least 60C (*i.e.*, medium-rare range), then the juices it loses are due to the denaturing of collagen.  I'd be surprised if the force of gravity alone could counteract the squeezing of the proteins.  Even if the rotation did prevent moisture loss, the rotation speed would have to be finely tuned to the size of the roast: too slow and gravity will pull out moisture, too fast and centrifugal force will also pull out moisture.  Or maybe that's why organizations like the Confrérie de la Chaîne des Rôtisseurs exist... ;-)
Answer: More even crust around the whole surface.
If you are roasting in a pan, the meat is likely sitting either it's own juices or in some other liquid. Even if you are flipping it over halfway through, the top and bottom are stilling spending half their time wet. Roasting a turning spit, the whole exterior gets exposed to the same amount of dry radiated and convective heat.


How are pro tempore moderators appointed and can they be replaced?

Question: I see many meta  posts complaining against the alleged action of moderators; particularly goldPseudo. As these posts keep coming up, I would like to know if it is even possible for a mod change to occur while the site is in beta? Who decides on the new mods?
Answer: I'm one responsible for the moderators on Islam—Stack Exchange. If there were to be a change in moderators before graduation, I'd be the one to do it. For more details, please see Moderator Pro Tempore.
Now as for the moderator you mentioned, I've been working with him since private beta. goldPseudo has been and continues to be the leader this site needs. He has been accosted on all sides by disgruntled users and yet he responses with dignity and poise. Every day he makes hard decisions that the community should be making for themselves and yet the primary feedback he gets is complaint.
For the record, I've investigated many complaints about this site's moderators. And in every case, the accusations are either vastly overstated or utterly groundless. Never have I found a situation where goldPseudo has placed his own interests above those of the community and its goal of expert answers to questions about Islam.
Let's stop crying wolf, shall we?
Addendum
Several people have mentioned that the above is a bit one-sided. The reason we appoint moderators on beta sites is that we need a small group of people to be in charge of mundane janitorial tasks. Please take a moment to read our Theory of Moderation. Like everyone else, moderators make mistakes sometimes; it's inevitable. So we give users ways to overrule their decisions individually. Most of their decisions can be reversed by community moderation. And every decision can (and often is) discussed on meta. When people make persuasive arguments, it's entirely possible that moderators will change their minds.
A significant part of my frustration is that a handful of people seem unable or unwilling to try understanding why moderators decide as they do. I suspect that if more people tried their hands at community moderation, there'd be a greater respect for the diamond moderators. We have specifically picked pro tems who have shown from their actions that they have a strong commitment to creating an enduring resource for learning about Islam. Leadership isn't limited to the handful of people who have diamonds next to their names; it's available to anyone who cares about this community.
If you want to help out, I encourage you to look over this detailed guide written by members of the Physics site. A strong site has many users dedicated to commenting and flagging when they see problematic posts. Try it out and see how it works.
Comment: I don't think he should step down or be replaced but I think there is a lot about good moderation that he needs to learn. A moderator who loses the respect and trust of a considerable section of a site's community will be much less effective even when the moderator actions are appropriate ones. The percived attitude of a moderator is important. One of the main criterias of a good moderation is moderating using the least possible amount of binding mod powers. A leader does not need to force others to follow him/her.
Comment: The complaints have never been about him putting his interests above the community, but as I've also explained in my recent complaint against his outrageous decision to suspend us from chat, he often treats users in imperious ways, embarks on character attacks at times to enforce compliance and is too rigid to show tolerance in cases that do not need iron-fist moderator action. A recent example is his reckless decision to delete my messages in chat despite the fact that they were justified based on the community consensus and to even suppress my defenses by suspending me from chat.
Comment: @infatuated: I read your post titled "Should content representing an offical scholarly view of an Islamic sect critical of another sect be banned?" And I thought maybe there was finally a wolf moment. But it turned out to be some chat messages posted out of the blue dragging in (literally) ancient history. I don't know if deleting them was the right decision, but I do know that your meta post was one of the examples of vastly overstated accusations I had in mind. You would be better served to not immediately jump to moderator malfeasance.
Comment: Jon, I think you are also exaggerating a bit. Have you been on [meta.math.se]? AFAIR [math.se] is considered one of the most successful sites, yet the criticism of moderators have been fierce at times. Dismissing all complaints generally and in this way is not helpful. I think it's clear that many active users see problems with moderation. Now you can disregard them and have the site for your favorite moderator but I am sure you know as well as me that such a site will eventually fail. I would completely disagree with your claim that goldPsuedo is _the_ "leader" this site needs.
Comment: These were the issues also extensively discussed by Kaveh in [Issues with Moderation](http://meta.islam.stackexchange.com/questions/1312/issues-with-moderation) which seems to reflect a common sentiment by users considering the high upv-votes.
Comment: The trouble is the moderator doesn't even care to substantiate any of his claims. Even in his supposed answer he intentionally avoids touching upon my supportive arguments. He refuses to be accountable for the wrong decisions he made and the outrage he caused. Despite the fact that I had explained in the chat there was nothing wrong with my messages, he proceeded to delete them and even delete my protests. This was a clear example of imperious iron-fist moderation that no surprise can strongly outrage the users.
Comment: @Kaveh: You are absolutely correct and I have updated my answer to reflect what I think might be the deeper problem here: not enough people express their disagreement with counter-actions and too many people come right to meta. There are lot's of problems on this site and a very small number of people are addressing them. Plagiarism and excessive debates in particular are problems that should not be left to the moderators to deal with. I haven't so much dismissed complaints as found little to back them up. goldPsuedo isn't perfect, but he's doing well in a hostile situation.
Comment: Thanks @Jon for the update. I completely agree with you that other users must help uphold the policies way more than they do right now if the site is going to succeed.
Comment: Also note that a lot of moderation practices in this site do not follow any specific site rule or community consensus. Arbitrary deletions of posts (both on meta and main) sometimes simply because the moderators simply don't like them, is an example that [we recently decided to regulate to prevent conflicts](http://meta.islam.stackexchange.com/questions/1338/when-should-a-post-on-the-main-site-be-deleted), but there are more instances that should be also taken care of in future.
Comment: recently i flagged his comment "as not constructive" and he bans immediately my flagging rights. I wasn't even looking if he was moderator or not. IMO it was not constructive and i flagged. My flagging past can show i am not doing bad about flagging. one flag on moderator gives me ban on flag for 7 days. Is this fair moderation? He is taking harsh decisions. He may give a lot of effort on this site but it doesn't mean he is doing a good job.
Comment: @nim: I'm not at all sure what you are talking about here. Does it have something to do with your meta post? http://meta.islam.stackexchange.com/questions/1705/debate-flagged-questions-and-answers-need-clarification
Comment: @jon no i am not talking about my meta post. It was earlier and i couldn't able to flag any post last two days. Text was saying "your flagging history history not good, you are banned from flagging questions and answers for 7 days. However my flagging history is not that bad one or 2 of my flags are found not helpful. After writing here, even i could able to flag posts in two days. Before my due time end. I thought one of moderators see the post and corrected it.


Has the most luminous object in the universe been found?

Question: It's hard to search through the entire (observable) universe, but the most luminous thing there is must on the other hand be easy to find. Can we now say that the most luminous quasar we know, is the (intrinsically) most luminous one that exists, or will we soon?
Answer: As it stands I think the answer is no. The most luminous object in the (observable) universe is probably hidden behind many magnitudes of dust extinction. There are lots of faint, infrared-detected objects that may be extremely luminous galaxies in the early universe (and indeed some have turned out to be) but it is difficult to get their redshifts, so it is difficult to be sure we have a complete luminosity function. We now know that objects with central black holes $>10^{9} M_{\odot}$ already exist in the universe after a billion years or so. To get to that size there must have been an awful lot of accretion and an awful lot of accretion luminosity.
In addition, the most luminous galaxy/quasar is going to be a rare object and only ridiculously small areas of the sky are covered by things like the HST ultra-deep field. i.e. There is almost bound to be a more luminous one in some other patch of sky that has not (yet) been surveyed. The logistical problems of getting a UDF over the whole sky (or even a significant fraction of the sky) means that isn't going to happen any time soon.
Finally, the brightest quasar is certainly not the most luminous. 3C273 is quite a modest object, in terms of luminosity, but it is very close to us as quasars go. But perhaps you didn't mean bright in that sense? Brightness is normally reserved to refer to the apparent brightness. Luminosity is the extinction-free, distance-corrected power.


Install Skype on Ubuntu 14.04

Question: How can I install Skype on Ubuntu 14.04 with synaptic? I don't want to download from the site
Comment: Welcome to [ubuntu.se]! It is very nice that you want to help others, but here we like Questions to have Answers. Could you reformat this so that it is a question, and then answer it with your information!
Comment: @Tim @"Kauko Peltonen"  I agree with Tim
Answer: Answered in Question

Open 'System Settings'. Under 'Ubuntu programs' choose the following 3
sources:

' Free and open source programs packed by Canonical (main)' ;
'Free and open source programs   supported by community (universe)'
' Programs restricted by copyright and legal issues (multiverse)'

Under 'Other programs' choose the following 3

'Canonical partners, applications of partners packed by Canonical' ;
'Independent, Applications of other developers'
'Independent (source code), Applications of other developers';

Open Software Update by searching the dash and update it.
Install Synaptic Package Manager with this command:
<code>sudo apt-get install synaptic
</code>
or by searching the Software Center for Synaptic
Search for skype and right click. Choose mark for Installation and the click Apply.
Now your installation is finished, test it!
Comment: Tim hi, this new text is excellent work ! One addition, if possible: Synaptic application can be installed also from 'Ubuntu Application Selection' (correct name in English ??) just by writing 'Synaptic' and clicking it for installation.  Brsgs, Kauko
Comment: @KaukoPeltonen Pleasure :) I take it you realise why I edited the question and put it into an answer - this page may explain more http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/?
Comment: Tim hi, excellent ! Could you or someone forward this new edited text for those who make / issue Ubuntu iser instructions, so that other persons - perhaps - couild utilize this ''click - click'' installation method in case they hesitate to utilize terminal installation method.  I do not know how to do it. Brds, Kauko
Comment: One more possible addtion to this text might be: ''After your testing is OK, you can add skype-pigin and skype-empathy packages with Synaptic later to your Skype in case you want to have Pigin and Empahty features also.'' Brgds, Kauko

Install Skype on Ubuntu 14.04


According to non-Trinitarians, why did God allow trinitarianism to become the mainstream understanding of His nature?

Question: According to non-Trinitarians, if God's nature is not adequately portrayed by trinitarian theology, then why did God allow such an erroneous understanding of His nature to become so widespread among the members of the Church, the Bride of His Son? If God has the power and the prerogative to intervene in historical events, then why hasn't God made use of His divine privileges to ensure that the correct doctrine about His nature achieves widespread acceptance?
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/127758/discussion-on-question-by-spirit-realm-investigator-according-to-non-trinitarian).
Answer: (I assume that by "the Church" the OP includes the Roman Church and probably its Protestant daughter denominations too.)
This question implies that "the Church" is God's church.
The problem with this is that non-Trinitarians in general don't believe that what the question refers to as "the Church" is actually God's Church.
Jesus referred to the faithful as a "little flock" (Luke 12:32).
God's church is small:

"For many are called, but few are chosen."
— Matthew 22:14

"Enter by the narrow gate; for wide is the gate and broad is the way that leads to destruction, and there are many who go in by it.
Because narrow is the gate and difficult is the way which leads to life, and there are few who find it. — Matthew 7:13–14

The "god of this age" (2Corinthians 4:4), which most of nominal Christianity follows, is not the leader of God's church.

"Beware of false prophets, who come to you in sheep's clothing, but inwardly they are ravenous wolves. — Matthew 7:15

That organizations calling themselves "Christian" happen to teach false beliefs to their members in no way means that the members of God's Church hold these beliefs.

For such are false apostles, deceitful workers, transforming themselves into apostles of Christ.
And no wonder! For Satan himself transforms himself into an angel of light.
Therefore it is no great thing if his ministers also transform themselves into ministers of righteousness, …
— 2Colossians 11:13–15

The idea that God is currently trying to save the world is almost blasphemous.
It implies that his plan is failing miserably.
Only a few, the elect, will be saved during this age.

In fact, unless that time of calamity is shortened, not a single person will survive. But it will be shortened for the sake of God's chosen ones.
— Matthew 24:22 (NLT)

By allowing the world to deteriorate until it is almost destroyed by mankind, God sets an example of what happens when people follow Satan and decide for themselves what is right or wrong.
Comment: @Lesley, the question asked for a non-Trinitarian point of view.  Most (all?) non-Trinitarians, believe that the Roman Church and its daughter Protestant denominations are definitely *not* part of God's Church.  I've added a clarification at the top of the answer.
Comment: Forgive me for being slow on the uptake, but are you saying that Trinitarians are not part of the Church established by Christ Jesus, or are you saying that those denominations opposed to the Trinity are not part of God's church?
Answer: The standard historical answer is that the Church Fathers were heavily influenced by Greek culture and philosophical concepts, and imported those into Christianity. You then add to that a top-down imposition by Emperor Constantine, in particular.
Since about AD 400, anyone who said otherwise was persecuted. Remember you have Church monopolies in much of Christendom starting with it becoming a state religion in the Roman Empire. Even the Protestant reformation basically swapped a Catholic church monopoly in a given region with a Protestant state based monopoly. However, soon after the Protestant reformation (starting ~1500), you have non-trinitarian groups starting to emerge.
Servetus (~1550) was perhaps the earliest high-profile example, being a part of the Protestant Reformation but then in turn being executed for his Unitarian beliefs in 1553 by Protestants. Frances David was instrumental in the King of Hungary becoming a Unitarian (~1567). Socinus (~1580) was working with various Christian groups at the time, such as the Polish Brethren, and was widely influential. There were many Arian groups starting around the time as well. Racovian catechism 1605. John Biddle (~1650), believed to have translated the Racovian catechism into English, was imprisoned for his beliefs by Protestants but then exiled by Cromwell to avoid a trial. So very soon after the Catholic monopoly was lifted, many Unitarian movements started.
Jumping forward to the next century, we have Swedenborg 1750. By around that point, there were high-profile Unitarians in what would become the United States, such as John Adams. Mormonism 1820. Transcendentalism (such as Ralph Waldo Emerson) 1830's. JWs 1870's. Christian Science and related New Thought churches became a significant movement in the late 1800's and early 1900's. Similarly, it seems there is currently an uptick in Biblical Unitarianism.
Now for the theology. I think your question requires certain theological presuppositions that I don't hold. I would say blaming the Holy Spirit (i.e., God) isn't right - humans are in a fallen state, why would that not apply to collective theological beliefs?
From God's perspective, though, which beliefs are most important? Presumably those relating to salvation. Although trinitarians often hold that belief in the trinity is required for salvation, I am not sure the position is symmetrical with biblical unitarians. Indeed, God may not agree with trinitarians on this! Although trinitarianism is generally held to be some form of small 'i' idolatry among biblical unitarians, or perhaps just a conceptual error, when it comes to salvation emphasis seems to be placed on what John emphasized at the end of his Gospel (compare Matthew 16:15-17).

"But these are written so that you may believe that Jesus is the
Christ, the Son of God, and that by believing you may have life in His
name." (John 20:31)

The Bible doesn't say anything directly about trinitarianism, so to biblical unitarians it would be surprising that salvation requires belief in that! Both trinitarians and biblical unitarians believe that Jesus is the Christ and Son of God. They differ about whether he is God the Son, but that doesn't seem to be what is required in order to have eternal life, i.e., salvation, according to John.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/123883/discussion-on-answer-by-one-god-the-father-according-to-non-trinitarians-why-di).
Answer: Why did God allow trinitarianism to become the mainstream understanding?
It's not so much why did God allow... but, as we'll see, why didn't He?
If we go back to the Garden we'll start to see a theme in God's interactions with His creation.

The Garden of Eden contained two trees - one a catalyst for evil, and the serpent who capitalised on this feature to tempt the first humans.

Clearly, God was not 'trying' to keep the perfect beginning perfect for long. He put in place the ingredients for it to get nasty quite soon. Whatever Adam's/Eve's nature and gifting was at the start, they were no match for the 'prince of the power of the air'.
God gave them some instructions, but He didn't seem to bother putting up warning signs and an electric fence to keep them away from evil. It was readily accessible. Neither did God banish the 'serpent' from this glorious beginning to another galaxy at least!
God starts something grand and let's evil have its way - to a point, and for a purpose, of His design.

His nation Israel - a small nation with nothing particular to say, "Pick me!"

For you are a holy people to the LORD your God; the LORD your God has chosen you to be a people for His personal possession out of all the peoples who are on the face of the earth. Deut 14:12

7"The LORD did not make you His beloved nor choose you because you were greater in number than any of the peoples, since you were the fewest of all peoples, 8 but because the LORD loved you and kept the oath which He swore to your forefathers Deut 7:6

God did choose them and so began a tale of drama and tragedy with a promise of greatness, which all peoples would benefit from.

All peoples on earth will be blessed through you and your offspring. Gen 28:14

Every one of God's chosen servants and prophets lived a life of distress and disappointment. The trust placed in their hearts was often the only thing they had to live on - hoping for a better tomorrow - even if it was millennia away!

To this day Israel has a veil over its eyes and hearts.

I do not want you to be ignorant of this mystery, brothers and sisters, so that you may not be conceited: Israel has experienced a hardening in part until the full number of the Gentiles has come in Rom 11:25

And even if our gospel is veiled, it is veiled to those who are perishing, 4in whose case the god of this world has blinded the minds of the unbelieving so that they will not see the light of the gospel of the glory of Christ, who is the image of God. 2 Cor 4:3

But their minds were hardened. For to this day, when they read the old covenant, that same veil remains unlifted, because only through Christ is it taken away. 2 Cor 3:14

God does what God does. He shapes matters according to His will and sovereign plans for the good of all. (not apparently obvious in this age, but the one to come)

Why would the experience of the church be any different?

A fantastic beginning - the Messiah raised from the dead, the spirit given with wonders and signs, 1000's saved, and then as the apostles died the errors crept in. New teachings of men and political powers subverted the original truth about God's son and His plan for man. Perhaps some seemed innocent enough, but they distracted from the gospel and its simple message. Just as the serpent distracted the first humans from the words of God, so the strange teachings about Jesus' deity and other matters took away the focus Jesus had left with his anointed Apostles.

God has not rejected His people whom He foreknew. Do you not know what the scripture says of Elijah, how he appeals to God against Israel? 3"Lord, they have killed your prophets, they have demolished your altars, and I alone am left, and they seek my life." 4But what is God's reply to him? "I have kept for myself seven thousand men who have not bowed the knee to Baal." 5So too at the present time there is a remnant, chosen by grace. Rom 11:2

That the bible has been brought together with extreme effort and sacrifice, and yet also tampered with over the centuries is evidence enough that God's very (written) word is not untouchable - hence the church is greatly impacted. Not to mention all the other religions which, in part exist, because the church struggled to keep momentum and grow!

God could have stopped all kinds of evil before it began - but he did not. He never has unless it interferes with His plan. The story of Joseph is testament to that reality. There is good in there, but the woe and trial, the death and deceit is ever-present. Rather God steers evil for His purposes in this age of flesh until the appointed time is at hand.
According to plan, His son has defeated the source of evil and now waits on the Father to send him back to claim the spoils of victory already won.
If God has the power? There is no IF about it. It's more about timing not power.
Why hasn't God made use of His divine privileges? He hasn't yet in obvious fashion! But He has always interceded and worked things out according to His plan and nothing will cause Him to change course dealing with unexpected evils.
How do Non-Trinitarians answer? Trinitarian brothers and others who are believing in the same God who made all things and His son Jesus who died to save all men from an eternal death, are yet to see the plain truth of God's word and grasp the glorious victory Jesus has won - not by being God - but by being not God!

Indeed, he was made like us in every respect. Heb 2:17

A God/man is not like us at all!
The reality of this simple statement is foundational to understanding the bible without a pre-set bias - this bias caused by deception is allowed for a time - just as it has always been. God knows what He is doing, and the church/Christianity - in the terrible mess that it is in, is without the wisdom or the power to meet the world's needs or challenges. It will be prepared to be the pure and holy bride - it most certainly is not ready now.
Conclusion:
God doesn't need this age to be perfect. He fully intended to allow evil to strike at the heart of all He has prepared - knowing that in time, all will be restored and so much better than before. It will be better because it has experienced evil and the lies and deception that accompany evil.
Many are confused by this reality - thinking God should be able to make it right and keep it right. But the entire Bible tells a different truth if they are willing and able to see it. All will see it eventually.
Trinitarianism and many other heresies are part of the struggle He has allowed Christianity to endure. Just as it endures political forces and persecution in many ways.
God usually works with the smaller group, the struggling ones with little money, little influence and small resources. God wins out with small armies against larger armies, the isolated and victimised, the poor and the hungry - so long as those little ones trust and honour the 'one true God' Jesus and the other prophets taught about. No one can claim to be better than anyone else to know the truth of the Bible kept for us, it is only by God's grace that anyone can see the deception in the broader church. We can know by reading, but only with eyes to see and ears to hear will it make sense. Like Israel, His chosen people of promise, God will open their eyes and ears eventually when the time is right.
The deception that began in the Garden is absolutely thriving today. It is lie upon lie over the centuries that has caused there to be such deep confusion about God's word. It does not teach a trinity, an incarnation, a 'God the Son' deity, a holy spirit deity, an immortal soul, an eternal suffering in 'hell', and a lot of other things that most hold dear as non-negotiables. From the accounts of those God has called to His service, we can see how the church is no different. It will not be huge, wealthy, glamorous, powerful in the world, political. It will be small, powerful in spirit, poor and reliant on God not riches, and wise and it will hold to the word of God without adding in anything imaginative.
God has allowed this deception within Christianity because He is not saving the world now. He is saving a 'few' by comparison.
I have no doubt there will be trinitarians in the first resurrection. God is much bigger than labels and looks on the heart. He does not save through the church - he saves through Jesus. The church is the body of Jesus, not the head. (He may well 'cut off some parts' that are not serviceable and restore them at another time)
Comment: Non trinitarian here.   Never have believed Jesus to be a mere man.  @Adam
Comment: Yeah this question really is a subtext of the whole "why does God permit evil question".
Comment: @SpiritRealmInvestigator many who believe in a large-scale apostasy also believe in some form of restoration. This would be something like the end-times revival, reminiscent of the book of Acts, that you describe. I see a recurring pattern of apostasy & restoration in the Bible, including Enoch, Moses, John the Baptist--the people had fallen into error vs. what had been taught before, and God sent them to correct those errors and restore truth.
Comment: I do not like manmade labels, Unitarian is another label, forced into usage by other labels. What ever transpires, the church should not need labels within itself, denominations are not of God. There must be some foundational change before the end.
Comment: +1 for a gracious answer. " It is the glory of God to conceal a thing: but the honour of kings is to search out a matter.  - Proverbs 25:2
Comment: Do you believe that God will soon initiate an end-times revival, reminiscent of the book of Acts, in which the falsehood of the trinity will be exposed and the true doctrine about God's nature will be preached? A unitarian revival of some sort, for example? Is this something that unitarians expect will happen eventually in the near future?
Comment: The reality is this, a Christian follows Christ (Jesus).  Unitarian/Arian/non-trinitarian is following a mere man who is essentially worthless in the story of salvation. A mere man cannot give up himself as a sacrifice for the sins of all humanity. If that were true, then all the thousands of martyrs who have died for God have paid the price for sin so many times over, i would argue even the Devil himself is now saved! From a unitarian perspective, we are all "Sons of God", so any of us could be the sacrifice!
Comment: @ Kris agreed I should have made the distinction. Your denomination has a unique view of Jesus...it's easy to forget that. I should have added, "with the exception of JW's..." my bad and apology for that oversight.
Answer: For the record, I do not speak for all Non-Trinitarians, but simply aim to present a Biblical answer to the following question:

If God has the power and the prerogative to intervene in historical
events, then why hasn't God made use of His divine privileges to
ensure that the correct doctrine about His nature achieves widespread
acceptance?

God certainly could use His power to control everything, if not for His allowance of choice. God guides, yes, but He leaves it up to the individual whether or not they will heed His advice, as recorded here:

Deut. 30:15, 19

15Today I am giving you a choice between good and evil, between life and death.19I am now giving you the choice between life and death, between God's blessing and God's curse, and I call heaven and earth to witness the choice you make. Choose life.(Good News Bible: Today's English Version. New York: United Bible Societies, 1992.)

One of the things that God advises His people to do, through the apostles, is to be careful of the doctrines they believe in:

Eph. 4:14

14that we should no longer be children, tossed to and fro and carried about with every wind of doctrine, by the trickery of men, in the cunning craftiness of deceitful plotting,(Holy Bible: New King James Version. Nashville, Tennessee: Thomas Nelson Publishers, 1982.)

When it comes to God's nature, human beings have been prone to thinking up "foolish ideas of what God [is] like," going as far as to accidentally deify what was created, instead:

Rom. 1:21, 25

21Yes, they knew God, but they wouldn't worship him as God or even give him thanks. And they began to think up foolish ideas of what God was like. As a result, their minds became dark and confused.25They traded the truth about God for a lie. So they worshiped and served the things God created instead of the Creator himself, who is worthy of eternal praise! Amen.(Holy Bible: New Living Translation. Wheaton, Illinois: Tyndale House Publishers, Inc., 1996.)

In particular, the Apostle Paul feared that peoples' minds would be corrupted in accepting a different Jesus and a different Spirit:

II Cor. 11:3-4

3But I fear, lest somehow, as the serpent deceived Eve by his craftiness, so your minds may be corrupted from the simplicity that is in Christ. 4For if he who comes preaches another Jesus whom we have not preached, or if you receive a different spirit which you have not received, or a different gospel which you have not accepted—you may well put up with it!(Holy Bible: New King James Version. Nashville, Tennessee: Thomas Nelson Publishers, 1982.)

However, people will not always heed God's advice, in which case those people have no one to blame but themselves:

Prov. 1:30-31

30You people refused to listen to my words of advice. You would not listen to me when I showed you the right way. 31You people lived the way you wanted to live. You followed your own advice. So now you must accept the result of your own actions!(Holy Bible: Easy-to-Read Version. Fort Worth, Texas: World Bible Translation Center, Inc., 1999.)

In fact, very few people actually choose life, indicating that the doctrine they believe in would not be widespread, with many more ending up on the road to hell:

Matt. 7:13-14

13Go in through the narrow gate, because the gate to hell is wide and the road that leads to it is easy, and there are many who travel it. 14But the gate to life is narrow and the way that leads to it is hard, and there are few people who find it.(Good News Bible: Today's English Version. New York: United Bible Societies, 1992.)

It is foretold that those who would be consumed by fire, one thousand years after Judgment Day, would be as numberless as sand along the shore:

Rev. 20:7-9

7When the thousand years end, Satan will be let out of his prison. 8He will go out to deceive the nations of the world and gather them together, with Gog and Magog, for battle—a mighty host, numberless as sand along the shore. 9They will go up across the broad plain of the earth and surround God's people and the beloved city of Jerusalem on every side. But fire from God in heaven will flash down on the attacking armies and consume them.(The Living Bible: Paraphrased. Wheaton, Illinois: Tyndale House Publishers, 1971.)

As the choosing of death is widespread, so too, then, unfortunately, is the rejection of the truth.
Comment: "As the choosing of death is widespread, so too, then, unfortunately, is the rejection of the truth." Reminds me of Noah's generation and of the thought" majority could not possibly be wrong". But what became of the majority back then? millions died and only 8 people spared.
Answer: This answer draws and expands upon key points made by Emanuel Swedenborg (1688–1772), an 18th century scientist, philosopher, and theologian. During his theological period, which covered the last three decades of his life, Swedenborg rejected the Nicene Trinity of Persons. Instead, he taught a Trinity of "essential components" in a single Person of the Lord God Jesus Christ. For a plain English explanation of Swedenborg's Trinity, please see my article:
Who is God? Who is Jesus Christ? What about that Holy Spirit?
Summary
Swedenborg believed that by the time of the Council of Nicaea in 325 AD, when the Trinity of Persons first began to be established as orthodox Christian doctrine, the Christian Church was fast becoming corrupted by a desire for power and wealth on the part of its leaders. This caused its leaders to adopt doctrines such as the Trinity of Persons that would allow them to arrogate the power of Christ to themselves.
The alternative to the Trinity of Persons was Arianism, which ultimately denied the divinity of the Son, and thus of Christ. The primary doctrinal reason the Council of Nicaea was called was to condemn and reject the teaching of Arius about the Godhead. If this had not been done, Christianity would have died altogether.
By adopting the Trinity of Persons, a corrupt Christian leadership would still preach that Jesus is divine. The common people, who listen in simplicity to what their clergy teach them, could still be saved by a Christian faith and life.
In short, the reason God allowed the Trinity of Persons to become the primary doctrine of the Christian Church even though it is unbiblical and false is that the alternative was to allow the Christian Church to be rapidly destroyed, leaving the sheep without a shepherd.
Now for a fuller version.
1. Christ's church is founded upon a belief in his divinity
In Matthew 16:13–20 we read:

When Jesus came to the region of Caesarea Philippi, he asked his disciples, "Who do people say the Son of Man is?"
They replied, "Some say John the Baptist; others say Elijah; and still others, Jeremiah or one of the prophets."
"But what about you?" he asked. "Who do you say I am?"
Simon Peter answered, "You are the Messiah, the Son of the living God."
Jesus replied, "Blessed are you, Simon son of Jonah, for this was not revealed to you by flesh and blood, but by my Father in heaven. And I tell you that you are Peter, and on this rock I will build my church, and the gates of Hades will not overcome it. I will give you the keys of the kingdom of heaven; whatever you bind on earth will be bound in heaven, and whatever you loose on earth will be loosed in heaven." Then he ordered his disciples not to tell anyone that he was the Messiah.

The Roman Catholic Church commonly interprets this exchange to mean that Christ would found his church on Peter. It and other churches that claim apostolic succession believe that this gives the Church the authority to wield the power of Christ in administering the matters of the Christian Church, its people, and their salvation.
Swedenborg entirely rejected this interpretation. Instead, he said that it was Peter's statement, "You are the Messiah [or the Christ], the Son of the living God," upon which Christ was saying he would found his church.
In this understanding of Matthew 16:13–20, the Christian Church would be founded upon the belief that Jesus Christ is divine, and is God. If Christ is not divine, the Christian Church has no foundation.
Incidentally, Swedenborg also rejected the idea that the keys to the kingdom of heaven were given to Peter personally, and that this gave the Church the power to open and close heaven to people. Rather, he said that the passage refers to Christ's power to save "people who from a heartfelt faith have that confession of Peter" (Apocalypse Revealed #798).
2. Arianism threatened the foundation of the Christian Church
To this day, scholars debate exactly what doctrine about God Arius taught. However, due to teachings widely attributed to him—that the Son was subordinate to the Father, and that he was a creature of God (i.e., a created being)—the general tendency of Arianism was to make Christ less than God. This doctrine, followed to its logical conclusion, would ultimately result in the rejection of Christ's divinity.
Therefore if Arianism had been allowed to prevail in the church, it would have destroyed the foundation of the Christian Church, and the Church would have quickly fallen into ruins.
3. The Trinity of Persons fully affirmed the divinity of the Son of God.
In order to combat the Arians and their doctrine, the opposing Christian leaders had to formulate a doctrine that unequivocally affirmed the divinity of the Son of God. This the Trinity of Persons did, by proclaiming that the Son of God was begotten from eternity (which is not a biblical teaching), was a distinct "Person" of God (which is also not a biblical teaching), and was of the same substance as the Father (which draws more on Greek and Roman philosophy than on the Bible).
Although this doctrine introduced heresy after heresy into the church, it preserved the Christian Church's existence by affirming the divinity of Jesus Christ. This saved the church's foundation from destruction, and the church from rapid collapse.
4. The Trinity of Persons was the result of a corrupted church leadership
By the time the Council of Nicaea was called in 325 AD, the Christian Church had long since lost the brotherly love that had bound the early Christians together. It was now divided into warring camps, each attacking, anathematizing, and excommunicating the others.
In this atmosphere, the leadership of the Church could not accept the simple faith of the early Christians that Jesus Christ was "God with us" (Matthew 1:23), and that "in him dwells all the fullness of the Godhead bodily" (Colossians 2:9). Such a faith would require the complete humility of the Church's leaders at the feet of the Lord God Jesus Christ.
But these were not humble men. The Christian Church was fast becoming a State Church under the Roman Emperor Constantine. Its leaders wanted the power that association with the power of Rome would give them.
It would take too much time to explain how the Trinity of Persons allowed them to arrogate Christ's power to themselves. For now, just two points:

It was a strategy of "divide and conquer": divide God into three, and then conquer the church and the world using that dogma.
By making the human nature of Jesus like the humanity of any other man, it allowed the church leaders, as mere human beings, to step into the shoes of Jesus, and wield his power over the laypeople of the Christian Church.

On the practical level, it is a matter of history that from the time of Nicaea onward, armed with the doctrine of the Trinity of Persons and the power of the State, the Christian Church steadily accumulated more and more worldly wealth and power, until kings bowed down to popes, and the church was fabulously wealthy while the common people lived in poverty.
5. This made it possible for a corrupt church leadership to still preach Christ to the people
The Christian Church became more and more corrupt and worldly from the time of Nicaea onward. And yet, there were millions of ordinary good people—the sheep of the Lord's pasture—under its tutelage.
Because Christian leaders had adopted the Trinity of Persons, they continued to preach to the common people that Jesus Christ was divine. The common people did not understand the highly abstract and confusing doctrine of the Trinity of Persons. They only absorbed a belief that Jesus is the Son of God, and that believing in him and living by his commandments was the path to salvation.
6. The Trinity of Persons made it possible for good people to be saved even though the leadership of the Christian Church was increasingly corrupt
This is why God allowed the Trinity of Persons to become the reigning doctrine about God in the historical Christian Church.
It was a doctrine that the leadership of the church, which was motivated primarily by power and wealth, could accept, because it allowed them to arrogate Christ's power to themselves, and thus lord it over the people.
But it was also a doctrine that allowed laypeople of simple faith to accept Jesus as their God and Savior, and be saved by that faith and a life according to it.
The leadership of the Christian Church had become "like unmarked graves, which people walk over without knowing it" (Luke 11:44). Laypeople could have a simple saving faith in Jesus even as their leaders in the clergy brought spiritual death upon themselves by continually striving for wealth and power.
This vast accumulation of wealth and power by the Christian clergy, and the corruption that accompanied it, is a matter of history—as anyone who reads the ugly history of the Christian Church with objective eyes can see.
And yet, despite the rampant corruption among the clergy, millions of ordinary Christians of good heart and simple faith could continue to be saved, and make their eternal home in the heavenly kingdom of God.
This is the wisdom and power of Divine Providence, which uses evil humans and their false doctrines to accomplish God's own good and eternal goals.
7. Sources in Swedenborg's writings
The above answer is my formulation as a Swedenborgian scholar and minister. Swedenborg's statements on this subject are scattered throughout his writings, and require some familiarity with his overall theology to fully appreciate.
However, for those who wish to go to the source, here are several key passages in Swedenborg's theological writings:

Divine Providence #262 discusses the proposition that "Doubts about divine providence may be raised by the fact that all Christendom worships one God in three persons, which is really three gods."
Divine Providence #257 discusses the proposition that "Strict materialists justify their rejection of divine providence by observing that in many nations where Christianity is accepted, there are people who claim divine power for themselves and want to be worshiped as gods and who call upon the dead."
True Christianity #632 discusses the proposition that "The concept of a faith that assigns us the merit and justice of Christ the Redeemer first surfaced in the decrees of the Council of Nicaea concerning three divine persons from eternity; from that time to the present this faith has been accepted by the entire Christian world."
True Christianity #636 discusses the proposition that "The concept of a faith that assigns the merit of Christ was completely unknown in the apostolic church that existed before the Council of Nicaea; and nothing in the Word conveys that concept either."
Swedenborg discusses the meaning of "Peter" and "the keys" in Matthew 16:13–20 in a number of places in his theological writings. Three of his clearest statements in rebuttal of the Roman Catholic Church's interpretation of these verses occur in Arcana Coelestia #2760; Apocalypse Revealed #768, 798.

Each of these passages offers source material on the reasons God allowed the Trinity of Persons to become the reigning doctrine in the Christian Church even though it is a human tradition that is unbiblical and false. Keep in mind that this material was written in the 18th century, and did not have the benefit of some of our present-day scholarship about Christian history.
Comment: You are invited https://chat.stackexchange.com/rooms/132181/not-the-trinity
Answer: According to non-trinitarians, if God's nature is not adequately portrayed by trinitarian theology, then why did God allow such an erroneous understanding of His nature to become so widespread among the members of the Church, the Bride of His Son? If God has the power and the prerogative to intervene in historical events, then why hasn't God made use of His divine privileges to ensure that the correct doctrine about His nature achieves widespread acceptance?
Its all part of our God and Father's master plan of redeeming the entire Creation back to Himself, in His Timing and according to what pleases Him.
The garden is infested with corruption from the king of lies.  Our Father, the eternal 1 Farmer, is restoring His garden back to its intended glory on the earth.  He has laid out this way in scripture by calling few to be a remnant of Truth and a light in the darkness.  Right now, our high priest - the Risen Son, is calling priests to his better order.  These will be the kings and priests of the next age.  In the end days of this old and dying age, all Truth will be revealed by the Will of God.
Luke 12:2 KJV

For there is nothing covered, that shall not be revealed; neither hid, that shall not be known.

Jesus makes a clear distinction between those who will be allowed into the wedding feast and those who will not be ready:
Matthew 22:14 KJV

For many are called, but few are chosen.

Matthew 20:16 KJV

So the last shall be first, and the first last: for many be called, but few chosen.

What does this mean and why did our Master and teacher say this phrase more than once?  Who are the virgins with oil? ...the few?
Matthew 7:13-14 KJV

13 Enter ye in at the strait gate: for wide is the gate, and broad is the way, that leadeth to destruction, and many there be which go in thereat:
14 Because strait is the gate, and narrow is the way, which leadeth unto life, and few there be that find it.

John 15 KJV

16 Ye have not chosen me, but I have chosen you, and ordained you, that ye should go and bring forth fruit, and that your fruit should remain: that whatsoever ye shall ask of the Father in my name, he may give it you.
17 These things I command you, that ye love one another.
18 If the world hate you, ye know that it hated me before it hated you.
19 If ye were of the world, the world would love his own: but because ye are not of the world, but I have chosen you out of the world, therefore the world hateth you.`

Paul speaks of the Remnant spoken of throughout the Old Testement.
Romans 9 NASB

25...."I will call those who were not My people, 'My people,'
And her who was not beloved, 'beloved.'"
26 "And it shall be that in the place where it was said to them, 'you are not My people,'
There they shall be called sons(children) of the living God(YHWH)."
27 Isaiah cries out concerning Israel, "Though the number of the sons of Israel be like the sand of the sea, it is the remnant that will be saved;

There are several instances throughout Revelation where John references an end times remnant.
Revelation 12:17 KJV

And the dragon was wroth with the woman, and went to make war with the remnant of her seed, which keep the commandments of God, and have the testimony of Jesus Christ.

In conclusion, the fact that Trinitarians are by far the LARGEST SECT of the MOST POPULAR religion of the WORLD, disqualifies the irrational man made theory from being the 1 Truth within the mind of our God.
.....But then again....simply using these 2 quotes of Jesus disqualifies the trinity much more efficiently.....ears to hear:
Mark 12:29-30

29 And Jesus answered him, The first of all the commandments is, Hear, O Israel; YHWH our God is 1 Lord:
30 And thou shalt love YHWH elohim with all thy heart, and with all thy soul, and with all thy mind, and with all thy strength: this is the first commandment.

John 17:3 KJV

And this is life eternal, that they might know thee the only true God, and Jesus Christ, whom thou hast sent.


ISP acting as NAT

Question: I need to host a Server on Public IP in france. I heard from some where that some ISPs will act as NAT and will block all inbound connections. Do anyone have any information on such service providers?
Comment: Yes, some **consumer** ISPs use carrier-grade NAT. For more information, you will need to ask them directly. If you're hosting a server in a datacenter, you'll need a "real" ISP, and these certainly will not be using NAT.
Comment: Why don't you ask your ISP?
Answer: Yes, there are plenty of those providers, however, I have yet to see one which sells Business-grade services. (Datacenter hosting, ISP with Business customers). It's mostly used in consumer deployments. Reasons are described in other answers here.
Answer: Yes, some ISPs do NAT. And they are often not communicating this fact clearly enough for all customers to realize this before signing up for the service.
This practice is known as Carrier Grade NAT. You may see it mentioned with one of these other terms: CGN, Large Scale NAT, LSN, NAT444.
There is only one long term solution for this, which is IPv6. Deployment of IPv6 is lagging behind, but France is not lagging as far behind as the rest of the world, so you definitely should ensure your server gets an IPv6 address.
The optimal would be to get both IPv4 and IPv6 address on the server, but if you for some reason can only get one of the two, there are services, which can help you get access to the other protocol as well.
Answer: The pool of unallocated IPv4 addresses has been empty since September 2012, so ISPs will be running low on IPv4 addresses as they can't get any new ones. Expect to see ISP NAT, DS-Lite and MAP more and more.
Having your own IPv4 address is not feasible anymore these days. I wouldn't be surprised to see data centres with IPv6-only inside, and a shared IPv4-to-IPv6 translator in or near a load balancer.
Unfortunately IPv6 deployment (which is designed to solve this) is far far behind. Keep pushing your suppliers for IPv6 so that we can run 'real' networks again, instead of this NAT mess!
Comment: While not answering the question directly, it is still useful :)
Comment: Sander, you keep saying this, and it keeps not being true.  RIPE, for example, simply isn't out of unallocated addresses yet. [This graph](http://www.ripe.net/internet-coordination/ipv4-exhaustion/ipv4-available-pool-graph) shows that they had slightly less than 14 million unallocated v4 addresses as of 28/4/14 - for Europe. What they have been on since Sep 2012 is their last /8, which triggers more draconian allocation policies (PA-space to LIRs only in /22s, no PI-space).  ICANN has no more `/8`s to give out, it is true, but "*the pool of unallocated v4 addresses*" simply isn't empty yet.
Comment: @MadHatter: I know that policy very well (I'm the co-chair of the RIPE address-policy working group, so I should know). There is indeed a pool of /22s where every LIR can get *one* /22. That is done so that everyone (and especially newcomers) in the internet business can have *some* IPv4 addresses so they have some chance of survival, but it is not something you can run an ISP or hosting business on without having to jump through NAT hoops. But as an LIR, once you get your single /22, there are no more IPv4 addresses to be had. So for practical purposes RIPE *has* run out.
Comment: Sander, I'm sorry, I had no idea.  Yes, of course you would know the current allocation state very well, and I apologise for checking you on it.  I also agree that exhaustion is close, and you will know from elsewhere on SF that I'm a big fan of ipv6 and work to put it in everywhere I can.  Nevertheless, I don't think anyone's life is improved by inaccuracy and scaremongering, so I hope you will forgive me for making my point.  Your statement above, which seems to boil down to our being in the last days of ipv4 availability, is cogent, precise, and should be widely read.
Comment: @MadHatter No apologies necessary! I do try to simplify the message to avoid confusing newbies. RIPE would have run out in October 2012 if the last /8 hadn't been saved so new ISPs still have a chance to compete with the existing ones. Some people preferred a complete runout, but imagine  an internet where every new ISP or data centre has to buy/rent/beg an existing ISP for some IPv4 addresses? When RIPE policy proposal 2010-02 (Allocations from the last /8) was introduced, one thought was about Neelie Kroes blaming us for abuse of monopoly and encouraging anticompetitive behaviour ;)  Cheers!

ISP acting as NAT


When to catch java.lang.Error?

Question: In what situations should one catch java.lang.Error on an application?
Comment: See also http://stackoverflow.com/questions/2679330/catching-java-lang-outofmemoryerror
Answer: Generally, never.
However, sometimes you need to catch specific errors.
If you're writing framework-ish code (loading 3rd party classes), it might be wise to catch LinkageError (no class def found, unsatisfied link, incompatible class change).
I've also seen some stupid 3rd-party code throwing subclasses of Error, so you'll have to handle those as well.
By the way, I'm not sure it isn't possible to recover from OutOfMemoryError.
Comment: It sometimes makes sense to catch OutOfMemoryError - for example when you are creating large array lists.
Comment: That I had to do exactly to load DLLs, that would fail if they were not correctly configured.  Not a fatal error in case of this application.
Comment: @SpaceTrucker: does that approach work well in multithreaded applications, or is there a significant risk that smaller allocations in other threads fail because of it? … presumably only if your arrays were just small enough to be allocated, but left nothing for anyone else.
Comment: @PJTraill I'm not sure about that. This would require some real world statistical samples. I thought I had seen such code, but can't remember where it was.
Comment: It is very possible to recover from OutOfMemoryError if by throwing that error large amounts of memory have been unlocked for the GC to process. It however indicates a major flaw in the code or JVM setup, so it should not be done lightly.
Answer: Never. You can never be sure that the application is able to execute the next line of code. If you get an OutOfMemoryError, you have no guarantee that you will be able to do anything reliably. Catch RuntimeException and checked Exceptions, but never Errors.
http://pmd.sourceforge.net/rules/strictexception.html
Comment: Never say never.  we have testing code that does an "assert false;" then catches the AssertionError to makes sure that the -ea flag is set.

Other than that...yeah, probably never ;-)
Comment: Never...except when you absolutely need to.  Never is a strong word and there are always exceptions to the rules.  If you are building a framework, it's not that unlikely that you will have to catch and handle certain errors, even if it is just to log.
Comment: How about a server application that hands requests off to worker threads. Might it not make sense to catch Throwable on the worker thread to trap any errors, and at least try and log what's gone wrong?
Comment: The catching and suppressing of Errors (or repackaging them as something else) is the biggest cause of rogue undead zombie threads running untethered in production systems wrecking havoc
Comment: How about errors e.g. NoSuchMethodError that is coming from third party library methods?
Comment: @OutlawProgrammer Just for the record, there are other ways to do the same test: `boolean assertionsEnabled = false; assert assertionsEnabled = true;`
Answer: Generally you should always catch java.lang.Error and write it to a log or display it to the user. I work in support and see daily that programmers cannot tell what has happened in a program.
If you have a daemon thread then you must prevent it being terminated. In other cases your application will work correctly.
You should only catch java.lang.Error at the highest level.
If you look at the list of errors you will see that most can be handled. For example a ZipError occurs on reading corrupt zip files.
The most common errors are OutOfMemoryError and NoClassDefFoundError, which are both in most cases runtime problems.
For example:
int length = Integer.parseInt(xyz);
byte[] buffer = new byte[length];

can produce an OutOfMemoryError but it is a runtime problem and no reason to terminate your program.
NoClassDefFoundError occur mostly if a library is not present or if you work with another Java version. If it is an optional part of your program then you should not terminate your program.
I can give many more examples of why it is a good idea to catch Throwable at the top level and produce a helpful error message.
Comment: In general, It may be helpful to catch `java.lang.Error` or `java.lang.Throwable` at top level and attempt to do something with it - say log an error message. But at that point there is no guarantee that this will get executed. If your JVM is OOMing, attempting to log may allocate more `String`s which triggers another OOM.
Comment: `ZipError` indicates that the jar file containing classes is a corrupted zip file. This is quite serious issue and at this point you cannot trust any code that gets executed and it would be irresponsible thing for attempting to "recover" from it.
Comment: i'd suspect its better in those cases to fail the daemon with proper alerts then to have the possibility of it staying alive as some etherial ghost on a failed jvm where it might give the false pretext that it is really alive and doing something
Comment: `OutOfMemoryError` is not a runtime error there's no guarantee that the application can recover from it. If you are lucky, you may get OOM in `new byte[largeNumber]` but if that allocation wasn't enough to cause OOM, it could be triggered in next line or next thread. This is runtime problem because if `length` is untrusted input it should be validated before calling `new byte[]`.
Comment: `NoClassDefFoundError` can occur _anywhere_, as it is invoked when compiled java code cannot find a class. If your JDK is misconfigured it can trigger from trying to use `java.util.*` class and it is practically impossible to program against it. If you are optionally including a dependency, you should use `ClassLoader` to check whether it exists, which throws `ClassNotFoundException`.
Comment: I agree too, though catching Error is considered bad practice but catching at highest level seems logical when you are advised not to show ANY technical stack trace in client facing UI, only some predefined messages. Problem is bug tracking tool PMD, Sonar etc keep insulting you :(
Answer: In multithreaded environment, you most often want to catch it! When you catch it, log it, and terminate whole application! If you don't do that, some thread that might be doing some crucial part would be dead, and rest of the application will think that everything is normal. Out of that, many unwanted situations can happen.
One smallest problem is that you wouldn't be able to easily find root of the problem, if other threads start throwing some exceptions because of one thread not working.
For example, usually loop should be:
try {
   while (shouldRun()) {
       doSomething();
   }
}
catch (Throwable t) {
   log(t);
   stop();
   System.exit(1);
}

Even in some cases, you would want to handle different Errors differently, for example, on OutOfMemoryError you would be able to close application regularly (even maybe free some memory, and continue), on some others, there is not much you can do.
Comment: Catching `OutOfMemoryError` *and continuing* rather than existing promptly is unwise because [your program is then in an undefined state](http://stackoverflow.com/a/8729011/545127).
Comment: calling system,exit on catching a throwable has the unintended consequence of killing everything running on the JVM and not just the application in question. Not usually a good practice for web applications that might be hosted on an app server with other web applications (not to mention it would impact the app server itself).
Answer: Very rarely.
I'd say only at the top level of a thread in order to ATTEMPT to issue a message with the reason for a thread dying.
If you are in a framework that does this sort of thing for you, leave it to the framework.
Answer: Almost never. Errors are designed to be issues that applications generally can't do anything about. The only exception might be to handle the presentation of the error but even that might not go as planned depending on the error.
Answer: An Error usually shouldn't be caught, as it indicates an abnormal condition that should never occur.
From the Java API Specification for the Error class:

An Error is a subclass of Throwable
  that indicates serious problems that a
  reasonable application should not try
  to catch. Most such errors are
  abnormal conditions. [...]
A method is not required to declare in
  its throws clause any subclasses of
  Error that might be thrown during the
  execution of the method but not
  caught, since these errors are
  abnormal conditions that should never
  occur.

As the specification mentions, an Error is only thrown in circumstances that are
Chances are, when an Error occurs, there is very little the application can do, and in some circumstances, the Java Virtual Machine itself may be in an unstable state (such as VirtualMachineError)
Although an Error is a subclass of Throwable which means that it can be caught by a try-catch clause, but it probably isn't really needed, as the application will be in an abnormal state when an Error is thrown by the JVM.
There's also a short section on this topic in Section 11.5 The Exception Hierarchy of the Java Language Specification, 2nd Edition.
Answer: If you are crazy enough to be creating a new unit test framework, your test runner will probably need to catch java.lang.AssertionError thrown by any test cases.
Otherwise, see other answers.
Answer: And there are a couple of other cases where if you catch an Error, you have to rethrow it. For example ThreadDeath should never be caught, it can cause big problem is you catch it in a contained environment (eg. an application server) :

An application should catch instances of this class only if it must clean up
  after being terminated asynchronously. If ThreadDeath is caught by a method,
  it is important that it be rethrown so that the thread actually dies.
Comment: Which is actually a non-issue because you simply do *not* catch `Error`s.
Answer: Very, very rarely.
I did it only for one very very specific known cases.
For example, java.lang.UnsatisfiedLinkError could be throw if two independence ClassLoader load same DLL. (I agree that I should move the JAR to a shared classloader)
But most common case is that you needed logging in order to know what happened when user come to complain. You want a message or a popup to user, rather then silently dead.
Even programmer in C/C++, they pop an error and tell something people don't understand  before it exit (e.g. memory failure).
Answer: In an Android application I am catching a java.lang.VerifyError. A library that I am using won't work in devices with an old version of the OS and the library code will throw such an error. I could of course avoid the error by checking the version of OS at runtime, but:

The oldest supported SDK may change in future for the specific library
The try-catch error block is part of a bigger falling back mechanism. Some specific devices, although they are supposed to support the library, throw exceptions. I catch VerifyError and all Exceptions to use a fall back solution.
Answer: it's quite handy to catch java.lang.AssertionError in a test environment...
Comment: What value are you trying to add?
Comment: adding the value of a test suite not aborting
Answer: Ideally we should not handle/catch errors. But there may be cases where we need to do, based on requirement of framework or application. Say i have a XML Parser daemon which implements DOM Parser which consumes more Memory. If there is a requirement like Parser thread should not be died when it gets OutOfMemoryError, instead it should handle it and send a message/mail to administrator of application/framework.
Answer: ideally we should never catch Error in our Java application as it is an abnormal condition. The application would be in abnormal state and could result in carshing or giving some seriously wrong result.
Answer: It might be appropriate to catch error within unit tests that check an assertion is made. If someone disables assertions or otherwise deletes the assertion you would want to know
Answer: There is an Error when the JVM is no more working as expected, or is on the verge to. If you catch an error, there is no guarantee that the catch block will run, and even less that it will run till the end.
It will also depend on the running computer, the current memory state, so there is no way to test, try and do your best. You will only have an hasardous result.
You will also downgrade the readability of your code.

When to catch java.lang.Error?


Distinguishing EC Public Key from random

Question: I recently read the post Distinguishing x25519 public keys from random? and found myself wondering why, for a randomly chosen
x, the result of the function $$x^3+ax^2+x$$ is a square in 50% of cases and not in the other 50%. I understand that in a finite field with an odd prime order, a randomly chosen x is a square in 50% of cases, but I don't see how this directly translates to the above claim.
Any help is appreciated. Thank you!
Answer: Argument towards $x^3+ax^2+x$ being a square modulo $q$ for around 50% of $x$ when $a,q$ are the parameters in Curve25519: we know $y^2\equiv x^3+ax^2+x\pmod q$ defines a proper elliptic curve group. By Hasse's bound it's order (number of elements) $N$ is* such that
$$\bigl|N-\left(q+1\right)\bigr|\,\le\,2\sqrt q\tag{1}\label{fgr1}$$
The elements can be classified as:

the unity of the group (aka point at infinity).
$(x,y)=(0,0)$, in which case $x^3+ax^2+x\equiv0\pmod q$ thus $x^3+ax^2+x$ is a square modulo $q$
other points $(x,y)\in[0,p]$ with $y^2=x^3+ax^2+x\equiv0\pmod q$.

Therefore there are $N-2$ points of the later kind. They go in pairs sharing the same $x\bmod q\ne0$, because if point $(x,y)$ satisfies the curve's equation and $x\bmod q\ne0$, then $(x,q-y)$ is a different point that also satisfies the curve's equation.
Therefore there are $1+(N-2)/2=N/2$ values of $x\in[0,q)$ with $x^3+ax^2+x\bmod q$ a square. That's a proportion $r=N/(2q)$.
Dividing $(\ref{fgr1})$ by $2q$, we get
$$\Biggl|\,\frac N{2q}-\left(\frac12+\frac1{2q}\right)\Biggr|\,\le\,\frac1{\sqrt q}\tag{2}\label{fgr2}$$
thus
$$\Biggl|\,r-\frac12\Biggr|\,\le\,\frac1{\sqrt q}+\frac1{2q}\tag{3}\label{fgr3}$$
And since $q$ is 255-bit, $r\approx1/2$ for all practical purposes.

* More precisely, for Curve25519, $p=2^{255}-19$ and $N=8\ell$ with $\ell=2^{252}+ 27742317777372353535851937790883648493$


Java query call to sybase db is not returning any value

Question: This is my application request flow:
An XML request is going to service layer, where the XML got parsed and set the value in to a domain object build in java. Then the builded domain object validated against the rules in JRules.
While validating, there is a complex query call from JRules BOM method to the sybase database. This method call is returning the values in my DEV and SIT environments with out any issue . But fails to return the value in UAT environment for few requests.
I had a chance to check the UAT logs and what i found is, that particular query failing to return any value if it's execution time is more than 800 ms. I found for few requests whose execution time is less than 750ms is returning the values with out issue.
I couldn't see any errors related to query timeout.
Is any where at the websphere level settings or at sybase level settings(DEFAULT_TIMEOUT_VALUE) affect this query execution to return nothing?
Answer: I got the reason for this issue. It seems there is a dead lock happening in that particular query call. This was noticed in service log. We are planning to introduce a retry mechanism.


Do enemies respawn indefinitely in target escort missions?

Question: Enemies spawn seemingly every round on target escort missions. Can I hang back and take care of them completely before proceeding, or will I end up fighting until they eventually overpower my troops?
Comment: Worth noting: enemies spawn based on your VIP's distance from the exit. If you don't move the VIP, no new enemies will spawn. This lets you clean up each wave and position your troops for the next one, then start gradually moving forward until you activate it.
Comment: @ChrisHayes So does that mean the total number of enemies will depend on how many times your vip moves?
Comment: @Benubird There are set trigger locations on the map that cause a wave to spawn once the VIP is within those triggers. I don't think any of the triggers are avoidable on escort missions, so the number of enemies you fight is always fixed.
Answer: There are a finite number of enemies.
The Target Extraction missions always end with the objective, "eliminate any remaining hostiles," unless you've already killed them all.
You can also move your squad into the extraction zone after the VIP and end the mission that way. However, you won't get your loot and any XCOM personnel outside the zone when you end the mission are lost.
XCOM wiki


Asymetric routing - causes and effects?

Question: It happens that I run across customers who have what I define as an "asymetric routing" in their networks. Simply said, they have two gateways on the same IP subnet. The clients are configured to point at one gateway (i.e. 172.16.1.1) but there is another device (i.e. 172.16.1.2) which connects and routes to somewhere. Mostly I've seen this kind of setup when there are 2 different types of WAN connections: 1 internet connection and 1 corporate MPLS connection.
I'm personally not attracted by the above kind of network design: each subnet has to have one and only one gateway. From my point of view, the above scenario may create some issues for clients, because they send a packet to their default gateway (172.16.1.1) and those packets are then forwarded out the other router (172.16.1.2) and when they get replied to, they reach the client simply passing through 172.16.1.2. The clients would or should expect the reply packets come from 172.16.1.1, or am I wrong here?
I'd be happy to have your opinions and technical views of this issue.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
Answer: I would recommend that you look into First Hop Redundancy Protocols like HSRP or VRRP.
Actually, having two gateways can be a very good network design, because if a router were to fail, the other router can take over somewhat seamlessly. However, as you're aware, it's not easy to make this transition if you have to make a manual reconfiguration of each client on a subnet.
Protocols like HSRP (or VRRP if you have non-Cisco gear) allow you to have two (or more) routers (or L3 switches) on a subnet share a single IP address. You'll have your first router with an address of .2, the seond with an address of .3, and a "virtual IP address" of .1 that both routers are aware of through configuration. When the primary router fails, the secondary is able to detect this and take over the virtual IP address, meaning that your clients just need to have .1 configured as their gateway and you're good to go.
In terms of routing design, that would largely depend on the current setup. It's possible that both gateways lead to the same internet edge, in which case you may not have a problem. Asymmetric routing can be bad, mainly because you risk packets being delivered in the wrong order, but again, depends greatly on the topology you're talking about.
Lots of design principles implied in what I just said. I suggest you research both protocols, and determine what's best for your environment. If you're using Cisco gear, HSRP is a widely used and well understood method of solving this problem.
Comment: and don't forget that there is also GLBP too which does the same sorta thing HSRP/VRRP (well kinda) but allows boths gateways to actually load-balance traffic. Just becomes a bit more difficult to debug at times as some clients may be on R1 and others may be on R2
Comment: @mierdin, asymmetric routing has nothing to do with packet reordering... reordering typically comes as the result of multipath routes for the same prefix...
Answer: The entire internet is built on asymmetric routing, so it's very common. Clients are interested in the interface they receive the packet on and the source of the packet, not which router passed it to them on that interface.
Asymmetric routing can get problematic however when devices keeping track of state (especially firewalls) and NAT are involved, but as far as I can tell this isn't the case in your example.
Comment: It could also be an issue when you are running some kind of reverse path forwarding. Otherwise its not that big of an issue
Comment: Why would that be a problem? The route exists and matches the interfaces, so even strict RPF wouldn't trigger here.
Comment: if a router has two external interfaces with packets going out one way (following IGP) and coming back into another, it would drop that packet. The incoming packet would fail a strict RPF check, unless of course the costs are equal
Answer: Network clients identify traffic flows based on the combination of 4 values:

Source Address
Source Port
Destination Address
Destination Port

For every different connection the 4 values above form a different combination wich is used to match the reply packets to the right flow. As you can see, the gateway or next-hop address is not included in the list and therefore the  client will not care if a packet comes back through the same gateway it used to send its packets. So, network clients do not care about assymmetric routing as soon as they can receive the traffic from the remote end. Actually, TCP/IP was designed originally to support assymmetric routing.
However, if we focus on network intermediate devices, assymmetric routing is not tolerated as soon as you are using any device/technology that needs seeing all packets in a connection to provide a given functionality. For instance: NAT, stateful firewalls or some WAN optimizators. Assymmetric routing in such scenario would cause either the intended functionality not being provided  or, even worst, packets being drop making communication impossible.
Answer: I agree with the answers before me, but I have to add something : if there any filtering on any of the gateways, or on any hop that are passed via only 1 of the 2 gateways, issues are likely to arise!  (hops that get passed via both gateways, such as the source machine, the destination machine, and any "common to both gateway paths" hops, are not concerned with the following scenarios)
For example, if A send packets to B through gateway1, and packets returns via gateway2, then it's highly likely that reply packet will be dropped if gateway2 is doing filtering (because that gateway didn't see the initiating connection packet, so it doesn't expecta reply, thus if the dest/port of the reply packet is usually filtered, it will be filtered.)
(There are, of course, many similar scenarios)
Answer: Other two areas where asymmetric routes will cause trouble are those:
1. MTU discovery - if the smallest MTU of the two paths differ, end-point MTU path discovery could result in a largest of the two MTU, which in turn will result in dropping of maximum size packets. For example, if one path goes through a VPN tunnel and the other does not, the VPN tunnel will have a smaller MTU. ping will work fine, but transferring large files will fail consistently.
2. Connectivity trouble shooting will be more difficult if one of the two path is broken but the other is not. Good old "traceroute" will be no help at all, as it will not be able to detect the reverse path intermediate points, unless it is exercised from both sides of the connection, which requires an out-of-band management channel ...

Asymetric routing - causes and effects?


What's the difference between CloudTemperature, CloudTemperatureSensor and Float data types?

Question: I have a SHT30 sensor for Wemos and I am learning to use Arduino IOT Cloud.
I use float data type for my temperature variable but I see two more data types:
CloudTemperature
CloudTemperatureSensor
What are the differences? Shouldn't use float?
Answer: From the technical reference for the Arduino Cloud on arduino.cc:

For your convenience, IoT Cloud provides specialized types which are just wrappers around basic types but declare the variable semantics more explicitly. This enables smarter integrations with third-party services (such as Alexa) and better visualization of widgets in dashboards.
You can use them just like a normal variable of the wrapped type, since they support assignment and comparison operators.

These types are actually wrapper classes, which add some functionality to better integrate in cloud services. You can use these just as the normal data types.

You can even look at how they are defined. Let's look at CloudTemperature for example. All the files can be found in the ArduinoIoTCloud repo on github.
The types are defined in the PropertyContainer.h file:
...
#include "types/CloudFloat.h"
...
typedef CloudFloat CloudTemperature;
...

So CloudTemperature is actually just CloudFloat, which is included from the corresponding header file. When we look at the CloudFloat.h file we find:
class CloudFloat : public Property {
  protected:
    float _value,
          _cloud_value;
...

So internally CloudFloat is just a float value with added functionality. And you can use it like any other float, since below that part that I've shown here all the operators (like /, *, +, ...) are overwritten (so the class knows what to do with these operators).
CloudTemperatureSensor is found at CloudTemperatureSensor.h and inherits from CloudFloat so works basically the same way (it only overwrites the assignment operator; the rest is the same as CloudFloat).

Shouldn't use float?

I haven't tried that myself. But from the documentation it sounds like there is no reason to not use the specialized types, since they provide the same functionality and more.


Using HttpHandler and Sitecore.Context

Question: We've got a sitemap generator class that inherits IHttpHandler. Because this is in a shared project with multiple sites, I want to ensure that when sitemap.xml is called, the correct tree structure is drawn out based on the site I'm visiting. I figure hooking into the Sitecore pipeline is the key, but can someone guide me to the proper one that I'd replace the standard .NET one with? Thanks much.
Answer: To answer your question directly; you would need to get in after the SiteResolver. Since you need to know what site you're on, to deliver your sitemap. It sits near the top in the <httpRequestBegin> pipeline.
<httpRequestBegin>
  <processor type="Sitecore.Pipelines.PreprocessRequest.CheckIgnoreFlag, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.HttpRequest.EnsureServerUrl, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.HttpRequest.StartMeasurements, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.HttpRequest.IgnoreList, Sitecore.Kernel" />
  <processor type="Sitecore.Pipelines.HttpRequest.SiteResolver, Sitecore.Kernel" />

So you would not be implementing an IHttpHandler as you suggest, you would instead inherit from Sitecore.Pipelines.HttpRequest.HttpRequestProcessor.
If I may; I'd like to add a few architectural considerations to the mix as well.
Be careful not to "render" your sitemap in real time on these requests. It's usually a very "heavy" operation and you open yourself up quite easily to a denial-of-service attack by doing so.
Instead I propose you add sitemap generation as a scheduled task in Sitecore, to regularly (like hourly/daily/as appropriate) generate sitemaps for each site, and the processor in question only concerns itself with streaming back that generated sitemap to the client.
IHttpHandlers usually execute before a Sitecore.Context is established - this is exactly the job of the <httpRequestBegin> pipeline.
EDIT: Added based on comments
Creating the sitemaps in the context of a Scheduled Task, you can indeed implement any class you like. Sitecore, however, expects to find the following method signature on whatever class you implement.
public void Execute(Item[] items, Sitecore.Tasks.CommandItem command, Sitecore.Tasks.ScheduleItem schedule)

A good guide for these can be found here: How To Create A Sitecore Scheduled Task
Comment: Thanks, Mark, this gives me the direction to go, and good thought on the architectural concerns. So for the scheduled task, I could make that any class I want that can then access the context of the site and go from there.
Comment: Yea. I'll edit my answer to explain this in a bit more detail.

Using HttpHandler and Sitecore.Context