What if my life starts all over again for all eternity?

Question: What if only I have a consciousness and after I die my life starts all over again for all eternity?! And the memories of my previous life get deleted? Please give me counterarguments!
Comment: Before asking for any counter argument, it would be nice to provide some argument.
Comment: The counterargument is simple but quite unbreakable: there is not more reason to believe this is true than an infinite number of other conjectures we can pull out of thin air. And whether it's true or false has no bearing on any particular instance of you: so why does knowing matter in the first place?
Comment: If you happen to be stuck in such an infinite Brain-in-Vat loop, indeed it's very hard to escape such rebirth cycle and find counterarguments, while the ancient [Shurangama sutra](http://www.cttbusa.org/shurangama/shurangama16.asp.html) hinted a counter and a way out: *You should carefully consider the origin of affliction and the beginningless creation of karma and perpetuation of rebirth - who creates it and who endures it?...you cannot realize the empty falseness of the sense-organs and sense-objects or the location of delusion. If you don't even know its location, how can you subdue it...*
Comment: This is already happening. You will not have your old name, your own cells, your old memory, your old spirit and soul, which implies that new people will born from you, having small parts of your old been. So, now, you are Einstein, in part, and in part, Napoleon, and others. Sadly, you've no way to remember the Theory of Relativity. As far as we know.
Answer: I'm reminded of the opening passage of Milan Kundera's great novel, The Unbearable Lightness of Being, which I reproduce here without comment.

PART ONE
Lightness and Weight
The idea of eternal return is a mysterious one, and Nietzsche has
often perplexed other philosophers with it: to think that everything
recurs as we once experienced it, and that the recurrence itself
recurs ad infinitum! What does this mad myth signify?
Putting it negatively, the myth of eternal return states that a life
which disappears once and for all, which does not return, is like a
shadow, without weight, dead in advance, and whether it was horrible,
beautiful, or sublime, its horror, sublimity, and beauty mean nothing.
We need take no more note of it than of a war between two African
kingdoms in the fourteenth century, a war that altered nothing in the
destiny of the world, even if a hundred thousand blacks perished in
excruciating torment.
Will the war between two African kingdoms in the fourteenth century
itself be altered if it recurs again and again, in eternal return?
It will: it will become a solid mass, permanently protuberant, its
inanity irreparable.
If the French Revolution were to recur eternally, French historians
would be less proud of Robespierre. But because they deal with
something that will not return, the bloody years of the Revolution
have turned into mere words, theories, and discussions, have become
lighter than feathers, frightening no one. There is an infinite
difference between a Robespierre who occurs only once in history and a
Robespierre who eternally returns, chopping off French heads.
Let us therefore agree that the idea of eternal return implies a
perspective from which things appear other than as we know them: they
appear without the mitigating circumstance of their transitory nature.
This mitigating circumstance prevents us from coming to a verdict. For
how can we condemn something that is ephemeral, in transit? In the
sunset of dissolution, everything is illuminated by the aura of
nostalgia, even the guillotine.
Not long ago, I caught myself experiencing a most incredible
sensation. Leafing through a book on Hitler, I was touched by some of
his portraits: they reminded me of my childhood. I grew up during the
war; several members of my family perished in Hitler's concentration
camps; but what were their deaths compared with the memories of a lost
period in my life, a period that would never return?
This reconciliation with Hitler reveals the profound moral perversity
of a world that rests essentially on the nonexistence of return, for
in this world everything is pardoned in advance and therefore
everything cynically permitted.
If every second of our lives recurs an infinite number of times, we
are nailed to eternity as Jesus Christ was nailed to the cross. It is
a terrifying prospect. In the world of eternal return the weight of
unbearable responsibility lies heavy on every move we make. That is
why Nietzsche called the idea of eternal return the heaviest of
burdens (das schwerste Gewicht).
If eternal return is the heaviest of burdens, then our lives can stand
out against it in all their splendid lightness.
But is heaviness truly deplorable and lightness splendid?
The heaviest of burdens crushes us, we sink beneath it, it pins us to
the ground. But in the love poetry of every age, the woman longs to be
weighed down by the man's body. The heaviest of burdens is therefore
simultaneously an image of life's most intense fulfillment. The
heavier the burden, the closer our lives come to the earth, the more
real and truthful they become.
Conversely, the absolute absence of a burden causes man to be lighter
than air, to soar into the heights, take leave of the earth and his
earthly being, and become only half real, his movements as free as
they are insignificant.
What then shall we choose? Weight or lightness?
Parmenides posed this very question in the sixth century before
Christ. He saw the world divided into pairs of opposites:
light/darkness, fineness/coarseness, warmth/cold, being/non-being. One
half of the opposition he called positive (light, fineness, warmth,
being), the other negative. We might find this division into positive
and negative poles childishly simple except for one difficulty: which
one is positive, weight or lightness?
Parmenides responded: lightness is positive, weight negative.Was he
correct or not? That is the question. The only certainty is: the
lightness/weight opposition is the most mysterious, most ambiguous of
all.

https://www.msjkeeler.com/uploads/1/4/0/6/1406968/milan_kundera_-_the_unbearable_lightness_of_being.pdf
Comment: That first chapter is one of the greatest pieces of philosophical prose I've ever read.  It's like a song or a poem
Answer: You ask "What if...", and I'd ask back: What then?
I'm asking seriously, think about it.
If your hypothesis was true, what would happen? How would that affect your current life, at all?
Please notice that failure to find an answer, would entail that your hypothesis doesn't really matter at all.
(And in contrast, if you found some answer, it might show how your hypothesis is important in some respect).
Answer: If the question is: How can we know for sure that we are not in a loop, then the answer is: we cannot. Both subjectivism and solipsism explain such views.
But it's the same as "how can we know that we have not been created last night with fake memories and a fake world around us", and many similar other ideas that could all be true, but not be true at the same time.
Answer: My answer here is similar to rkruse's.
Think of it this way:
there are (theoretically) infinitely many possibilities that we can imagine which cannot be proven nor disproven, and surely there are infinitely many possibilities that we COULD imagine. If you've ever heard the "flying spaghetti monster" response to religion, that is a somewhat similar idea, albeit a meme.
The idea is that you imagine a flying spaghetti monster that you can't see, hear, or touch. The monster has no appearance, and from both an epistemological and ontological perspective there is no thing to be learned, nor any knowledge to be derived, from asserting that it exists. You have trapped yourself by positing the possibility of something which cannot be proven nor disproven. This is the criterion of falsifiability.
The same follows for your fear of an ever-repeating universe or an ever-repeating life. This idea appears in many religious/spiritual texts, and various philosophers have no doubt dissected the idea under a microscope from many angles. When you suggest that something may occur after death, and may occur infinitely over many lifetimes, you are willfully forming a question that is unfalsifiable. In the same way that the person who fears the Flying Spaghetti Monster chooses to imagine that you can't see or hear or feel him, and therefore can't prove or disprove that he exists, you are doing the same thing by forming your question specifically so that it cannot be tested or verified in any way. One could just as easily ask if there is a Flying Spaghetti Monster living somewhere on Earth, which is something that can be predicted, tested, and verified. But they ask the harder question, the one that quite literally cannot be answered.
(Please note that this is just the first and most popular example that comes to mind, I am not at all using the Flying Spaghetti Monster to mock people who practice different religions.)
Does that mean that unfalsifiable questions are silly questions? Absolutely not. I personally believe that we as humans tend to form these unfalsifiable questions because we are falling down an anxiety rabbit hole, because we are scared of something. And, when we start to panic, it's turtles all the way down. "What if I wake up and I'm in a new life? Ok, well I'll still remember my old life. What if I don't remember the old life? Ok, I'll find a way to recover my memory and prove that I was in another life. What if I am trapped and can't prove that I was in another life, and my memories are erased?" This is infinite regress, essentially asking "what if?" to any possible explanation. We have a tendency to posit questions and theories that go to logical extremes, and resign ourselves to overwhelming skepticism of the world. As you are experiencing right now, it is an unpopular way to think for many reasons.
I should note that the criterion of falsifiability does not EXPLICITLY say that your endless life theory is false. The purpose of the criterion of falsifiability is to decide whether a theory is predictive and testable (ie. whether a theory has the power to produce predictions which can actually be tested and verified). However, the problem arises when your brain keeps coming up with infinite questions about infinite things and inventing new fears in response to any possible answers. While your infinite lives theory cannot be proven false epistemologically (at least as far as I know), neither can the Flying Spaghetti Monster. Neither can the idea that all oranges - and only oranges - cease to exist when you aren't looking at them . Neither can the idea that dogs can talk, but they simply choose not to so we don't become suspicious of them. Neither can the idea that all US government officials were implanted by an alien race and are actually cyborgs.
You may think all of those theories are silly, but we can apply a similar sort of logic to them as you are applying with this infinite lives theory. One could argue that all government officials CAN'T be implanted cyborgs, because we saw Joe Biden living his daily life long before his career in government began. But "what if" he was killed and replaced with a cyborg when he took office? And "what if" he and his family were planted on earth by the aliens, and every state and federal election he entered was rigged by the aliens to make sure their cyborg candidate wins? Well, one might argue, surely we know he is human
.. because his doctor and his friends have seen him, hugged him, shook his hand, and they can confirm that he is human. Okay, but "what if" the aliens' cyborg technology is so advanced that Joe Biden has human flesh on the outside and appears exactly like a regular human?
Again, it's turtles all the way down, because we have chosen to pursue a question which is unfalsifiable, and we are asking increasingly reaching "what if" questions ad infinitum... yet all of us can agree that the cyborg theory seems a little silly on the surface. There are many arguments a philosopher might employ to disprove the theory that all government officials are cyborgs. One of them is Occam's Razor, which posits that the explanation which posits fewer entities (the "simpler" explanation) is the preferred explanation. But personally, MY main problem with your unfalsifiable theory is that I don't understand why we need to pick and choose which unfalsifiable theories to be afraid of. As we just demonstrated, there are infinitely many questions we can ask, infinitely many possibilities we can imagine, which we can neither prove nor disprove. Actually, there are many ongoing epistemological and ontological discussions dealing with the idea of whether something MUST be possible simply because we can imagine it, although most people seem to implicitly agree that something isn't necessarily real just because we had the thought in our head.
When it comes to your theory that "only I exist", this idea has a name. It is called ontological solipsism. Under ontological solipsism, only MY consciousness exists, and everything else in the world is merely the "contents" of MY consciousness. The radical extremities of this school of thought are believed to have arisen from Descartes "cogito, ergo sum" ("I think, therefore I am") thought experiments. In Descartes' "Discourse on Method", he seeks to reduce all knowledge down to one, irrefutable - or "undoubtable" axiom. The only thing which he ends up being certain of is the fact that he thinks, and is therefore conscious. He also notes that he experiences doubt in his consciousness, so therefore he must be consciousness. From there he attempts to logically reconstruct the world and prove, epistemologically, that the things he thinks he knows are knowable. His attempt to prove the existence of other minds and the "outside world" is often criticized and taken under intense scrutiny, partly because one of his central arguments relies on the existence of a God who would not deceive him. However, the vast majority of human beings, including those who are extremely well-versed in modern philosophy and the sciences, have perfectly valid reasons to believe that other minds exist. Obviously ontological solipsism is still an unfalsifiable thought experiment, but again... there is a reason that pioneers of the philosophies and sciences choose to engage with falsifiable, testable, understandable ideas. Thought experiments and other radical philosophies definitely have their place in the world, but there is certainly no concensus among philosophers that points to solipsism being likely, nevermind "true". It is very heavily scrutinized, and numerous philosophers of ontology and language have proposed strong arguments against it. No one argument is universally accepted or goes unchallenged, but that's kind of what you get when you pose an unfalsifiable question. And that's why most people consider it merely a "thought experiment".
And again, I am more concerned with why you have chosen THIS specific unfalsifiable question, when there are infinitely many others to be thinking about. In my life personally, I have dealt with many questions about death, reincarnation, perception, and insanity. And I genuinely think that those are all related to my life experiences and the things I fear. The deaths of my loved ones at a young age, as well as my trouble socializing and inability to form lasting close friendships as a toddler, left me with trauma that I think has resulted in my obsession with these specific questions that follow certain "themes". I am not a psychiatrist, but a lot of people who experience these persistent, unending thought cycles of "what if this? what if that?" are OCD sufferers (like me). If you haven't heard much about OCD, I would encourage you to look into it online and see if some of the symptoms match your experiences. Ignoring - for a moment - the question of whether or not your infinite lives theory were true, it seems like it is giving you a lot of anxiety and you may be very preoccupied by these thoughts throughout your day. By comparison, many people will read this same infinite lives idea in school or online, and they will think "huh, that's interesting and kinda scary"... but then they will shrug it off and be unbothered throughout the day. Being preoccupied by a philosophical question doesn't necessarily mean you are suffering from any kind of condition, but again - I do not think there is any harm in Googling a bit about it if that is something you have ever wondered about.
Regardless, if you are severely bothered by these thoughts in any way, I would encourage you to try and see a professional therapist/counselor. If you are like me, you may feel like talking to a close friend or therapist and telling them your thoughts will make them seem more real, or sharing them will lead to you accepting them and admitting that they are true. But I assure you, I feel better each and every time I talk to someone about it, and sharing my fears with other people doesn't make those unfalsifiable questions true. It only means that other people had a similar idea and they share the same fear. Feel free to message me if you have any questions about this comment.
-Lily :)
Answer: The picture you paint is an actuality in a serial universes cosmology. I had a wonderful epiphany. It felt as if the universe actually showed itself to me after years of wondering, attempting, puzzling, theorizing, and trying to understand in the dark. The zillions of puzzle pieces fell into place and showed a shining and glittering image.
The universe showed me that we are living confined to three dimension. Particles are actually 6D structures of which three are curled up to Planck-sized circles. All matter is made up of two basic an massless field.
Consider now a 4D space. Or better, two of them connected by a 4D wormhole with a Planck-sized diameter at the center. Around the mouth a virtual field of the two basic massless particle fields (with associated 8+8+1 gauge fields) exists while in the extra dimension two real fields head their way to eternity. The 4D space is actually 7D, like the near point particles are 6D structures of spacetime.
On both sides of the wormhole mouth, on the both infinite 4D spaces,, a (apparently) 3D universe accelerates towards infinity. When all matter particles in both universes have evaporated into photons and all matter has turned into nothing more than diluting memories, the virtual Planck volume will be stimulated to make a new time start and virtuality is inflated into reality. A new big bang. A simple calculation shows that after inflation the two new mirror universes had already a diameter of about 10exp11 times the diameter of the present observable universe. The negative curvature of the two sides of the 4D wormhole nicely explains the initial inflation and current accelerated expansion, i.e. dark energy. So at this moment, a mirror universe is accelerating away towards infinity at the other side of the wormhole and after us a new bang will occur at the singular wormhole.
So, fresh particles arrive in serial big bangs. The clone argument doesn't hold for separate universes. Only within the universes themselves. So a new you and me will appear over and over again. There is no escape!


How to reconnect power to the back storage unit?

Question: I have a back storage unit that has to be reconnected. There are only three wires coming from the main building. One wire has three white stripes on it, and the other two are solid black. How do I reconnect these lines to a new breaker box?
Comment: Pics of the wires where they're attached to the main panel, plus pics of the new subpanel would be most helpful in providing you an accurate answer.
Comment: With a new panel, you will probably need to add a ground wire and if the unit is detached, two ground rods also.  If wired correctly at the main panel(unknown), the two blacks will be the hots and the white stripes wire will be neutral.  The size of the wires will need to be known for the feed breaker after a load calculation is done, if they are over 10 gauge(30 amps).
Answer: Normally neutral has to be white. However, at large sizes such as typically used for panel feeders, black wire can be marked as white. Which means the three white stripes (redundancy is good - one stripe would technically be enough) marks the neutral and the other two wires are the hot wires.
However, this raises a ton of issues about the existing and new installations. Such as:

Where is the ground wire? Old installations don't require it and a straight replacement would not (usually) require adding one. Possibly metal conduit as ground? Can you add a ground wire back to the main panel?
If the storage unit is not attached to the main building then ground rods are required.
If you do have a ground back to the main panel then the new panel must keep ground and neutral separate.
If this is not attached to the main building then you need a disconnect, which can be a "main breaker" in the new panel.


Step up 3.3V to 5V for digital I/O

Question: I normally use an Arduino for my projects because it has 5V inputs and outputs and has 5V Vin so that makes life very easy when interfacing with 5V components. For this project I want to use a Raspberry Pi because I want to hook it up to a display. The Pi is powered by 5V so that's easy enough. It has 3.3V I/O pins however and the devices I want to interface with are 5V.
I have a device with a 5V input pin, which needs to be driven to 5V. The device has a 5V output pin, which the device drives to 5V when it outputs.
I've converted bidirectionally between 5V and 3.3V devices before, but that was with a logic level shifter that was active LOW. The circuit is the typical one with a transistor and a diode and two pull up resistors. This application requires active HIGH. This project thankfully does not require bidirectional I/O.
For the 5V to 3.3V direction, a crude voltage divider will work.
For the 3.3V to 5V direction however, I don't know of an easy solution. I did some searching and there seem to be boost-converters (DC-DC boost converters) but to build them from discrete components I need to build a PWM circuit to drive the switching.
I was just wondering if there was a simplier way to achieve this, with complexity comparable to the active low logic level shifter.
Comment: Check this out different methods for interfacing.http://www.savagecircuits.com/content.php?85-Mixed-Voltage-Systems-Interfacing-5V-and-3-3V-Devices
Comment: See also: http://electronics.stackexchange.com/questions/82104/single-transistor-level-up-shifter/82112#82112
Comment: How much current does the 5V output need to supply? Is it feeding a logic-level input?
Answer: Since Dave Tweed has pointed out the flaw in the other answer, I have basically copied my answer to Single transistor level up shifter ... Note also the interesting solution by Nicolas D in the question.
I have a few solutions (some solutions provided by Microchip HERE):

Direct connection: If Voh (high-level output voltage) from your 3.3V logic is greater than Vih (high-level input voltage), all you need is a direct connection. (it is also required for this solution that Vol (low-level output voltage) of the 3.3V output is less than the Vil (low-level input voltage) of the 5V input). This solution is most often rejected due to insufficient margins.
If the above conditions are close, you can often boost the high-level output voltage slightly with a pull-up resistor (to 3.3V) and direct connect the signals.
The pull-up resistor can provide a small amount of high-level voltage increase. For more, you can use diodes and pull-up to 5V. The circuit shown will not pull-up clear to 5V, but it will increase the high-level input voltage to the 5V logic by the amount of one diode voltage drop (appx 0.7v). Care must be taken with this method that you still have a valid low-level as that is also raised by one diode drop. Schottky diodes may be used for a slight increase in high-level voltage while minimizing the undesired increase in low-level voltage. Refer to the above mentioned app note for more on this circuit.:

simulate this circuit – Schematic created using CircuitLab

If you can deal with a logic inversion (and don't require active pull-up), a mosfet and pull-up resistor may be used:

simulate this circuit

There are also many logic IC solutions such as the 74AHCT (Advanced High-Speed CMOS, TTL-compatible) series logic family. Good choices might be the 74AHCT125 which is a noninverting buffer, or the 74AHCT14, which is a hex Schmitt trigger inverter. Both of these are inexpensive and readily available. These ICs may benefit from a decoupling capacitor, especially for rapidly-changing signals.
Comment: @Huckle: Tut has provided a circuit or module to be used to interface two other circuits. The standard _is_ to label the terminals or interface points from the point of view of the circuit show - not the ones you can't see. You connect your outputs to this circuit's inputs. Sometimes we need to indicate where to connect on another circuit but use arrows in those cases so it's clear.
Comment: The labels aren't backwards. "3.3V logic in" indicates it is an input into the circuit I have provided ... of course it is from an output from your circuit. "5V logic out" then merely indicates that it is an output from my circuit to your 5V logic input. I will edit to clarify.
Comment: @wbkang ... Good choice. Option 3 is not the "holy grail" of level conversion. It needs to be carefully applied with proper choice of both resistor and diodes (good of you to simulate). The mosfet solution is better if you can live with the logic inversion and the slight added cost.
Comment: I think some of your diagrams are labeled backwards. I have a 3.3V logic output and a 5v logic input. I understand how #4 works and can confirm that the label is just backwards (but it is the correct circuit for what I need). I don't fully understand #3 enough to know if it's labeled backwards or is actually backwards. That being said if I use two instances of #4 to keep the logic non-inverted I should be good to go.
Comment: It makes sense now that you explain it, but it's backwards from the conventional point of view (where conventional point of view is meant to mean point of view of someone interfacing digital ICs). Thanks again.
Comment: @Tut do you mind explaining a little more on how #3 works? I am having hard time understanding this. I am not sure what 3.3V-D1 is for :( Thank you
Comment: @wbkang ... This is not really my circuit, but comes from ["Microchip 3V Tips N Tricks"](http://www.newark.com/pdfs/techarticles/microchip/3_3vto5vAnalogTipsnTricksBrchr.pdf) mentioned above. You should read the explaination beginning on P16. I think it must be an typo error where they say "the output low voltage is increased by the forward voltage of the diode D1" (I think they mean D2). It looks to me that D1 is there as a clamp to protect the 3.3V device from current flowing through D2 if the voltage at the 5V input is allowed to get too high via the pull-up resistor ...
Comment: @wbkang ... (continued) ... This is not always needed, but is good insurance; for example if the 3.3V logic source is a microcontroller and does not have 5V tolerant inputs, the 3.3V logic signal will likely power-up as an input until it can be configured as an output. Diode D1 as a voltage clamp would protect this pin.
Comment: @Tut got it, thanks a lot. I was testing it out myself and I could not figure out what D1 was for haha http://tinyurl.com/n975z7q For my little project, I ended up using 2N7000. It was very straightforward to use.
Comment: Thanks, I tried #3 with my esp8266 and a 5V LED strip, and it works really well. :D
Comment: Could you use an Op-Amp to shift the signal from 3.3 to 5v?

Step up 3.3V to 5V for digital I/O


How to know ahead of time if food will be served during a flight?

Question: How to know ahead of time if food will be served during a flight? Ideally, at which time(s) and the menu options.
Comment: It usually says on the itinerary details and/or on the booking confirmation.
Comment: Some airlines will show the information in the "manage your booking" section of their website, possibly with links to the current menu for that flight, though it varies a lot. Which airline are you considering, on what flight or type of flight (short/long haul, domestic/international, red eye...)? Of course class of travel also has an importance...
Comment: The time(s) when meals will be served are highly variable not just by airline and route and service class, but, for example, they may be unable to start at the standard time due to turbulence due to the weather and routing on a particular day. I would ask a flight attendant.
Answer: As JoErNanO said, this is often printed somewhere on your itinerary, though it usually says little more than something like "Dinner, Breakfast."
Specific menus vary wildly, so airlines don't generally make them available ahead of time. The exceptions are generally low-cost carriers that require you to purchase meals in advance or premium services like Singapore's Book the Cook. Every airline's website should have a page with meal information. When food is available for purchase, more details on the choices may be available (e.g. for United Domestic/Canada/Latin America flights).
Otherwise, you might find some information from online trip reports. A search for your flight number, "trip report," and "economy" or "business" may bring up someone who has written a detailed report on their flight, including meal information. While menus change regularly, this should give you a decent idea of what services to expect and when. Frequent flyers on forums like FlyerTalk sometimes take pictures of their (usually non-economy) meals and post them.
Buying food at the airport to bring on-board is often a more appetizing choice.
Comment: You can also bring food from home, unless it's something very liquid such as soup. Almost anyone can cook a better meal than what's served by airlines.
Comment: FWIW, SQ's Book the Cook is an optional business-class-only extra, if you don't order ahead you'll still get fed with the standard selection.
Answer: The subscription service ExpertFlyer shows the configured meal options for most flights in the world, as configured by the operating airline.
Most airlines serve meals on international and long-haul flights, and domestic flights that are longer than some threshold, and operate close to usual meal times in the country.  In general, when meals are offered, meal services typically starts about an hour after take-off.  On long-haul flights, there is often a second meal, typically lighter than the first meal, offered around one to two hours before arrival.  On very long flights there may be a mid-flight snack service or available on request.
In general, the higher the cabin the greater the quantity and flexibility of the meal service.  Many airlines offer a la carte or dine on demand choices in business and first class on international and long-haul flights.
Answer: Your booking will indicate which meals are served.  Typically, shortly after takeoff and shortly before landing.  If you ask nicely, the Flight Attendants will usually accommodate alternate times.
Depending one the airline, you may be able to view the menu up to 30 days before departure if they offer a choose you meal option.  Otherwise, unless you know someone in either catering department, you find out onboard like everyone else.


How to represent a document in test data with the Document-Term Matrix created from the training set?

Question: I build a classifier of documents using the vector representation of each document in the training set (i.e a row in the Document-Term Matrix). Now I need to test the model on the test data. But how can I represent a new document with the Document-Term Matrix since some terms might not be included in training data?
Answer: The easiest way is to treat all out-of-vocabulary terms as a specific term in your matrix (i.e. "OOV").
So for instance, if my training data contains 3 words: "I", "like", "cake", my document-term matrix would contain 4 items, "I", "like", "cake", and "OOV".
Comment: Is there a way to automate this procedure?
Answer: If you choose to use scikit-learn's CountVectorizer, words that appear in the test dataset but not in the training dataset are automatically ignored.
The fit_transform method is called on training data creating the document-term matrix. The transform only method is called on the test data which transforms those documents to document-term matrix created in training, automatically dropping any new terms.


Why can't a force between two particles exert a torque?

Question: Let's say I have two particles which exert a mysterious force between them. Say they lie on the x-axis. Newton's 3rd law tells us that the force on the two particles due to the other must be opposite to each other, for example they are both attracted or repelled (F on the x-axis), but why can't the force have a component in the y-direction, creating a net torque?
Comment: Does "particle" here mean a point particle only?
Comment: If your "particles" have a dipole moment, it's absolutely possible for them to exert a torque...
Answer: Ultimately, the third law expresses in Newton's formalism the principle of conservation of momentum.
In advanced physics you will understand that the laws of physics of the world can be defined in terms of "Lagrangians" and "action principles". An action principle takes a bunch of trajectories of particles from some starting positions to their ending positions (a "path" for the "system of particles" through their "phase space" $\{x_i, v_i\}$) and assigns that path a number, called the action of the path.
The law of stationary action, which subsumes all other laws of physics, then says: of all the paths that the system could take through phase space, the one that it does take has the special property that "nearby" paths all have the same actions. Often this is called the principle of "least" action since the easiest way to do this is for the action to be minimized.
Once you have this mathematical formalism, any particular laws of physics can be entirely reduced to figuring out these action principles. But there is something much more powerful which happens, called Noether's theorem, named after the mathematician Emmy Noether who discovered it. This theorem says: any continuous symmetry in your action principle generates a conserved quantity. You can also use it backwards and look for what symmetries generate known conserved quantities.
Conservation of momentum turns out to correspond to the symmetry "the laws of physics [i.e. the action principle] are the same under translations in space." So the third law ultimately expresses "the laws of physics are the same here as they are there."
Conservation of energy turns out to be the symmetry under translation in time: the laws of physics are the same from moment to moment. And conservation of angular momentum is the symmetry under rotations of space.
You probably have a long way to go before you are dealing with action principles, but that is the deepest reason that we know of why momentum is conserved, and therefore why every force comes in a logical pair with an equal and opposite force.
Answer: Symmetry, no direction is in any way special so the particles cannot decide which direction the torque can it be, spontaneous symmetry breaking is impossible because this torque apparently is large before anything moves.
Also, this will violate conservation of angular momentum because the angular momentum around the centre of mass will change (if one mass moves in +x-direction, the other moves in -x direction (third law) and angular momentum vector in z-axis appears).


More than one space character between words

Question: Is it not possible to write more than one space between two words?
Sometimes I need to type more than one space to make my statements look more distinct. However, it automatically turns out to one space anyway.
Comment: Please make sure to test your formatting in several settings; at least test it as "full site" and as "mobile site."
Answer: You           can         use HTML entity   for this purpose. Since it means non-breaking space, it is advisable to separate the instances of   by ordinary spaces, allowing for a line break.
That said, such formatting should be avoided in all but rare cases. Over-formatting posts rarely benefits them. For example, the line break
 that you used in this question is not necessary and looks unnatural: it should be either a paragraph break (created with a blank line) or no break at all. There's little reason for using line breaks outside of writing poetry.


Using com.sun.crypto.provider.SunJCE in OSGi Bundle

Question: I am trying to use com.sun.crypto.provider.SunJCE (for HMAC) in an OSGi Bundle.
I am using the maven-bundle-plugin with these configs:
<Embed-Dependency>*;scope=runtime;inline=false</Embed-Dependency>
<Import-Package>*;resolution:=optional</Import-Package>

When i execute my bundle I get this error:
Caused by: java.lang.ClassNotFoundException: com.sun.crypto.provider.SunJCE

How can I get the code in my OSGi bundle to have access to com.sun.crypto.provider?
Answer: Looking at your maven config, one thing which jumps out is that making all your package imports optional is unwise. It undoes many of the benefits OSGi gives you by deferring problems to execution time, instead of letting you know at bundle start time that something isn't right. Fail slow instead of fail fast, in other words! It's only appropriate for dependencies which are genuinely optional.
Of course, your ultimate aim is to not fail at all, rather than just failing faster. As a starting point to understanding what's happening, have you opened up your built bundle and checked that the crypto packages are actually being embedded? It's a good idea to check your build is doing what you hope it is.
However, in this particular case, since this is a class which you would normally expect the JVM to provide, I'd suggest checking your boot classpath to ensure it's available, dropping the embed dependency, and using the org.osgi.framework.system.packages.extra property instead of embedding the dependency.
Answer: Why do you need the com.sun.crypto class? In general, you can access the crypto functions through the java.* API? E.g.:
 KeyGenerator keyGen = KeyGenerator.getInstance("HmacMD5");
 SecretKey key = keyGen.generateKey();
 Mac mac = Mac.getInstance(key.getAlgorithm());
 mac.init(key);
 String str = "This message will be digested";
 byte[] utf8 = str.getBytes("UTF8");
 byte[] digest = mac.doFinal(utf8);


Why no ConfigAndLog or Templates_C folders on my test system

Question: I've recreated my 5.35.2 test system (several times!) on Drupal 7, using the default directories.  All is working OK but there isn't a ConfigAndLog or a Templates_C folder. The 'View Log' extension is working, but I can't see these folders anywhere.
Comment: Sounds to me like they exist but your're looking in the wrong place!  If you go to Administer > System Settings > Directories and click the help icon in the top message box, you should get a pop-up with the path variables, including [civicrm.files].  Are your missing files under there?
Comment: [civicrm.files] is exactly where I'm looking.  You are correct, I was looking in the wrong place - they are in /home/acivior1/public_html/./private/civicrm I guess because in Drupal the 'Private file system path' was defined as './private'   I figured this from looking at the civicrm.settings files.
Comment: Ah, good you've found them!
Comment: I think this occurred because I've reloaded the test system several time, without recreating Drupal 7.  Civi must be looking in this Drupal field when it installs.  I'll know better next time!  This must rank as one of the dumbest questions on here...
Comment: Probably worth creating an answer explaining what you looked at to figure out where they are,
Answer: I figured this out by looking at my civicrm settings file - in which CIVICRM_TEMPLATE_COMPILEDIR was defined to be in /home/acivior1/public_html/./private/civicrm/templates_c.  This was because the Drupal private file system path was defined as ./private so this is where Civi put these files when installing.  However I notice just above this definition the comments set out below. It appears that the install ignored it?

** The default excludes node_modules (can be huge), various CiviCRM
dirs that are unlikely to have anything we need to scan inside, and
(what could be your) Drupal's private file storage area.


How do large sites(Google, Facebook, etc) propagate information to all servers in realtime?

Question: I'm looking for some technologies to research.  I'm amazed that you can go into [insert large site here]'s interface, update a setting and within seconds it's pushed out so it's live across the board. A good example of this is adwords. If you go into adwords and change a campaign those settings are stored on the server with a unique id. The ad code calls the server with that id and the information(size,colors, etc) is pulled up instantly to show the ad. How is that Google can push that out to hundreds of thousands of servers so quickly? What type of db systems are they using?
Answer: Google has published research papers for its Google File System (or "BigFiles" as it was once known) and BigTable, both of which are used extensively in their services. Those would probably make good reading, in and of themselves and because they probably cite prior art.
Answer: You might want to read how Oracle has built RAC to propagate data across many DBs: http://download.oracle.com/docs/cd/B14117_01/server.101/b10727/ha_strea.htm
Answer: I know that Facebook use peer-to-peer to push update on their server.
The first server get the update, then he send it to some others who does the same thing.. and on until the update is on all of their server!
Comment: Any software names or theories I can research?
Answer: I have been looking into similar pieces of information.
Look for "Structured Data".
Specifics: MojoDB, CouchDB.
Look for comparisions on mojodb website.
Facebook has made Cassandra (distributed database) open source. I think they and many others use it now.
Also look for Hadoop framework and Map/Reduce, as a matter of interest.


If we are using Kubernetes do we need to implement HA on both the infrastructure and application level?

Question: Is this something that's going to be covered at the application level with pod autoscaling? Or should we implement both horizontal pod autoscaling and infrastructure high availability within our cloud provider? The goal is for us to see minimal downtime.
Comment: You might want to look at the reference architectures that come with sample configuration for openshift kubernetes on public cloud. there are ones for Azure and AWS for example but also openstack for on-prem https://blog.openshift.com/openshift-container-platform-reference-architecture-implementation-guides/ for example to learn I setup a cluster on AWS using their cloudformation templates in only a few hours. that has full ha of the VMs and of close any VMs dies k8s starts replacement containers on another VM. Kill a VMs and AWS restarts it as using its vm ha features.
Answer: Your application requirements really do influence your options here, maybe add more detail about the app because this subject is very much about your application architecture too.
The application state is fixed, pod's are rebuilt as per the spec or source container that defines them and the replication sets take care of the deployment so I'd say the application from a Kubernetes perspective is already highly available by design and the reason why the documentation contains little coverage if any with regard to application level HA.
It's worth noting too that Kubernetes High Availability with kubeadm is still in its experimental stage and your clusters need to be running Kubernetes version 1.12 or later.
Google's Kubernetes Engine for instance; offers 'Regional Clusters' and these are spread over many zones in a region. This certainly increases your cluster availability. More here in GKE regions
The official word on the current state of Kubernetes HA cluster options are well documented here. https://kubernetes.io/docs/setup/independent/ha-topology/


Insert region into html.html.twig

Question: Is there any way to add a region into html.html.twig? I want to have one inside  tag to be able to render different js counters through Block Layout
Comment: Can you provide more details about your issue?
Comment: I'm trying to create a region that will be rendered in the area outside of the page inside html.html.twig. things like google analytics, facebook pixel etc. So they could be managed in the block layout as just a block content, rather than putting that code inside head area of the html
Answer: So, the solution is to add a new region into your theme.info.yml (say before_body)
Then the code you'd place into theme_name.theme be:
function theme_name_preprocess_html(&$vars) {
  /**
   * moves region before_body into before_body var inside basic html
   */
  if (isset($vars['page']['before_body'])) {
    $vars['before_body'] = $vars['page']['before_body'];
}
function theme_name_preprocess_region(&$vars){
  /**
   * Cleans before_body from standard html markup
   */
  if ($vars['region'] === 'before_body') {
    $vars['content'] = theme_name_clean_special_content($vars['content']);
  }
}
/**
 * Cleans content from basic markup
 * @param $content
 * @return \Drupal\Component\Render\MarkupInterface|string
 */
function theme_name_clean_special_content($content) {
  /** @var \Drupal\Core\Render\Markup $content */
  $content = preg_replace('~<\/?section.*?>|<h\d?.*?>.*<\/h\d?>|<\/?div.*?>~', '', $content);
  $content = preg_replace('/(?=/i', '', $content);
  $content = preg_replace('/((\r\n|\n|\r)$)|(^(\r\n|\n|\r))$/m', '', $content);
  return \Drupal\Core\Render\Markup::create(trim($content));
}

Just don't forget to add before_body variable into your basic html template.
Answer: There is no way to place regions directly in the html.html.twig template as regions that you operate through block layout are part of the page variable and are rendered in body tag.
HtmlRenderer::prepare() receives the main content render and ensures we have a '#type' => 'page' render array (which corresponds to ):

if the main content render array already is '#type' => 'page', then we're done
otherwise, we need to build that '#type' => 'page' render array. The RenderEvents::SELECT_PAGE_DISPLAY_VARIANT event is dispatched, to select a page display variant.

By default, SimplePageVariant is used, which doesn't apply any decorations.
But, when the Block module is enabled, BlockPageVariant is used, which allows the site builder to place blocks in any of the page regions, and hence "decorate" the main content.
Drupal 8 modules can subscribe to this event as well, and use a different page variant, even on a per-route basis. (Panels, Page Manager etc. can be cleanly implemented thanks to this event.)

HtmlRenderer::prepare() now is guaranteed to be working on a '#type' => 'page' render array. hook_page_attachments() and hook_page_attachments_alter() are invoked. (For attaching page-level assets, that aren't bound to a specific page.)
Renderer (formerly drupal_render()) is called on the '#type' => 'html' render array, which uses the html.html.twig template and the return value is a HTML document as a string.
This HTML string is returned as the Response (specifically, a HtmlResponse object, which is a more specialized subclass of Response).

More info on this page: https://www.drupal.org/docs/8/api/render-api/the-drupal-8-render-pipeline

Insert region into html.html.twig


How do I get the two energy capsules in the ceiling of Armored Armadillo's stage?

Question: During the first chase section of Armored Armadillo's stage there is a section with two energy capsules in the ceiling blocked off by rocks. How do you get these two energy capsules?
Answer: You need an upgrade that based on your picture you are still missing. That will allow you to break some blocks by headbutting them, Mario style.
Coincidentally, that upgrade is also required to get the other upgrade you are missing. Yet, if you care for plot and cutscenes, I advise you keep a backup password before you get that last upgrade. You can safely beat all the eight bosses and unlock the final stages, just do not get the armor part that requires you to break the same kind of blocks in your original question.
Since that upgrade will actually be required later, the game has an interesting way to ensure you still get it if you miss the original version, far more interesting than just blocking your way like they did with the dash upgrade. Both ways to get this final part are equivalent in this game (some of the remakes actually change that, giving two different options) but it is still nice to play thru the alternate way at least once.
Comment: When should I be making a backup password? Is there a point of no return?
Comment: @Stevoisiak just before going to the final levels (so just after the usual 8 bosses,right when the final stages unlock in usual Megaman style) and without the arm cannon armor part


How are poisons handled in the d6 system?

Question: I've tried to search for but didn't find anything exactly in the OGL rules about how poisons are handled. Are there any rules there?
Comment: Which part of poison handling are you looking for?
Comment: everything as I didnt see anything there (only at the skills I saw "fortitude to resist poisons" and uhm.....nothing more found)
Answer: In the D6 Adventure book on page 80 under Stamina (Physique) it goes into how to handle poisons.

To avoid the effects of a toxin (inhaled, ingested, or absorbed) or disease (encountered in any manner), a character makes a stamina roll. ( e first attempt after initial exposure does not count as an action; subsequent attempts to resist the toxin do.) Several factors figure into the difficulty of the attempt, including the deadliness and dosage of the poison in question. For example, a fatal bout of botulism has a difficulty of 9, while a killing dose of cyanide has a difficulty of 42.

This was the only entry directly I could find on it.
Answer: The excellent "REUP" core book has some poisoning rules.
Under Miscellaneous Damage (p 102):
4D for Food Poisoning (very severe case)
8D+2 for General Poison (fatal dose)
And there are richer "optional rules" beginning on p 103. Excerpts:

the poisoner must make a Moderate first aid roll (or a Very Easy (A)
  medicine roll) as above. He must also make an alien species roll and
  check on the following table to establish the poison's effectiveness

The victim takes one Wound every turn, until he has either taken the
  full damage or is dead

A Moderate (A) medicine or difficult first aid roll allows a person
  analyzing a poison to identify a specific type of poison

Once the poison is identified, the character may use the poison kit or
  the contents of a medpac to neutralize the poison (the difficulty of
  the skill roll is equal to the poison's damage when using (A)
  medicine, and the damage +5 when using first aid)

There are also rules for Illness and Disease on the following page, which may be useful in similar situations.


How to bake with Blender 2.82 and keep shading information?

Question: I am having issues baking in blender. I'm new to blender so I don't know what I am doing wrong. I have the UV mesh unwrapped and a blank image-texture selected for it to bake to. But whenever I bake it, it always bake as a flat color with no shading. Also, I am only trying to bake the skin. I have tried the bake types, diffuse, normal, and combined and still have the same issue. I've also tried different setups with the nodes. I was able to get a white highlight around the islands of baked UV mesh by playing around with the nodes, however when I imported it into Unity, it showed up completely flat colored just like the ones I did before.
Answer: Maybe you want it.
qqqqqqqqqqqqq
Comment: I tried this setting and it turned the UV mesh to be black where the flat color was, I also added a pic for the results..
Comment: I was able to fix the issue by first switching from the material view to the render view. From there I was able to see that the 3d object looked flat, so I moved the light source  in-front of the character and played around with the nodes so that I could keep my Mtoon shader and combine it with another. After I did that the 3d model started to look shaded, so I baked it with the combine but I'm pretty sure the other settings would work too. Once I imported it in Unity, it kept the shading :-D


What are the memory ordering guarantees of the ARM processors?

Question: I'm new to ARM. Does anyone know where I can find the documentation that provides an overview of the memory ordering of the ARM architecture? I'm talking about the ARM version of Section 8.2 of the Intel Manual, for example (see here)
Comment: to some extent I think intel has created a problem bad enough to have to document it.  Others dont create these problems.  your best bet is a combination of the TRM for the core and the AMBA/AXI spec which specifies the transfer types.  A lot has to do with the vendors implementation of the AMBA/AXI bus and not ARM itself as the bus is very flexible to allow parallel things to happen or forced to wait for one before starting another.
Answer: The Cortex A9 is the first ARM CPU where memory ordering was not straightforward: it has multi-core and has out-of-order execution.
Your best bet is the documentation section on ARM's website (registration required).  If that doesn't suffice, they will certainly be able to point you in the right direction.
Answer: Here is the link in ARM info center which stated complete Ordering requirements for memory accesses. Hope it helps.
Ordering requirements for memory accesses


Antagonist that remains unknown

Question: In genre fiction, the antagonist is usually either known throughout the book or revealed before the end, so that protagonist and antagonist can battle it out during climax.
What I am wondering is, how can a story work out, if the antagonist remains unknown? That is, the protagonist works towards his goal against an opposed force, the source of which is never revealed.
Think of the Lord of the Rings without anyone knowing of Sauron and what he wants. The hobbits and Gandalf would be unable to form a coherent plan. They wouldn't know the goal of their opponent, his weakness, the purpose of his actions, the relationship between him and the Ring. They would flee the Nazgul, seek information and allies, just as they do in Tolkien's novel, but they would have to figure out a solution by trial and error. Maybe they would come to the conclusion that they have to destroy the Ring, and maybe they would manage to do it in the right manner, but all the indication they got of their success would be the letting off of Saurons attacks. Much like the draft stills once you close the window, but you never get to see the source of the wind.
How would one pull that off? How could that be an interesting and satisfying read despite the lacking climactic battle?
And more to the point: What story would we tell? In The Lord of the Rings there is a conflict between two identifiable forces. There are many interpretations, e.g. that Sauron and his forces represent Nazi Germany, or industrialization, or just plain Evil, but despite the final meaning being open, the two forces are unmistakeable and the story tells of their conflict. In a story without antagonist, there would be no conflict, as a conflict needs two or more goals to be pitted against each other. In a story without antagonist, there would be no opposing goal. Even the protagonist does not have a veritable goal except to end the disruption.
The Lord of the Rings without an antagonist would lose both the Lord (the antagonist) and the Ring (the goal of the antagonist) from its title and with it the essence of its story. It would no longer be a story of two opposing forces, but a story of – what?
I guess it would be a story of whatever goes on inside the heroes. It would be a psychological novel. Or it would be a story of a society that has to deal with desaster. It would be a social or political novel. How could it remain fantasy?
Finally, are there examples of novels (or films) where the antagonist remains unknown, so that I could look at a working example?

The reason I ask this question is that I am always dissapointed when the antagonist is revealed in a horror or fantasy novel. When, as a teenager, I watched the old black-and-white Fankenstein movie, there was a strong sense of mystery and suspense, until Boris Karloff appeard. Immediately the wonder of the movie was lost. Special effects have gotten better, but still the same happens to me: as soon as I see the Alien, it appears banal and unterrifying and – as if the movie makers felt the same way – the movie turns from suspense to action.
I have always wondered how you can uphold the mystery. How the supernatural, the terrible, the strange, can remain what they are. And I think the only way is by not revealing them, by having them remain unknown and unknowable (which, I believe, is one reason the judaeo-christian God is such a powerful idea).
Comment: what about the movie *The Blair Witch Project*? I think that might qualify as "the antagonist is not revealed."
Comment: @LaurenIpsum Interesting, yes. But that movie sort of ends with the climax (the death of the film students), the plot is cut off. there is no, well, "resolution" isn't the right word, but a dénouement, a post-climax moment where the detective has to deal with the fact that the murder cannot be solved or where the victim escaped and has to deal with the fact that they will never know what hunted them and if it will come back. Something like that.
Comment: *Doctor Who* has some great examples such as *Midnight* or *Listen*. In the latter, we don't even know for sure whether the antagonist *exists* (nor does the Doctor or his companion).
Answer: Not every novel has an antagonist. Basic story structure is about desire and the things that frustrate desire. The thing that frustrates desire does not have to be a person -- an antagonist. In many cases, what frustrates the protagonist is their own pride or an anonymous social structure. Who is the antagonist in Pride and Prejudice (other than the titular emotions), Cannery Row, Brideshead Revisited, Voyage of the Dawn Treader, or Death Comes for the Archbishop?
Maybe the reveal of the antagonist, in genre fiction particularly, proves disappointing (which I agree it often does) because it is at that point the we realize that the protagonist is not going to be pushed the limit, and particularly not to the great moral challenge which I believe is the heart of all stories.
Ultimately, every hero's greatest antagonist is their own weakness. The greatest obstacle they must overcome is within themselves. Some device is needed to bring them to that point, but if the villain does not live up to the task of bringing them there, they are a disappointing villain. The author's real mistake, though, was probably in the penning of the hero rather than the villain. The villain disapoints because the hero does not have a satisfying story arc.
Comment: Well, "the danger just passes" pretty much says there is no story here, doesn't it? Unless the physical danger presents the protagonist with a moral danger which does not just pass but which comes to a climax within.  And perhaps the anonymity of the antagonist is part of the moral danger. There are certainly stories in which the source of the challenge to the protagonist's moral order is not revealed. Metamorphosis springs to mind. The conquest of the antagonist is symbolic of the conquest of self, and identity of the antagonist is certainly not required for that.
Comment: @what while "the danger just passes" certainly will not create desired tension, there are ways of doing so without revealing the antagonist behind an evil plot. In your example with abduction there is still struggle, obstacles your protagonist must overcome in order to free himself; the danger does not pass by itself, it is defeated. The movie Cube (I think there was a sequel, too) is an example of nearly exact scenario. I do not even remember who the antagonist was (some evil government organization?)--it was all about the struggle to escape from a deadly environment.
Comment: I wasn't thinking about a story *without* an antagonist, but about one in which there *is* an antagonist but he is not revealed. Think of an abduction. No ransom is asked for. The protagonist tries to free himself. And he escapes, simply by breaking out of the room he was locked in and without having to overcome the abductor. And the abductor disappears without ever getting caught or his identity and goals being revealed. There is an antagonist, and there is a dramatic story, but there is no climactic battle and no "resolution" of the mystery. The danger just passes.
Answer: I think it was Mark Twain who said, "Truth is stranger than fiction because fiction has to make sense."
What your question describes is what a lot of real life is like.
Very often, especially in politics and medicine, the problem people think they have to solve (and who/what is to "blame") is really just a symptom of some much deeper issue which is unknown because of ignorance, deception, or even just from having a world-view/paradigm that isn't powerful enough to encompass the true situation. Maybe it's something which hasn't been discovered yet.
We are all to some extent in this position. Nobody knows everything. Nobody consciously understands everything that makes them who they are.
People just know something is wrong and that something has to be done about it. Something is better than nothing.
Within this limitation, there are still heroes, villains, and great stories.
When a hero wins "the battle", a great deed has been done, but if what is gained doesn't solve the underlying problem, then "the war" remains.
This doesn't make the story less interesting, less compelling, or even less true. It doesn't invalidate all the transformations the hero underwent in achieving his/her goal.
It's just more like real life where progress is incremental rather than absolute. And lots of people act with the best intentions, but flawed understandings.
Happily ever after doesn't exist in the real world. We have to deal with things being better or worse than they were before we acted.
A simplistic example:
A person becomes ill and goes through a healing journey and becomes much better (possibly including moving away from the place where they got sick), but never finds out that the reason they got ill was the factory upstream dumping pollution into the water. Beyond that, they never find out who made the decisions which caused the dumping.
There are stories like this in the news all the time.
It's more satisfying if the conflict is totally solved, but it's more realistic if it isn't.
Someone can be just as heroic fighting the wrong problem as they would be fighting the right one. It just tends to be more tragic if the reader realizes it was the wrong problem.
Conspiracy theories and stories built upon them often feature unknown villains or vaguely defined ones who never come into view.
They're compelling because they make us question our views and, even if the real villain is never confronted, defeated, or even identified, some bad things that the villain originated do come into view and may be overcome or stopped.
Comment: Nice nice. I like that. Thanks. Have to let it sink.
Answer: The problem with not putting a name or face to an antagonist is that you're not allowing the reader to feel as if the protagonist is achieving anything. If the antagonist is defeated without ever being revealed, then it strips the feeling of accomplishment and justice being served to the evildoer who deserves it. If this is the effect you're trying to achieve then that's great, but it's very difficult to get a feeling of accomplishment when you're not sure what it is that you've accomplished.
If you have a definite person or organization that is the antagonist in your story, then your protagonist will want to put a name or face to them, that is what humans do. We need to try to know or understand what we are facing or it is much more difficult to overcome it. So whilst the enemy might be Joe, CEO of the Illumninati, the protagonist may not know that particular person, but will likely still understand that they are facing the Illuminati as a whole.
If the protagonist cannot put a name or face to their enemy, let's use your example of Sauron, then the antagonist in their story will not be Sauron to them. It will be Saruman, or Gothmog, or any other lieutenant that they know or face. If Sauron is not known to them, then he would not be their enemy, they would instead name the person they understand to be in charge of the evil in Middle Earth as their ultimate opponent.

The biggest problem usually in fiction with making the reveal of the villain is that the villain in person is not the thing to be afraid of. It's usually their influence over others, or their power to convince others to do evil, that is their real strength. Whilst Hitler was the ultimate enemy of the Allies in World War 2, I doubt anyone would have been overly scared to take him on 1-on-1 for a chance to end the war.
So when the heroes meet the villain in person, the reader understands that the biggest threat is already over. They have usually overcome much more difficult obstacles in order just to face their opponent, so the actual final showdown is less of a climax than beating their true difficulty was, which is the villain's command of every obstacle and enemy that the heroes have faced so far.
Sauron is actually probably the best example of what you are looking for that I can think of in fiction: They know who he is so can put a name to their ultimate enemy. He is incredibly powerful, but his power comes from the fear and control he has over his minions. At the climax of the story, that is what is overcome, as the company face off against his army that he has built through fear of his power, whilst Frodo literally fights to overcome the influence of the Ring in the final moments.
Comment: @what I would concentrate on individual stories. Why are the protagonists doing what they're doing, if not for the greater good? For their families? For money? For simply doing the right thing? There are thousands of soldiers in wars that fight for something they may not understand or even know of, but each of them has their own story and reasons for continuing. Maybe they're a mercenary fighting to earn money to pay off debts, and the antagonist to them is the debt collector, rather than the opposing army. He can hear rumors of the effect his role had in the greater war, but it's not his war.
Comment: Thank you, that is almost helpful :-) You put your fingers on all the right places. But how *do you* pull off a story in which there is no feeling of accomplishment because the protagonists are not sure what it is that they've accomplished? A story in which someone gets submerged in events and spit out, none the wiser?
Comment: Okay, so no matter how not-theirs that war is, it will always become a reflection of their own person and circumstances and they will fight their inner demons as projected into the sitation they find themselves in. Thanks, that *was* helpful.
Answer: This seems to be a case of leaving unanswered questions, or a sense of mystery in the story.
It is quite possible for this to happen. I recall that the books A Series of Unfortunate Events quite often left that sense of mystery, pretty much right up to the end.
In the case of an individualized antagonist, it is also possible to accomplish. The cunning and nefarious mastermind who always escapes, leaving behind little evidence, would be a prime example. Agents may be caught and unmasked, plots upset, plans foiled... but if the villain always gets away and remains mysterious, yes, it can be done.
The cartoon Inspector Gadget also toyed with this idea. You never see the face of the villain, he always gets away. Technically though the villain is "known", at least to the audience, in that example.
While there needs to be a mechanism to reveal information, and also hallmark the acts of the villain, for example, a trademark of some kind as a symbol denoting that "the villain was here"; there is no reason that the villain HAS to be revealed, or ever even shown.
Answer: Have you looked into Kafka's work, espcially Metamorphosis and The Trial? I think there's an adjective for what you try to achieve, and it's "kafkaesque".
Apart from that, I'm not sure how satisfying a story could be without a clearly defined antagonistic force (or one that is so well hidden it is hard to point a finger at it). As you point out yourself, stories are driven by conflict. The antagonist is the embodyment of the mechanism, force, literal person that tries to keep the protagonist from reaching its goal. If the reader doesn't know the antagonist -- I don't think the protagonist needs to know it(1) --, he will have a lot of trouble following the story. The best example I can think of is Chris Nolan's movie Inception: Cobb has a clear goal almost from the start of the movie. His antagonist are the "projections" of Fisher's mind -- subconscious defensive systems that try to keep intruders out of Fisher's head. When they sense that something is messing with Fisher's thoughts, they attack. While this is a great antagonist and makes a lot of sense in the framework of Inception, I didn't get it when I first saw the movie. The result was this: I saw a lot of battling and a lot of opposition to Cobb's goal, but I didn't get where that was coming from. I was confused. I enjoyed the movie enough to watch it again and get the whole concept of projections, but when I left the cinema, I was kind of dissatisfied. I wouldn't be surprised if there's people out there, who put Kafka's Trial down for the exact same reason. Not having an antagonist that the reader can understand and pin down leaves us confused. We might be aware of what the story is about, but we don't understand why the protagonist can't reach his goals. At some point, we get frustrated -- and might even stop reading.
t;dr: While it's not necessary that the protaganist is aware of the antagonist force, the reader should know it, even if it's abstract. Otherwise, s/he might have difficulties following the plot.
P.S.: Another thought: What if Fate is the antagonistic force? Fate is so abstract we can hardly grasp it. Yet, an entire school of Greek dramatists did nothing but write dramas about how Fate is inevitable.
P.2.S.: Concerning fantasy and horror: Yes, horror, for me, too, works best if I don't know what's going on. (Think of Stranger Things. At sime point, the Demogorgon just stopped being scary, because it was so unrealistic, and at that point, the whole series lost its appeal to me.) However, if I still don't get it at the end of the movie, I might have been scared like never before in my life, but I won't take any satisfaction from the experience. Rather, I'd be pretty grumpy, because I have suffered for no apparent reason (and probably won't be able to sleep for a week because I can't figure out why all the horror happened, and could it happen to me?). While this happens in real life, I don't think this is what we expect from storytelling. When I read a book or watch a movie, I want to take some emotional message from it, such as: Growing up is messy. Some marriages can't be fixed. Dropping out of college is not the end of the world. Family supports you, even if you're not a beauty queen. If I don't get this message, I might have been entertained (or scared), but the story probably won't stay with me. (Yes, I'm aware that's personal taste.)

(1) Example: A coming of age story. The story goal is for the antagonist to grow up. For the protagonist, it is very unlikely that s/he will ever be consciosuly aware of an antagonist, because s/he doesn't set out to "grow up". Nobody does. It's something that happens to you, and usually you don't even know what being "grown up" means until you realize that you're part of a social structure and cannot continue to live an insular life. The reader, on the other hand, is very aware of the antagonistic force -- say, selfishness and unawareness of others, innocence maybe, however you define that or "childhood" in general, as opposed to being "grown up".
A beautiful example is Hirokazu Kore-Eda's movie I wish (Kiseki) that reminded me a lot of the Stephen King adaption Stand by me. It centers on Koichi, a 12-year-old that wants to reunite his broken-up family. When he hears that two bullet trains passing each other at full speed for the first time grant a wish to the person who sees it, he sets out with a few friends to watch this magical moment. His wish is: Let the volcano Sakurajima next to my new village errupt really badly so that nobody can live there anymore. Then, he thinks, his mother will go back to his father in Osaka and he can be with his entire family again. It's a very selfish wish but something that a child is apt to do. Maybe you can guess how the movie ends. (It's really evident from the beginning, but still so beautiful to watch.) -- So, in Kiseki, what's the antagonist? Sure, Koichi encounters trouble: He loses faith, his younger brother is not really on board with his plan, he doesn't have the money to buy train tickets, the kids don't know where to spend the night. That's all problems, but not really the antagonist. The antagonist is Koichi's wish that cannot be granted, not even by a mircale. He suffers from his longing for his reunited family and must accept that his life has changed. Once he has achieved that, the movie is over. BUT: Koichi doesn't know that. And yet, the movie works -- because the audience knows the source of the conflict.
Answer: People are normally 'fighting' against forces that don't exist, almost all 'knowledge' is fabricated guesswork at best. We invent reasons for things internal and external and fiction is a partially honest embodiment of that.
Storytelling rules are one such fabrication, the reality of many stories is that they go from word to word, moment to moment, objective to objective, interaction to interaction, and only have plot because the author feels there should be one, yet carrying the plot is so often where otherwise good prose falls down.
What is a plot? It is a project that one believes to exist engineered by characters that certainly do not exist, even if your estimation of them fits well enough for your purposes.
Fictional antagonists are a reaction in the mind of the reader to the words on the page, built largely by implication. The implication can be more or less explicit.
A Novel opens with a character being told a story with plot, protagonist, antagonist etc. The novel continues with a story of events, perhaps a war, the protagonist gets swept up in it, spending most of it as a refugee travelling across the continent  dealing with looters and gangs and profiteers, avoiding the army whilst the remainder of her family try to teach her all manner of things but no longer possessing the books or the tools they find it as difficult to teach as she does to learn, our protagonist imagines she is Gara, fleeing the evil god Whatshisface, never realizing she's had a psychotic break.
A Novel opens with a character reading a news story about a russian spy poisoning some apparently random people, on the radio on the way to work there's a piece about how trump colluded with russia to influence the presidential election, at work that day she gets an error message written in cyrilic commented code when an in-house developed app crashes. She asks the guy who wrote it about the russian language in the cafeteria  three days later, after the IT team haven't responded to her request for help. He seems nervous.
On a hunch, she has a look at his projects folder and finds more russian! loads of it! She votes democrat at the midterms. Damned russian spies, they're everywhere!
Sorry, I got carried away. Anyway, point is people invent imaginary antagonists that don't exist all the time. An antagonist that doesn't exist can never be known.
Answer: It is possible to accomplish this by divorcing the identity of the antagonist from their presence.
If the antagonist has a presence (leaves notes, origami figures, small unicorn statues, a symbol, an ink pen, a minifig,  passes cryptic messages and taunts through other characters, or whatever) in the story, then their impact will be felt, even if the story never confirms the identity.
"Who" can remain mysterious, if they even exist at all, but the impact of the antagonist needs to affect the emotions of the readers in order to be effective as an antagonist.
Answer: If there is no antagonistic force then there is no story. Period.
Perhaps it is a vignette, an essay, or a slice of life. But it is not a story.
The difference between a human antagonist and an antagonist force can be muddled sometimes. Some answers assume that antagonist means only a human. But really, when you're talking about story structure, antagonist means antagonistic force.
The antagonistic force could be anything, including multiple antagonists or false antagonists, but there must be an opposing force. It could be a human with a face, a mouse, a monster, the weather, one's own internal demons, etc.
There are many stories where the antagonist is not human:

Stranger Things: black monster blob
Adrift: the sun, weather, one's own body
Ender's Game: an unknown alien species of bug which is not known until the end, although there are other lesser antagonists prior to that.
Lost TV Series: I honestly never understood the antagonistic force, and didn't enjoy the series much because of that, but there was always something creating problems. There was clearly opposition.

More examples here: https://www.helpingwritersbecomeauthors.com/what-if-your-antagonist-isnt-person/
To have a story, there must be opposition or resistance, an antagonist force. Otherwise, it is not a story people could enjoy. But having a story where the antagonist is not human, well, that is done frequently.
It's like building muscle, you can't build muscle without resistance.
Answer: As Mike C. Ford has stated in his answer, a story without a protagonist leaves the hero without an accomplishment.
Usually, the accomplishment in a story is achieved through a choice the hero must make, between two equal options: the hero must give up one thing to gain another. This choice is forced on the hero by the antagonist: you can save your parents, but if you do, I will kill the girl. Of course the hero will eventually overcome the antagonist and save both his parents and the girl (at least in Hollywood) or loose both (in literary fiction), but before that he must make the choice that will enable him to overcome the protagonist. His choice between two evils will change him and equip him with the ability that he lacked.
In a story without an antagonist, the demand to choose is still presented, but the hero does not make that choice. The antagonist disappears, leaving before the hero could have made the choice and overcome his weakness. The end is open and the audience is left to consider what choice they would have made.
Answer: Generally, the answer to a "can I do this" question is usually, "yes, it just introduces extra challenges."  In this case, you won't have the typical advantages of a story with an unmasked antagonist.  So what are those?  It builds audience engagement, by personifying the opposition, and it grants closure, when the antagonist is defeated.
If you can find other ways to build audience engagement, and to provide satisfying audience closure at the end, then yes, you can definitely do this.  Of these two, the harder one will be providing closure.  How can the characters and the audience be sure the threat is over?  So you'll either need to build a story where closure doesn't require seeing the antagonist OR where closure is not an expectation.
Answer: TLDR: Yes, but give us someone we know whom the hero can defeat.
Let's go to TvTropes and Star Wars for this.
Let's define some terms first.
In a story there are very commonly two antagonists, the Big Bad, and the Dragon. I think Star Wars is the best stereotypical example of the characters. The Emperor is the Big Bad, and Darth Vader is the Dragon.
Here are some things that define the two. The Big Bad is evil to the core. He is the reason bad things are happening. He is the brains. He may be strong or weak, or maybe just strong in his home base. Maybe he can't leave his home base. The Big Bad may be frail and not be able to act for long periods of time.
The Dragon has some honor. The Dragon does not have the weaknesses of the Big Bad. He may be weaker in theory, but is much better suited for going out and harrasing the hero on the hero's terms.
And we are back to the question. You can hide the Big Bad, but in that case you most likely need a Dragon, and you can't hide the Dragon. Star Wars, the first movie (Hope Awakens) is a great example of this. We see the Emperor in a hologram for a moment. That scene does not need to be there. We can just know that Darth Vader works for someone. We can get a feeling of how evil he is just based on Vader.
So when you create a narrative just make sure that there is a Dragon. Let the protagonist battle him.  The protagonist can then achieve his goals. IS it to survive and escape? is it to save the word? is it to get the girl? It does not matter, at some point the Dragon and the Hero can come head to head (or not) and the hero can use his heroic strengths to exploit the Dragon's tragic weakness. We can also know that the Big Bad orchestrated the conflict. He planned it, he did things to help the Dragon, and then he dissipated back into the shadows before the hero ever found out who he was. The story will be satisfying as long as the Dragon lies bleeding.
And maybe we will learn about the Big Bad in part two?

Antagonist that remains unknown


reminder emails from a sharepoint list

Question: I have a list of employees and columns of 10+ training courses they have to complete annually. I need to send out reminder emails when they are due but there could be more than 1 employee due a course on one day or one employee could have more than one course due on one day or lots of them could be due more than one course on one day. My workflow comes back with it will only return 1 result. How can I get it to check the whole list and send more than email reminder out. Thanks in advance
Answer: You could create the workflow that runs every day, checks for due courses and sends the appropriate emails to employees.
Easier said than done, of course. :)
How to do this:

Create the site workflow in SharePoint designer.
Add the loop that will contain all the
daily logic and the pause action at the end of the loop segment (set
pause for 1 day).

The logic should contain the following:

Call the SharePoint REST api to get all the due courses for the day.
(This article shows how to call the web service from workflow and
this article shows how to create the query using SharePoint REST
api).
Add another loop segment which should go through all the results of
the REST api call, and send the appropriate emails.

Depending on your data structure the queries could be more or less complex.
This is the high level picture of what should be done. It should be enough to start putting all the pieces together. After finishing the workflow, you should need to start it manually the first time, and it should run without ending.
Answer: You can create console application and schedule that console application inside widow task scheduler for onpremise and azure for online.It will run everyday and fetch all items from list then implement your logic and use SharePoint Utility.sendmail function for sending mail.

reminder emails from a sharepoint list


Proving that a sequence is monotone and bounded

Question: Let $x_1> 1$ and let $x_{n+1} := 2 - \displaystyle\frac{1}{x{_n}}$ for $n \in \mathbb{ N}$.  Show that $(x_n)$ is bounded and monotone.  Find the limit.  I am confused on how to show that the sequence is increasing or decreasing without having a specific value for $x_1$.  I think that I should use induction, but how do I define my base case?
Comment: I would try something by induction. Use any value of $x_1 > 1$ just to gain some intuition if the sequence is increasing or decreasing. Once you have proved it converges, start with $x_{n+1} = 2 - \frac{1}{x_n}$ and pass the limit: $L = 2 - \frac{1}{L}$ and solve for $L$.
Comment: "How do I define my base case?" I think you don't. Leave everything in terms of $x_1$. The fact that $x_1 > 1 $ should be enough to conclude something.
Answer: Hint.  To show that the sequence is always increasing, the base case would be that $x_2>x_1$, that is,
$$2-\frac{1}{x_1}>x_1\ .$$
Similarly, to show it is always decreasing, you would need to start with
$$2-\frac{1}{x_1}<x_1\ .$$
By doing a little algebra you should be able to work out which of these is correct.
Answer: Induction is a good plan.  The statement to prove will be (if we assume we're going to prove it's increasing) "$\forall n\ge 1: x_n\le x_{n+1}$".  The base case will be "$x_1\le x_2$".  To prove this without knowing the value of $x_1$, there's really only one thing you can do: use the given recurrence to relate the value of $x_2$ to the value of $x_1$.  That yields the statement
$$ x_1 \le 2 - \frac1{x_1} $$
to be proved.  So, solve this inequality, finding the values of $x_1$ for which it is true, and see if the problem's statement that $x_1>1$ lets you conclude that it's true.
Answer: Assume that $x_n>x_{n+1}$. Then invert, negate and sum $2$ to get $$2-\frac 1{x_n}>2-\frac 1{x_{n+1}}$$
which gives $x_{n+1}>x_{n+2}$. The boundedness is proved in a similar manner. What is a putative upper bound?
Answer: You can prove that $x_n \gt 1$ by using induction (this shows a lower bound).
To show monotonicity, you don't need induction.
$x_{n} - x_{n+1} = x_n + \frac{1}{x_n} - 2 \gt 0$


De-Cluster SQL Server 2012

Question: Is there any way to 'de-cluster' an instance of SQL Server 2012 that was installed using the 'New SQL Server Cluster Installation' option? We are having issues with the failover portion of clustering services and since we did not implement the cluster (and really there is no need) we would like to turn this into a stand-alone installation. Removing the Windows Clustering portion just took SQL down with it. All help and insight is appreciated, thanks!
Answer: You need to do this through the installer. Choose remove node from cluster in the SQL Server installer.
http://msdn.microsoft.com/en-us/library/ms191545.aspx
Comment: I believe it would leave you with a single-node cluster that bears the name of the cluster. From there, you would evict the node that you just removed from the cluster. Then you could install a separate instance on that piece of hardware.
Comment: Would this also remove the 'named' cluster portion? We have the one default instance right now that is handling all traffic using an alias.

De-Cluster SQL Server 2012


What would happen if an astronaut tried to swing a baseball bat in free fall?

Question: I am interested in finding out how swinging a baseball bat or similar object would affect the astronaut's rotation in free fall, on the ISS for instance. How much would the astronaut swing the bat, and how much would the bat swing the astronaut? Would the bat strike an object with the same amount of power as it would if the astronaut was standing on the Earth's surface? Would it strike with considerably less power since rotating the bat would also rotate the astronaut in the opposite direction?
Comment: Sitting in a swivel chair and swinging a bat would be a very good approximation that you could try at home.
Answer: How much would the astronaut swing the bat, and how much would the bat swing the astronaut?
In terms of angular momentum, the bat and the astronaut will be exactly equal and opposite; and in terms of angular velocity, this will be the ratio of their moments of inertia, which I'd guess would be something like 1:1, so these would be approximately equal and in opposite directions.
Would the bat strike an object with the same amount of power as it would if the astronaut was standing on the Earth's surface?
No. (I'm assuming you mean that the object is stationary in the initial frame before the astronaut swings.)  There are two reasons for this. The first is that the bat is traveling at approximately half the speed (that is, it will be the same speed relative to the astronaut, but from the answer above, in the stationary frame so it will be half the speed).  The second is that the astronaut has less force/torque behind bat at the time of the connection, which is important for the force the bat delivers.  To illustrate this consider two examples.  The first is a slap vs a punch, where a slap is approximately just the momentum of the hand, and the punch is delivered with the whole body behind it, including force from the feet against the floor.  The second is pushing a car, where instead of running up and slamming one's body into the car, one carefully places their feet against the ground and pushes.  Batting on earth is like this but faster, and losing connection to the ground will reduce the force.  (The other way to look at this is the torque that's applied to the bat at the time of the hit, where in the space-case the torque is against the astronauts angular momentum, and on the earth case the torque is applied against the batter-earth system.)
Would it strike with considerably less power since rotating the bat would also rotate the astronaut in the opposite direction?
Yes, as I explain above.
Answer: Considering only physics of it and not body anatomy and the associated inefficiency of swinging a bat while rotating,
The momentum imparted in both the case will be exactly the same because of the fact that in both cases (that is while on ground and when in space) the amount of force applied on the bat by you is exactly the same. Dont get confused by the reaction force, the reaction acts on our body and not on the bat and the reaction is always there irrespective of where you are.
Answer: Put the batsman on an office chair on a nice smooth floor perhaps kneeling and swing and wallop away. I think that's a fair simulation of horizontal motions for the problem.
Curiously I think energy rather than momentum kills this! And angular stuff just complicates but gets the same...
In free case, on the chair a small part of the energy released gets wasted on recoil of man and chair while with man on earth the recoil energy is negligible if he plants feet well and doesn't fall back. Like in Stranger Things you need to plant your feet. But it is anyway just a small difference as like with a gun most energy goes to the bullet no matter what.


When my location is turned on can someone track me?

Question: When the location is turned on can someone track me without me sharing my location with them?
Comment: Can you elaborate a bit? If your location is shared without you allowing it to be shared (i.e. without giving an app permission), that would be a bug in the software. GPS itself is passive, so you can use it without having to share information with others.
Comment: You might want to narrow it down from "someone" to a specific set. e.g., Friends/Family? Random strangers? ISPs? Some Author whose app you have installed on your device?
Comment: Of course the OP knows best but I interpret this as asking what safeguards are in place to ensure that location service information is restricted to the intended recipients, and how realistic is it for them to be circumvented.
Comment: 'Someone' in this context probably means an ex-boyfriend or something along those lines. A possibly tech-savvy individual that is threatening. The answer is: if he / she's clever enough to infect the phone, GPS can be turned on remotely so it doesn't matter. Without infecting the phone  or sending a location-asking webpage there's no common way.
Comment: So the short answer is: do NOT click on a webpage asking you to share your location. That's how i would do it. But you're already on the lookout so that's probably not a problem.
Answer: Your question sort of contradicts itself, because by turning your location ON, you are sharing your location. By sharing your location, you are making it a lot easier for this "someone" to be able track you. I suggest if you are woried about being tracked you start by turning off your location, or if you are really paranoid, then there are other methods of working with GPS and location.
Digital Location Security
VPN:
For starters you can use a VPN to hide your digital location when using the Internet. You can find a lot of them on Android (One example could be OpenVPN). This will help with anyone tracking you through the internet.
Tor:
Another way to help you hide yourself on the internet would be using Tor. On mobile devices, Tor Service is actually called "Orbot". You can also get "Orfox" which is like the Tor Browser (Firefox). But again this will only help you hide yourself on the internet.
Physical Location Security
This phase is used when you think "someone" is trying to physically track you down from the location of your device.
GPS jamming and blocking devices

GPS jamming gadgets – Commonly sold online, popular models simply plug into a vehicle's 12v adapter (similar to the one in THIS picture) and interfere with any GPS radio signal within a range of about 30ft.
Metal shields – A cheaper, non-powered option is wrapping the device in a metal sleeve such as brass mesh or a lead camera film protector. It has been reported that car thieves have been known to transport stolen cars fitted with GPS tracking units inside refrigerated trucks to block the GPS signal.
GPS spoofing gadgets – These gadgets can send a fake radio signal that overrides the signal being transmitted by the GPS device and reports a fake location. These are not only illegal but can be dangerous to other GPS users, particularly those used in commercial transportation.
Mobile phone jammers – Many GPS devices report real-time tracking, which uses a wireless carrier to communicate this information to the person doing the tracking. A cell phone jammer can be used to block the signal being transmitted to the wireless carrier preventing status updates being sent. Unlike a GPS jammer this also prevents mobile phone use.

Resources
You can learn more about GPS and wireless signals with the link below:
http://gpssystems.net/gps-jamming/
and remember...You can never be 100% invisible from "someone", however, you can make it more difficult for "someone" to locate you digitally, and physically using some of these steps above.
Comment: "Your question sort of contradicts itself, because by turning your location ON, you are sharing your location." - How does using GPS imply that you're sharing your position?
Answer: First, I assume from the question and your profile, that you are an average user of Android, who wants to learn a bit about technology.

It is important to know, what are your aims, to be able to help you to achieve it. Do you wish to be not tracked?
When you turn on your location sharing, you are allowing the phone to "officially" share its location directly with other applications. You can chose to turn it off, but it does not necessarily mean, that noone can see where is your phone, or you personally.
There are other legal or not legal ways to follow your "online" activity. If you want to hide the location of the phone from an average user there are few ways to do it, if you have all the abilities (the owner of the phone). If you want to hide your activity from corporations or higher authorities, it will demand higher levels of technical knowledge. There are many ways to circumvent these blockings. Practically it does not matter if your phone is turned on at all to track you, because the main function of a mobile phone is to find it anywhere to be able to be communicate with it.


Is d'accord used to express permission...or that something is allowed?

Question: I know that "d'accord" expresses agreement...as in Okay.
But is it also used to say something is "allowed".  As in "Is it Okay for us to wait here?".
Answer: It is not used to ask if something is allowed, as in "Is it okay for us to wait here?".
It might be used in answering such a question though;

Est-ce que ça va si on attend ici ?
one might then answer as follows;
D'accord, vous pouvez attendre ici.
But then, implicitly the person answering is telling you that this possibility is conceived rather on the basis of their personal judgement and/or authority over the place.

If you use « d'accord » to ask the question instead, then you are asking specifically the given person whether they give their permission, you are not asking whether, according to habits, customs, rules etc. you might do that, and you do the asking as follows;

Êtes-vous d'accord pour que nous restions ici ?
Is it okay with you if we wait here?

There are variants;

Est-ce que vous êtes d'accord pour que nous restions ici ? still the standard register
C'est d'accord si on reste ici ? somewhat informal