What does "gateway" in routing table refer to?

Question: What exactly does gateway in a route refer to? I know what a default gateway is- it's the route of last resort. But used in context of a host route (with destination specified), what is a gateway and why is it important?
Answer: The gateway is the next hop in both default routing and host routing.
Since almost every interface has an address, it knows about its locally connected network and so the host needs no routing info as all stations on the same network are addressable.
Typically, only a default gateway is needed next, once the packet reaches the default gateway routing becomes someone else's problem.
But imagine a network with multiple exit points. Some may be faster than others. Some may be more expensive. Some may have administrative restrictions on traffic.
So, to route to a specific remote network or a specific remote host, the only thing the originating station needs to know is "where do I send the packet so it becomes someone else's problem". If there is more than one multihomed system ("router") then a decision must be made, for each destination host or network, which exact host on the local network will handle the packet after it leaves the originating interface.
Once again, a one-hop route is all that is needed. As you can see, the originating endpoint is not really in control of routing, except for the first hop. That's part of the magic of IP and the reason it has displaced all other networking technologies.
Answer: Quoting this excellent handbook,

A "route" is a defined pair of
  addresses: a "destination" and a
  "gateway". The pair indicates that if
  you are trying to get to this
  destination, communicate through this
  gateway.

So, a gateway is any router (or routing host) through which packets pass (are sent) when trying to reach a given set of destinations.
Comment: So then would the defined IP tables on the gateway determine what happens to the packet from there?
Answer: It's the machine that receives packets that are being sent to a specific range of addresses.
Answer: Each router has three values Address, Mask and Gateway. Whenever an IP packet arrives at a router, its IP address is masked (using  bit-wise AND) with a Router Mask  and compared to a Router Address. If the the Masked IP address is same as Router Address it is sent to a corresponding gateway. Just keep in mind this is a simplification of the process, in reality it is a wee bit more complex.
In layman's terms each packet knows where he is headed (IP address) but doesn't know how to get there, so he asks each router for directions (masking IP address and comparing to router address). Of course routers probably don't know where exactly he should go, but they can give directions as to where they might find someone who can (gateway). In case they haven't got any clue where that place is, they just send you to a default gateway.
Answer:
But used in context of a host route (with destination specified), what is a gateway and why is it important?

When you want to send a packet to someone not on the immediate network, you can't just put it on the wire, because they won't see it.
What instead happens is that the system looks at its routing tables, determines the appropriate gateway, and basically says to it "Hey, could you forward this to where it's supposed to go?"


How many generations does it typically take for a differential evolution method to reach a global optimum?

Question: For differential evolution methods in optimization, how many generations does it typically  take to reach a global optimum?
How do we know if the values are never going to converge?
Answer: I don't think there's enough information to give a heuristic like, "in general, it takes $k$ iterations for differential evolution to reach a global optimum".
First, we don't know how many iterations deterministic global optimizers will take to converge to global $\varepsilon$-optimality in the general case. In limited special cases, we know that certain optimization algorithms will converge within a certain number of steps (e.g., simplex algorithms for linear programs, branch-and-bound algorithms for mixed-integer linear programs, polynomial integer programs, Newton methods for unconstrained convex quadratic programs, conjugate gradient methods for unconstrained convex quadratic programs, Newton methods for unconstrained convex nonlinear programs inside the quadratic region of convergence).
Second, differential evolution is a nondeterministic global optimization algorithm.  Nondeterministic global optimization algorithms have weaker convergence theory than deterministic optimization algorithms. While deterministic optimization algorithms converge with certainty (provided the hypotheses of the algorithms used are satisfied), if a nondeterministic global optimization algorithm has a convergence proof, it is usually a proof that the method converges with probability one. Here is an example of a paper that does just that for a genetic algorithm. "Convergence with probability one", while precise, and certainly better than no result at all, is akin to saying, "if we let this algorithm run for long enough, it will eventually search the entire search space, and return the correct answer". If the search space is infinite, it could take infinite time, which is...not a very helpful result. (To be fair, the deterministic case isn't that much better when it comes to global optimization.) A cursory literature search suggests that the convergence theory for differential evolution is not well-developed, and without one, it's difficult to say if the method will converge at all.
Finally, for deterministic algorithms on general problems, it's entirely possible for a significant optimality gap (i.e., the difference between the upper bound and lower bound calculated for the objective function value) to persist for tens to hundreds of iterations with little improvement, and for the rate of decrease in that optimality gap to depend on tolerances and algorithmic heuristics provided to the optimizer for a given problem instance. A significant amount of effort has gone into coming up with "best input tolerances and heuristics" for general problems, and for "autotuning algorithms" (supposedly, for instance, CPLEX has one) that will determine best values for these tolerances and heuristics. You may find that over the course of your experience with the algorithm that you get a better feel for how to pick input tolerances and heuristics for differential evolution as you work with it, and what values work best for different types of problems. Experimentation is often needed with numerical algorithms (witness, for instance, the amount of experimentation still necessary for solving systems of linear equations with iterative linear solvers). You may find the thesis Tuning & Simplifying Heuristical Optimization helpful.
Answer: This method makes few or no assumptions about the problem being optimized and can search very large spaces of candidate solutions. However, DE does not guarantee that an optimal solution is ever found for certain types of problems. DE is used for multidimensional real-valued functions but does not use the gradient of the problem being optimized, which means DE does not require for the optimization problem to be differentiable, as is required by classic optimization methods, such as gradient descent and quasi-newton methods. DE can, therefore, also be used on optimization problems that are not even continuous, noisy and change over time.
The generation size heavily depends on the tolerance of error (precision) you want to accept as well as the hardness of the problem. In addition, Crossover Rate (CR) is also an important parameter especially when CR≈0, DE makes very small exploratory moves. The search proceeds in a gradual but consistent fashion as the likelihood of making an improving move is higher when moves are small, even if the change in solution quality is not great. When CR≈0.9, DE makes large exploratory moves that, while being less likely to be improving, can yield large improvements in solution quality. These large moves also reduce population diversity, which is a necessary step so that subsequent moves are scaled appropriately for performing a more fine-grained search of the solution space. When CR≈0.5, DE behaves more similarly to when CR = 0.9 than when CR = 0. Large moves with large improvements also result in a reduction in population diversity, yet it appears plausible that the population is often still too spread for difference vectors to be scaled appropriately to continue the search.


Could the crashed Mars Express lander be imaged by the MRO orbiter?

Question: The Mars Reconnaissance Orbiter has taken direct images of the MSL Curiosity rover, its parachute, heat shield and sky crane. Could it image, or has it even already, the failed Mars Express lander with its Beagle 2 rover? If it can't, then for what reason? Would such an image be likely to give clues to why it failed?
Answer: Maybe. A search of University of Arizona's HiRISE catalog reveals 22 images, most captioned 'Search for Beagle 2.' Page 2 of the search leads us to the following image: Portion of Beagle 2 Landing Ellipse in Isidis Planitia cut b:

Or maybe not: see David's comment below. From the Wikipedia article:

On 20 December 2005, Professor Pillinger released specially processed images from the Mars Global Surveyor which suggested that Beagle 2 came down in a crater at the landing site on Isidis Planitia.(4) It was claimed that the blurry images show the primary impact site as a dark patch and, a short distance away, Beagle 2 surrounded by the deflated airbags and with its solar panels extended.(5)

However, Mars Reconnaissance Orbiter's HiRISE camera subsequently observed the area, in February 2007, and revealed that the crater was empty.(6)

See also: Map of all Mars landing sites, failed and successful
EDIT: According to this January 16th JPL article, MRO has finally located the Beagle2.

A set of three observations with the orbiter's High Resolution Imaging Science Experiment (HiRISE) camera shows Beagle 2 partially deployed on the surface of the planet, ending the mystery of what happened to the mission more than a decade ago. They show that the lander survived its Dec. 25, 2003, touchdown enough to at least partially deploy its solar arrays.

Subsequent re-imaging and analysis by the Beagle 2 team, the HiRISE team and NASA's Jet Propulsion Laboratory, Pasadena, California, have confirmed that the targets discovered are of the correct size, shape, color and dispersion to be Beagle 2. JPL planetary geologist Tim Parker, who has assisted in the search and processed some of the images said, "I've been looking over the objects in the images carefully, and I'm convinced that these are Beagle 2 hardware."
Analysis of the images indicates what appears to be a partially deployed configuration, with what is thought to be the rear cover with its pilot/drogue chute (still attached) and main parachute close by. Due to the small size of Beagle 2 (less than 7 feet, or 2 meters across for the deployed lander) it is right at the limit of detection of HiRISE, the highest-resolution camera orbiting Mars. The targets are within the expected landing area at a distance of about three miles (five kilometers) from its center.
Comment: That photo is taken as evidence of not being of Beagle 2. An earlier photo by the Mar Global Surveyor of that same area convinced the Beagle 2 project team that that was the site where Beagle 2 crashed. That Mars Global Surveyor photo was incredibly fuzzy, worse than face on Mars fuzzy. This improved photo told analysts "oops, not there."
Comment: That crater looks like it's about as deep as it is wide, judging from the lower left inner edge of it. But it could of course be an illusion, maybe it's the parashute spread out and partly covered. The heat shield of MSL was released at 160 m/s and it didn't create much of a crater.
Answer: The reason why HiRISE (The camera on MRO that took the images mentioned) was able to take those pictures is that it knew exactly where the object landed. It has in fact attempted to find the Beagle 2 rover, which is a difficult task. There's an excellent article on the attempt on the HiRISE website. Depending on exactly what happened, different things might be seen, letting one know exactly where in the EDL process the lander failed. However, finding it is quite difficult, without knowing where to look for it.
Comment: Methods for determining where an object is require a radio beacon, or else they have to guess. A nominal landing ellipse is around 2000 square km, give or take. That assumes a correct deployment sequence. Not knowing if, say, a parachute failed vs something else, it's really hard to predict.
Comment: The HiRISE website says that none of the six crashed Soviet landers have been found either. I suppose that's true for the crashed NASA Polar Lander too, since it isn't mentioned. Space flight and astronomy is a wild mix of precision and uncertanties. The deceleration of the Pioneer probes could be measured with absurd accuracy tens of times further away than Mars. But they don't know where probes land on Mars? Is it the atmosphere which displaces them randomly? Is that type of problem history now, given the triumphant MSL landing which the world could follow in (almost) live video?


absolute vs relative urls and how browsers interpret hrefs to send http requests

Question: I want to know how browsers send http requests based on absolute link which starts with a forward slash say /images/myimage.jpeg. Now if i have server replication and say http://foo.com request can go to any of the servers say server 1, server 2 and server 3 and I have images only on server 1. Now if i send a request for a page mypage.html and the request goes to server 2 and mypage.html has a link with  href="/images/myimage.jpeg". I want to know that clicking on that link would search for myimage.jpeg in the images folder on the local hard drive of server 2 from where the page mypage.html is fetched or there would be http request that could go on any of ther server something like http://foo.com/images/myimage.jpeg.
Answer: you are directly requesting foo.com server to look into images/ directory for the file mymage.jpg. If the foo.com resolves to server1 and server1 has the images/myimage.jpg then it will be downloaded to your browser. Otherwise it wont. But instead if you have the image in a < img href=server1/images/myimage.jpg> tag which will always resolve to server1 and get the images displayed on the browser.


measuring time spent on tasks

Question: I'd like to know how much time I've spent usefully and how much time I've wasted in a day/week/month. This could be done with a program, that one triggers when a task starts and when a task ends, recording the amount of time in between the triggers and then keeping stats in a database. Does some program, that allows this, exist for Windows or Linux?
Comment: For Windows, I recommend the accepted answer on [this question: http://softwarerecs.stackexchange.com/q/696/6834](http://softwarerecs.stackexchange.com/q/696/6834)
Comment: I had some nice ideas for Android, where starting/stopping the timer could even be accomplished via QR-Codes or NFC tags to make things easier – but I understand that's not what was asked for :)
Comment: Yup, @Timmy was correct. This question should be closed as duplicate (which I currently don't have the rep to do)
Comment: @Mawg The question has the Linux tag. It's why I'm hesitant to mark it as duplicate until we have a response from the OP.
Comment: @Timmy the links are fine, but I'd prefer Linux suggestions to Windows ones. Nevertheless, you can mark it as a duplicate, if you think it appropriate.
Comment: @user1095108 If you are interested in a Linux software, then I think the question is still relevant, but it's better if you edit it to convey that
Answer: Time Doctor seems to be a perfect fit for the requirements you mentioned.
It tracks your time with the simple trigger of a go button. And, you can click break when you are not working.

And yes, it stores everything in a database/dashboard. It's like giving you an analytics of your workday.

It's also open source. So, it works with Windows, Linux and OS X.
If you are interested, you can check more of its features here:
http://www.timedoctor.com/features.html
Answer: If you are OK with an online version I suggest RescueTime. It installs some software on your computer, then monitors every executable you use and all webpages you visit.
These are all categorized (an advantage of being a centrally hosted solution) and after some time it shows you the time spent in these categories (either in your browser and/or my weekly email overview).
It 'knows' a large amount of programs/websites and those it does not recognize you can add to the categories. The categories you can lump together in productive/not-productive time, so that in its top-most aggregate you get a "percentage productive time".
The paid version has more facilities than the free one, but I suggest you give the free version a try first.
Answer: For a windows solution I would suggest Eylean Board. It is primarily a project/task management solution, but it has exactly the time tracking specification you have described.
With Eylean time tracking can be done automatically, with a trigger to stop if you have been idle for a while, or manually, where you simply input the time spent on tasks. You can always use a mix of both as well. Besides the software has a variety of features and is really easy to use.
Answer: KTimeTracker
KTimeTracker is a task management utility from KDE. It tracks how long you spend on different tasks and stores the records in portable formats. It allows you to:

Organize tasks into subtasks up to some 1000 levels

Edit task history and comments

Detect pauses. It stops recording when the computer is idle for a configurable amount of time

The time history can be exported to a comma-delimited text file for importing into other billing and/or project management tools.
(Source)

It can be installed on Linux or Windows, but it comes as part of the Kontact suit and has to be installed along with all the other components.

measuring time spent on tasks


live usb corrupted

Question: need your help.
i was using the LTS version via usb drive on, 5 days earlier i downloaded the latest 13.10 version and decided to install on the laptop. i've win xp installed on my system.
so i tried to make the live usb as my optical drice doesnt work anymore, to my surprise after the formatting was complete the totla size of the usb was only 983mb, while its a 14gb stick. this is the same usb on whicl i was using the LTS version.
i used the PowerISO software to make the live usb, same was used earlier also. first i thought it may be a problem with the software itself so i borrowed another usb from my friend of 4gb, the process completed successfully and the system even booted from the usb. i turned ot off and booted the xp and inserted the usb it again showed the same, total size 983mb.
now both usb sticks are corrupted, is there any way to recover the usb...?
Answer: You can install GParted from ubuntu software center and format your usb sticks.
Comment: thank you for the help, now the usb is recovered but still no help on the installation front...

live usb corrupted


Heal burn wounds in the wild

Question: When out in the wild and a companion falls into the fire and gets injured very badly. How can I aid his wounds? Would be great to hear from some possible herbs (natural materials in general) but common camping equipment is also "allowed".
Comment: This is a tough question. The best answer is "get help" however possible. If the burns are really that bad and cover a percentage of the body, the burn victim has a great chance of going into shock. If the burns are 3rd degree you also run into the possibility of infection which is deadly, especially when the body is in a weakened state and possibly in shock from being burned. If the burns are 1st degree or even second degree, cool mud can help keeping it cool and help with the pain. Herbs aren't universal, but keeping the victim warm and everything clean and as sterile as possible are key.
Comment: As someone who's too dense to reapply sunscreen and too comfortable with fire to be afraid, I've had my share of burns. As far as treatment goes, rehydrating the burned area is priority #1 (third degree burns are different). I have had much better luck submerging the burned area in cool water for a time dependant on the severity of the burn than I have with aloe or a variety of other treatments, with the notable exception of burn cream. That stuff is magical. There is little help for third degree burns, as there is usually irreversible damage. Get emergency help immediately.
Comment: @Zach -Good points for minor burns, but "fall into a fire and injured very badly" is not something you put stuff on to fix.
Answer: I've been out in the woods with companions who have suffered severe burns. You first priority is to relieve the pain, you accomplish this by removing the heat from the burn. Cool clean water is your best friend for the first few hours at least, have the victim stick his hand in a cool clean lake or stream. I say cool water, not cold water. If the water is too cold then your companion will not benefit from it as much, because the cold will also cause pain, and they will not be able keep the burn under water. Depending on where the burn is, and what time of year it is, hypothermia may be a concern while trying to cool a burn if you have to remove clothing, in which case you may need to consider using a cool wet cloth and apply it to the wound,continuously re-soaking it as frequently as necessary. Keep the burn cool, but keep the victim warm.
Your primary concern with burns is infection, if you are only a few hours or a single days journey away from help, then this is less of a worry, but if you are deep in the back country, then you need to be careful to keep the burn area clean. Hopefully you have some sterile bandages in your first-aid kit, and shame on you for going on an expedition unprepared if you don't.
There are some natural remedies for treating burns, you want to find plants that have antibiotic properties such as:

Yarrow
Cedar
Raspberry leaves
Oak bark
Whatever is indigenous to your area (some research required on your part).

We have lots of yarrow where I'm from, so it's always the go-to plant.
You need to learn how to prepare them too, so that you can take advantage of their useful properties. Yarrow is easy, you just crush it up with a little bit of water and apply the paste, with stings and bug bites you can just chew it to make a paste, but with burns, saliva is one of the quickest ways to introduce bacteria into a wound.
Teas are good as well, they aren't as effective as placing an ointment directly to the wound, but drinking teas made from plants with antibiotic properties is kinda like taking penicillin, it puts those antibiotics into your bloodstream. Making tea is also a lot easier than preparing a salve or ointment, less risky too, an inexperienced medicine man could do more damage than good playing witch-doctor in the woods with rudimentary tools.
The best piece of advice I can offer you is to BE PREPARED before going out into the woods, and bring what you would need in your first-aid kit to treat a bad burn should anything happen to one of your company.

Edit from Comments:
Apparently there are some people under the impression that yarrow looks similar to poison hemlock. The reality is that their leaves look absolutely nothing alike. Yarrow is a very easy herb to identify. See the images below.
Yarrow:

Poison Hemlock:
Comment: The only problem with yarrow is that it has a poisonous lookalike: hemlock which is indistinguishable unless you've shown both side by side and have committed it to memory. A lot of other herbs look like yarrow as well but may not confer much benefit, such as carrots, Queen Anne's lace, parsley, coriander and others in the same family.
Comment: I didn't think about raspberry leaves, they are acidic and that's very good. What about relatives like blackberry and wine berry?
Comment: @Escoce Blackberry I know for sure, it just doesn't grow around where I'm from.
Comment: @Escoce Hemlock is not native to Canada, and I can't say I've ever seen any growing in the Canadian Rockies before. But looking at pictures, I can't find any similarities. For one, hemlock has leaves, yarrow grows around here like tiny little ferns that look like feathers, or like a moths antenna. The two are very distinguishable. besides, I would never recommend anyone use an herb they are not familiar with, and cannot positively identify. If you don't know what yarrow is, learn how to identify it before you try using it.
Comment: I think you need to take a look at mature plants. All the carrot family plants look almost identical if you don't already know what they are. When they are immature I challenge anyone to be able to distinguish between many of them.
Comment: @Escoce, I took a long look at it, and I don't get how anyone could confuse the two. Look at the images I added to my answer.
Comment: You say that `you can just chew it` but that `saliva is one of the quickest ways to introduce bacteria into a wound`. Could you clarify? Do you mean to chew it instead of applying it over the wound? Or that you can chew it to make a paste, but only as a last resource?
Comment: @Rolfo, Chew it to make it a paste, but only for stings, and I usually make whoever has the sting be the one to chew it (it has a very potent flavour). If you're putting it on an open wound or bad burn that's blistered and broken the skin, then you want to find something you can use as a pestle and mortar and make a paste with clean water.

Heal burn wounds in the wild


Best way to practice bass (drum) technique without a bass drum

Question: A question to all those who have been or are in my current situation of temporarily not having access to a bass drum to practice on. I do have a pair of sticks and carry a pad to practice my hand technique, but I am clueless as to what is the right way to practice my foot technique when on the go. I have only tried tapping my feet on the ground with the heel firmly planted down to emulate playing heel down. Would this be recommended for extended periods of time (a few months) without reliable access to a bass drum? Would appreciate any other recommendations as well. TIA
Answer: I used to use a regular kick drum pedal attached to a Yamaha electronic kit standalone bass drum pad. At least you can practice dynamics on the pedal/kick drum more effectively this way.
You may be able to pick up an old one or create something yourself to emulate this.
Comment: Even a kick pedal with a robust cardboard box on it might do.
Comment: Great suggestion! This might be the best course of action for me, especially considering the fact that it wouldn't be giving my neighbors a reason to object to loud noise etc.


What kind of thinset should I use on porcelain?

Question: I found some porcelain tiles that look like the wood planks, they are 6x24 and I am having trouble figuring out what kind of thinset and trowel I should use.
Answer: If the tile maker does not have a suggestion (they often do - see if they have a website if there's nothing in or on the package) any thinset and a notched trowel somewhere between 1/8x1/8x1/8 and 1/4x1/4x1/4 (depending on floor flatness) should do. Concrete is an excellent tile substrate (does not tend to move or flex) so there's no need for special acrylic modified flexible thinset.


How are the Tenchi timelines related?

Question: Between Muyo, Universe, GXP, and Ryo-ohki, I'm thoroughly confused. Sometimes Tenchi series seem to be related (Ryo-ohki and Universe) and sometimes not (GXP). What are all the Tenchi series, are they related, and if they are, how?
Answer: This is a bit complicated. The links are to MAL, but I've found that different databases index these very differently. Sources are mostly in the links, but I had to reference Wikipedia and Tenchi Muyo Wiki as well.

Tenchi Muyo! Ryo-Ohki is the original OVA series, which was brought to the US simply as Tenchi Muyo (I don't know about other countries). This was adapted into a manga series. Simultaneously the OVA series got a special OVA and then another season. After that there's a special for the second season of the OVA. There's a further third season, which ends the story, and there's a sort of alternate ending special Tenchi Muyo! Ryo-Ohki 3 Plus 1 as well. There's also a sequel manga series which covers some more events, Shin Tenchi Muyo! Ryo-Ohki. Between both manga series, they mostly cover the first two OVA series, and are technically non-canon, though the changes are mostly minor changes.
In addition there are many things in this timeline which are not related to the main story. There's a spinoff manga series about Sasami, Tenchi Muyo! Sasami Stories.  There's also a special for Mihoshi's back-story in this continuity. Tenchi Muyo! GXP also falls in this continuity, 1 year after the ending of the OVA series. The Isekai no Seikishi Monogatari anime takes place 15 years after GXP, and has both a manga and a light novel version. There's also a radio drama (hence no MAL link), Tenchi Muyo! Ryo-ohki Manatsu no Carnival, which presumably falls in this continuity, but I have not listened to it.
The second Tenchi movie, Tenchi Muyo! Manatsu no Eve is sort of separate from everything else. It's technically not placed in the Ryo-Ohki continuity, but a separate, closely-related continuity. Sites disagree on this, but Tenchi Muyo Wiki has the most convincing argument, namely that Kiyone doesn't appear in the Ryo-Ohki continuity, but does in the movie.

Tenchi Universe is on a separate timeline, but is loosely based on the original season of the OVAs. This is a 26-episode TV series. The first film Tenchi Muyo! in Love is a sequel to this series. The third film, Tenchi Muyo! in Love 2 is a sequel to the first film. This film has a manga adaptation.

Tenchi in Tokyo is a 26-episode anime series with its own continuity. The only other things in this continuity are the related specials.

There are a bunch of other spin-offs, mostly with their own continuities. Dual Parallel! Trouble is an alternate continuity, except with mostly different characters. It has a sequel of short episodes. There's also the Pretty Sammy series, which have Sasami as a magical girl and are independent of everything else. There's a 3-episode OVA for Pretty Sammy. There's also a 26-episode TV series with short specials, which in English is known as Magical Project S. This is a different continuity from the original Pretty Sammy OVA series. A third Pretty Sammy series is Sasami: Mahou Shoujo Club, but this is now following Iwakura Sasami, a new character, yet again in an alternate continuity, and it's very much removed from the original Tenchi series. It also has a sequel. Battle Programmer Shirase shares the character of Misao Amano with Pretty Sammy (where she has the alter-ego Pixy Misa), who also makes a cameo in Dual.
In addition, there's an RPG video game, which is sort-of based on the Ryo-Ohki continuity. There's also an English-language RPG based on the Ryo-Ohki continuity published by Guardians of Order. I have not played either so I don't know how closely they are related to the original series.

To the best of my knowledge, that's everything major that's been released to date. If I've missed anything I'll be happy to add it.
Comment: Call me blind but I don't see you mentioning No Need for Tenchi  manga, which is placed in the OVA timeline. Also 4th OVA and Ai! Tenchi Muyo could be mentioned as an update to this answer. Apart from that your answer puts an order into confusing world of Tenchi franchises :)
Answer:
A breakdown
There are 3 major timelines in Tenchi Muyo!. There is the OVA/Ryo-ohki timeline, the Universe timeline, and the Tokyo timeline.
The OVA/Ryo-ohki timeline is the original timeline released, and is considered the primary canon story. It contains 3 OVAs and 2 OVA specials (which make up 26 episodes of Tenchi Muyo!, the one that aired in America). Also in this timeline is Tenchi Muyo! GXP, and the newer series, Tenchi Muyo! War on Geminar.
The Universe timeline consists mainly of Tenchi Muyo! Universe which began as a story based off of the first 6 episodes (the first OVA) of the Ryo-ohki timeline. However,  it branched into it's own story, and got two movies, Tenchi Muyo! Tenchi in Love and Tenchi Muyo! Tenchi in Love 2, also known as Tenchi Forever!.
The final major timeline is the Tokyo timeline, which is where the series Tenchi in Tokyo! fits in. It is really on it's own there, but was originally planned to be an extension on the Universe timeline[source]
From there, there are a few spin off timelines. The first and still sort of canon one is the Pretty Sasami timeline, which has many ties to original characters from the series. Note that each of the series in the Pretty Sasami timeline is very related, but in its own continuity. And then there are non-canon ones like Sasami: Magical Girls Club.
Overall, this is a series that has a lot of conflicting canon without really having anything set.
Comment: The image agrees with my post, except that Pretty Sammy OVA and Magical Project S are in different continuities according to Wikipedia: http://en.wikipedia.org/wiki/Magical_Girl_Pretty_Sammy
Comment: @LoganM Ah, good catch, I missed that. I'll update the image.
Comment: I want to add a little bit I figured out by watching all of Tenchi War On Geminar. What I have figured out is that Kenshii Misaki is in fact half Geminarian. One of the main antagonist characters hints at the fact that Kenshi's mother, Rhea (Tenchi's stepmother), is the missing third artificial human being of Geminar. As well Nua told Doll who told Kenshi that he inherited his power from the third artificial human who can only be his mother Rhea. So like Tenchi is half Jurian his half brother is half Geminarian.
Comment: Both brothers are powerful and kind and I actually think though Noboyuki doesn't think much of himself that he had a big part in making both boys awesome, but all the power is coming from the mothers. Tenchi Series is complex with lots of different universes.
Comment: But how come No Need for Tenchi is being considered as non canon?. It heavily relies on 1st and 2nd OVA.
Comment: Also this should be updated with information about 4th OVA, which apprently comes after GXP in the OVA timeline. And Ai! Tenchi Muyo too :)

How are the Tenchi timelines related?


How to stop forgetting proofs - for a first course in Real Analysis?

Question: I am taking my first course in analysis. I like the subject. I study it almost on a daily basis. I try to prove theorems on my own without even looking at the hints. If I really get stuck I just read the first line of the proof and then try to continue on my own. I find this approach to be very rewarding. The problem is that I tend to forget all the proofs later. Some I still remember because I liked the idea of the proof, but most of the others I will forget fast. What am I doing wrong? Any tips on how to study analysis?
Comment: As an old professor of mine used to say: "To remember a thing you must first forget it nine times."
Comment: I don't think you are doing wrong. After all - at least for those proofs were you "guessed right" - there is nothing for you to forget, as you are apparently able to (re-)construct the proof.
Comment: By the way, for tips on how to study analysis, see [How to Think about Analysis](http://ukcatalogue.oup.com/product/9780198723530.do) by Alcock (OUP, 2014).
Comment: @JW +1. Supernal suggestion!
Answer: Don't try to memorise the proofs: try to memorise the methods that are used in most analysis proofs. That way you only have to memorise a handful of methods instead of 30-50 proofs, and you can adapt them to prove things you have never seen before as well.
Comment: This is corrent advice in principle, but it's not very helpful at explaining how to do this in concrete terms. What are the main methods used in 'most analysis proofs'? How does a beginning student recognize a 'method' and figure out how to adapt it?
Comment: This is the main point I like in mathematics. If I forget something, I can figure it out on my own. Sure, you should remember some definitions because you can't really figure those out, but apart from that, you can figure out the proof yourself with enough experience and time.
Comment: This has saved me on so many math tests. If I forgot a certain formula that I need, but I remember how it works or what it is supposed to do, I can re-derive it and then solve the problem (as long as I have time).
Answer: One thing that works for me when learning a theorem is to go through all the conditions and find corresponding counter-examples, as well as seeing exactly where the proof fails. Take for instance Rolle's theorem:

If a real-valued function $f$ is continuous on a closed interval $[a, b]$, differentiable on the open interval $(a, b)$, and $f(a) = f(b)$, then there exists at least one $c$ in the open interval $(a, b)$ such that
  $$f'(c) = 0.$$

Find a function which is continuous on $[a,b]$, but which is not differentiable on $(a,b)$, and for which the statement does not hold. Work through the proof using this counter-example, and spot the bit when the proof fails. Then find a function which is differentiable on $(a,b)$ but which is not continuous on $[a,b]$, and do the same.
Make sure you can find examples which are as sharp as possible - like making sure that you can find a function which is differentiable everywhere on $(a,b)$ but a single point. Make sure as well that they are as general as possible - given any point in $(a,b)$, can you find a function which is not differentiable at that point, and for which the statement of the theorem is not true? You will start going from specific, concrete counterexamples, to 'schemas' or ways of generating families, hopefully exhaustive families of counterexamples. (This is often how counterexamples are expressed in more advanced mathematical literature.)
You should do this for every condition in the theorem. The counterexample where $f(a) \neq f(b)$ might seem obvious, but you still need to understand exactly where the theorem breaks.
When you study several dependent theorems and lemmas, you will start to see how they interlock through these conditions and counterexamples. So the Mean Value Theorem has the same conditions as Rolle's theorem, because you use Rolle's theorem to prove the MVT. But the function to which we apply Rolle's theorem is not the same function that we are proving the MVT for, so how can we be sure that the same conditions hold for both? There are lots of pairs of theorems where one has a strictly stronger condition and a strictly stronger statement - you can compare these to see the tradeoff between the two.
When you do calculus; functions, intervals, variables are the objects which you are learning about and which you learn to manipulate in exercises until you become familiar with how they work. In analysis proofs; lemmas, theorems, conditions and statements are the things you work with. You need to learn to manipulate and understand these rather than just form a mental picture of functions, series, etc. - the things they are ostensibly 'about'.
You might also find that many of the counterexamples to analysis theorems are very interesting objects in their own right, for example the middle thirds Cantor set, the Cantor staircase, the indicator function of the rationals, etc.
Comment: My favourite quote to the statistics teacher during the exam: "Excuse me, Sir, I don't remember the statement, but if you help me with it, I'll surely manage to show you the proof." Because the basic idea was that the theorem hypotheses need to be used in the proof, and that was usually enough to think out the steps.
Answer: If you just remember individual proofs, and arrange them in a circle on your notepad, you will notice that it's $2\pi r$ to go around and remember all the proofs, but if you start at the centre (the basics) and learn the methods it's only ever $1\cdot r$ to any proof.
It's much easier if you learn the basics and the 'how to step', rather than individual proofs (and it works in all science / maths based subjects ;-)
Comment: Good job including some mathematics in your psychobabble.
Comment: @jwg, It works in practice as well, as many at my work know well ;-) The other technique is to get colleagues and fellow students to explain their predicaments to you for your help.. They will tell you the difficult areas, and often in the telling detect the solution, with just a small input from you, but learning for all! A little psychobabble is useful, when compared with automatons (but not too much).
Answer: Do not memorize proofs. Just become comfortable with how to think about certain proofs and the basic framework of proving certain ideas. That is, you do not need to memorize how to prove that $x^3$ is continuous at $a=-1$ but you do need to be familiar with how to prove continuity as a global property and prove continuity at a point.
This way of thinking helped me through proof courses. I focused on learning the process of types of proofs and how to think about proofs in general rather than learning a particular proof.
Answer: From what you have said your problem doesn't seem to be in the learning of the material, rather in the retaining of it. The solution to your situation is "Anki". Anki is a spaced repetition system application (SRS for short). Within this application you can create flashcards, to cut a long story short once you've entered these flashcards into Anki, you will rate them in difficulty, Anki will then schedule these cards so that that you do not forget them. The greater the difficult of a flashcard the greater frequency with which you'll have to review it. In this way you tend to test  your memory on the specific area that you are weak on.
Anki also has a Latex function which will allow you enter mathematical expressions, etc. so it is very mathematics friendly. Personally I use it and I find that it indispensable. It helps me remember all manner of things that I would have otherwise forgotten but it does take a lot of work. You need to essentially formulate all your knowledge into Q & A format, and you need to enter it into Anki and you need to review it religiously. It requires discipline but it works.
However Anki is not a panacea, you can't just dump a load of junk into Anki and expect to remember it. You firstly need to "understand" all the material before you put it into Anki. For more information read this and download the application here.
Good luck.
Comment: There was a recent study that showed that spaced repetition with difficulty scaling is not actually the best memorization system. It turns out that we remember best by successfully recalling information, so testing the ones we get right less often is actually counter-productive. This type of study system is still very popular, though.
Comment: http://www.sciencemag.org/content/319/5865/966.abstract
Article on the same: http://www.bbc.com/future/story/20141202-hack-your-memory-learn-faster
Comment: @toddwilcox could I have a link to this study?
Comment: @toddwilcox theres a distinction to be made here. Anki doesn't "drop" the flashcards you can recall easily from testing, it just flags them up for testing less often. Whereas in this study once something was learned it was dropped entirely. Am I right in my understanding?
Comment: @ToddWilcox, The articles you linked are pro spaced repetition, not against. In Anki you indefinitely repeat everything you once put into it, it's just the interval between recalls grows geometrically (hence, "spacing").
Answer: Sometimes when working on an exercise that requires me to reference a theorem whose proof I do not remember, instead of simply citing the theorem I like to reprove the theorem using the notation in the exercise, possibly simplifying the proof when some of its parts become unnecessary.
Answer: I hope you already got a lots of good advises...one little advice from me is that some time try to understand the geometry behind those definitions like closed set connected set continuous function and all...because you already know there is a beautiful geometric structure over R as well as $ R^n$ so if you manage to relate those abstract definitions with there geometric notions then you can actually visualize all those stuffs and accordingly that you can see why those theorems are correct and writing is then just a skill to represent the geometric view in term of precise mathematical language.
and of course problem solving attitude...that will help you to understand things in a more deeper way.
Answer: A last addition, do study a bit of propositional logic.
Learn the difference between

reductio ad absurdum (something is proven because its negation is not
possible)
direct proof (something follows out of the givens)
contrapositive
proof by cases

and more that kind of constructions.
Play a bit with it and see how these proof methods reappear in your own proofs.
(reductio ad absurdum: if you set $q < 0$ and everything goes haywire then it must be $ q \ge 0$)
(direct proof  if $P \to Q $ , $ Q \to R$  therefore $ P \to R $)
Do treat this lightly: just a simple book on propositional logic should be enough, don't bother at this time about predicate logic of syllogism. Only study the bare minimum. It is just to help you recognise the bones of any proof, and so that later it is easier to reproduce them.
Answer: I believe that if you understand the nature and behavior of real numbers then you should not have any issue with most of the proofs in real analysis. Once you know reals, you will understand what goes underneath the complicated $\epsilon-\delta$ arguments.
To understand the reals, it is necessary to have some understanding of infinity. Thus we can start with the following basic ideas:

There are an infinity of positive integers.
There is no smallest positive rational number.
A real number can be defined as a set of rationals which are less than it.
Reals have something extra compared to rationals.

There is certain technicality involved in third point above about definition of reals (how do we handle "less than real" when real itself is being defined), but this is not a major problem.
The last point about extra feature of real numbers is the most difficult to grasp and all fundamental theorems (like Bolzano-Weierstrass, Heine-Borel, Nested Interval Principle, Supremum Principle, Cauchy Completeness) refer to this one and the same extra feature in very different languages.
Most of the proofs of introductory real analysis make use of this extra property of reals. Once you understand this property very well, you should have no doubt in any of usual analysis proofs.
A very good understanding of the reals can be had by reading Dedekind's paper "Continuity and Irrational Numbers" or its exposition in first chapter of Hardy's Pure Mathematics.
Answer: In my experience, proofs can often be summarized in one line usually describing the trick/s of the proof, by which I mean the parts of the proof which present new techniques or something.
Consider outlining proofs perhaps if they are in parts like with Lebesgue integrals.
So you may have something like
Theorem 1 Use Bolzano-Weierstrass
Prop 2 measure of null is zero
Exercise 3 Consider the union of these sets.
Theorem 4 Part I Use Simple Approximation
Part II Use Monotone Convergence
Part III Use Dominated Convergence
It was probably already stated but what's more important is that you understand your proofs. Remember, you're a math student not a history student. :P
Answer: How I discover a proof of a statement in analysis? I put definitions of all the terms in the statement before my eyes on a big sheet of paper, not simply relying on my own memory. Try to discover some natural consequences of the "If part". Also, try to write the "Then part" in primitive terms. First, try to progress some steps from the end side. If you stuck, then try to progress some steps from beginning side. If you stuck, then again try to progress some steps from the end side. This time, you are at a better situation, because now you can use some results of the beginning side. Again, if you stuck, then try to progress some more steps from beginning side.Experience will bold-den you Repeating this trick, the hidden proof will unfold before you slowly-slowly. A fortunate time will come when you will be able to connect both ends. Hence, the proof is complete.
Answer: Most of the above are helpful but when I took the course I had a different route. I am apparently a visual person and I visualized (and in fact wrote down on large artist's pads) every "if" condition in succession as overlapping Venn diagrams delineating truth on the inside of shapes and false on the outside.  I presumed that the then part would be in the intersection of the if conditions.  Or if true/false were asked decide whether the then was in the intersection. Actually writing the circles out helps keep everything in mind while narrowing the scope.  Most proofs in Real Analysis consist of definitions overlapping.  In fact I would take the overlap as the conclusion and prove the then was equivalent.
Comment: It will be helpful if you can add a picture about your drawing as you said in this answer.
Comment: I will try.  It might take some time; I had problems keeping track of the definitions and theorems (as somebody said, "One would hope that at some point there would be more theorems than definitions"); and I had to diagram things out on large sheets of butcher paper.  I guess I am a visual person and that was the only way to fix them in my mind.  I no longer have them, it was the late '70s so I have to do some review :)
Answer: this is quite good method to study, when I studied the analysis, I did the exactly same thing as you are doing. I proved every theorems in the book, and read the whole book word by word many times. At last I found all my efforts worth it.
Usually the methods to prove analysis problems are related to the following topics:

supremum and infimum principle
monotone convergence theorem
nested interval theorem
Heine–Borel theorem
Bolzano–Weierstrass theorem
Cauchy sequence

Most of the proofs are related to one of them or some of them, they are the golden rules and the foundation of real analysis.
Try to think how every proofs are related to them and how they work together. That will be very useful.
As for some math tricky techniques, if you can come up with them, that's perfect, if not, just remember the main idea of the proofs.
Answer:
So the Mean Value Theorem has the same conditions as Rolle's theorem, because you use Rolle's theorem to prove the MVT.

This is wrong, because the MVT omits the PreCondition $f(a) = f(b)$. Basically, MVT is removing an unnecessary PreRequisite to Rolle's Theorem.
jwg ought have written that when one proves the MVT for an arbitrary function f,  Rolle's Theorem cannot be applied to f because f(a) can $≠  f(b)$. So ANOTHER FUNCTION, g, must be constructed from f to guarantee $g(a) = g(b)$, in order to use Rolle's Theorem.


Browned butter + roasted flour = baking magic?

Question: I love the flavour of browned butter, and I've tried baking sable cookies with roasted flour (delicious). Is there a good reason why, in a bog-standard chocolate chip cookie recipe which calls for melted butter, I could not use browned butter? Will the fats react differently in the baking process?
Answer: You can absolutely do this. I do it in brown-butter cornbread, for example. A good trick to boost the flavor even farther is to add non-fat milk powder to the butter as it browns, to supply even more protein for the Maillard reactions.
Comment: OOH! Love the milk powder suggestion! I'll try that soon.
Comment: OMG! I did that in my go-to Pain de Mie recipe. I added milk powder to butter, browned it and sauteed diced onions and rosemary in the butter as it browned. I used about 60 grams of the mixture instead of the 28 grams of regular butter called for in the recipe. It was hands down the best bread I've ever made, perhaps the best I've ever had. Thanks for the tip!
Answer: While brown butter works great in chocolate chip cookies, one caveat that I haven't seen mentioned in other answers is that browning butter removes the water content, which can potentially have an effect on your end bake. Not to worry, though; you can just add the lost water back once you're done browning the butter.
Kenji Lopez-Alt of The Food Lab actually uses an ice cube to simultaneously cool the butter to workable temperatures and replace the water.
See this source. It is a good read if you click over to the full write up.
Answer: If your recipe calls for softened but not melted butter, make sure to cool the butter until it is softened again so that the air bubble network from the creaming method can re-form.  The creaming method doesn't work with melted butter, browned or otherwise.
Using a tip from America's Test Kitchen I've also done cookies calling for softened butter with melted browned butter and two extra egg yolks, where this makes the cookies chewier and less cakey.
Comment: We tend to use Alton's recipe, which calls for melted. I like my choc chip cookies gooey!
Answer: Brown butter is great in cookies. I have not found from experience that it changes the way the fat reacts during baking. The browning just adds that very lovely and distinct nutty flavor profile to the cookies. The Ambitious Kitchen food blogger uses brown butter in many of her cookie recipes that call for melted butter so you could compare her ratios of fats to carbs and moisture levels to recipes that you currently use and play with it from there if you want to get really technical.


What would the temperature be like in a black desert?

Question: This is mostly asked out of simple curiosity since this is the backstory of a LARPer's character within my story and thus has little expectation of scientific rigor. But basically, this character is one of the last survivors of a tribe who lived in a desert made of black sand. And I was wondering if making the desert sand a color completely on the opposite side of the heat absorption spectrum would do any crazy, unlivable things to the daily temperature there. Would it make the desert hotter? If so, how much? Would they even be able to survive there?
Comment: FWIW, deserts aren't necessarily hot.  Deserts form because of a lack of water.  Some, including much of the western US, can be pretty darned cold, with (small amounts of) snow on the ground in the winter.
Comment: You don't need the fancy science for this, by the way--just go outside on a hot day and put one bare foot on asphalt vs one bare foot on concrete.
Comment: Sure, black sand is hotter than white or tan sand.  It's a great idea for an uninhabitable-by-anything desert!
Comment: @John all the pictures I can find of Atacama desert don't show spectrally black soil.
Comment: @John black sands come from the erosion of basalt.  Thus, you're more likely to see it at low elevations than on very high mountain peaks.
Comment: @JBH I'm wrong its not part of the atacama, Its in Laguna del Laja and not a true desert, but there is a cold black desert in iceland.
Comment: Los Angeles is changing part of their urban black desert (asphalt roads) to white and measures around 10 degrees F drop in temperature right over the road. http://www.foxnews.com/us/2018/04/10/los-angeles-painting-city-streets-white-in-bid-to-combat-climate-change.html
Answer: I can't find any spectrally-black sand deserts on Earth, but I can find Reynisfjara, Iceland, which has actual black sand beaches.
There are more consequences than just heat
I'm going to assume we have legitimate spectrally black soil form from normal planetary processes and not magic.  In that case, soil is usually made up of oxygen, silicon, aluminum, iron, magnesium, calcium, carbon, sodium, potassium, hydrogen, and nitrogen.

Eight chemical elements comprise the majority of the mineral matter in soils. Of these eight elements, oxygen, a negatively-charged ion (anion) in crystal structures, is the most prevalent on both a weight and volume basis. The next most common elements, all positively-charged ions (cations), in decreasing order are silicon, aluminum, iron, magnesium, calcium, sodium, and potassium. Ions of these elements combine in various ratios to form different minerals. More than eighty other elements also occur in soils and the earth's crust, but in much smaller quantities.
The organic fraction of a soil, although usually representing much less than 10% of the soil mass by weight, has a great influence on soil chemical properties. Soil organic matter is composed chiefly of carbon, hydrogen, oxygen, nitrogen and smaller quantities of sulfur and other elements. The organic fraction serves as a reservoir for the plant essential nutrients, nitrogen, phosphorus, and sulfur, increases soil water holding and cation exchange capacities, and enhances soil aggregation and structure.  (Source)

It's light colored when there's a lot of silicon, aluminum, and magnesium.  It's brown when there's a lot of carbon and iron.  Sand is yellow to white because it has an enormous percentage of silica.
Actual spectrally black soil is volcanic in nature and contains very, very high levels of iron and magnesium.  The most obvious of these is obsidian.  The point here is that truly black rock has more in common with metal than it does sand or soil.

It's dense, meaning it's heavy, what life there may be in a desert will have a harder time moving the soil aside for roots or burrows.

It will have finer, shaprer edges to the grains of soil, meaning you'll find "more dense" critters, armored against the rocks.  This means thick chitin shells and dense, woody roots.  Life will be, shall we say, angrier and more stubborn than you'd find in a traditional desert.  Keep in mind that soils like this aren't particularly condusive to life, meaning you won't find that lovely green sheen over the soil you see at the beginning of Star Wars:Rogue One.

The soil will be much warmer than in a traditional desert, since it's absorbing a much wider spectrum of light.  However, the thermal conductivity of volcanic soils is much lower than high-silica soils, meaning the black soil will lose its heat very quickly compared to sand after the sun sets. (Source and a throwing-weight document)  The sand would be very, very hot to walk on during the day, but cool to cold at night.

On the other hand, because the soil is absorbing so much energy, the air will be colder during the day, have a rush of warmth as the sun sets, and yon about 2am will be very cold.  Over all, a spectrally-black desert will be very cold.
Comment: "soils like this aren't particularly condusive to life, meaning you won't find that lovely green sheen over the soil you see at the beginning of Star Wars:Rogue One" - this is just wrong. Volcanic soils are *famously* fertile, because they contain a high concentration of useful minerals: http://volcanology.geol.ucsb.edu/soil.htm The opening of Rogue One was filmed in volcanically-formed Iceland; I've been there and it is as green as it appears in the movie. (It also used to have a lot of forests, until humans showed up and cut them down.) See also NZ, Hawaii, Vesuvius, ...
Comment: Also, your third and fourth points contradict one another: low thermal conductivity limits how much heat the soil can absorb. While the top layer will indeed get very hot, that heat won't penetrate far into the ground. During the day the soil will quickly reach approximate thermal equilibrium where it radiates as much energy as it absorbs. If anything, I'd expect the air to heat up a bit faster during the day, since it's in contact with a hotter surface.
Comment: This seems like perfect fuel for crazy dangerous predators for the tribe to fight. I almost wish the nature of the LARP let me examine it more now!
Answer: Black sands will have more extreme temperature swings than lighter colors. Because of this, your black sand desert will get hotter during the day and colder at night than a regular desert. This is because all objects release and absorb some Thermal Radiation, with darker objects both radiating and absorbing more.
However, most of the exchange in thermal energy on earth comes from conduction and convection, so the effects of it would not be very strong. Ultimately, it would not do any "crazy, unlivable things" to the temperature, and you could still have a livable desert.
Comment: Depends on the *tabor number* of the sand.  Something that is black in visible light absorbs sunlight, but if it's white in infrared it radiates slowly.  As an example TiO2 (white paint pigment) is the opposite:  White in visible, black in infrared.
Answer: I've been on volcanic beaches and in a part of the egyptian desert both called "black". For example, here's a picture of the beach close to where I was:

There is not so terribly much difference to a white beach. After some time in the full sun, they are both hot and from what I remember, whatever difference there were was not very noticeable. The sand itself gets a little hotter, but since it absorbs more light, it reflects less heat, so when you are wearing proper footwear, it doesn't make much of a difference.
Answer: The Canary Islands are a group of islands that are Spanish territory off the coast of Africa 62 miles or 100km away at their closest point. They are also on the same line of latitude as the Sahara desert. They are considered to have a desert or semi desert climate.
They are also highly volcanic formed from an Oceanic hotspot in a manner similar to the Hawiian islands meaning that the volcanoes erupt what is known as Mid Oceanic Ridge Basalt or MORB.
This has lead to the creation of areas such as the Timanfaya National Park on Tenerife that would  be described as having black sands and a desert environment. The temperature there is not wildly hotter than other deserts on similar latitudes. Although as others have said what defines a desert is amount of rainfall there are deserts in the South Pole that are at sub zero temperatures.
Answer: From what I know for sand to be black in such enormous quantities it's origin must be volcanic. Having magmatic activity around already makes a place pretty hot, although the sand may have originated elsewhere and traveled in various ways to the location of your desert, what would mean there's no high vulcanic activity in the area.
There are of course much more factors to take into account in order to give an exact answer: the average temperature of your world, how much of an impact does the greenhouse effect have, the axial tilt of the planet and the relative position of the desert to the ecuator...
But to give an approximate answer to your question: Yes, black sand would mean more light (thus heat) absorption from the soil, resulting in both a hotter overall climate in the area and much hotter soil.
The how much depends in a lot of things, varying from a simple no-go zone with little to no living beings, to molten glass lakes (the conditions for this may be a little too extreme for there to be life on the rest of the planet).
These types of deserts will always be hotter than normal ones. How unforgiving the area is depends on you and since you said the story has little expectation of scientific rigor there's always the possibility of heat-proof technologies paired with underground cities or just beings that stand extemely high temperatures.
Comment: "Having magmatic activity around already makes a place pretty hot" - not really. It will often create localised hotspots, warm springs etc., but places like NZ and Iceland aren't generally warm just because they were created by volcanoes.
Comment: I meant magmatic activity as in constant eruptions or lava flows.
Answer: From something I read a while back, the darker regions on the moon are actually volcanic rock which, when sunlit, stands out against the void of space, but would actually be black or nearly black if you looked at it on Earth.
The sunlit side of the moon can reach 100 to 120 degrees C (210-250 degrees F). Bear in mind it is exactly the same distance from the sun as we are, though it has no atmosphere.
Answer: A slightly different approach here.
The area is actually a desert BECAUSE it is black and normally that area would be a more temperate climate if it had normal soil and sand.
(This might go against some of the science that others are spouting but, if you aren't overly worried about the high science and just looking for something that sounds right(ish) then this could work for you)
Answer: You can get a first order approximation by visiting a large parking lot.
My usual experience when calculating what to wear outside is to say that clear sky makes it equivalent to 10C (20F) warmer out.  And a 5-10 kph (3-6mph) wind makes it 5C (10F) cooler.
However there is thermal temperature and YOUR temperature.  In a white environment you will be receiving sunlight from multiple angles. In winter you can easily double those numbers on a sunny day.
Secondary effect:  In small black deserts (parking lot to, say 30 km (20 mi) across, the warm surface will set up convection.  Sailplane pilots look for thermals from parking lots or ploughed fields.  So for a small black desert the effect is self limiting.  With larger deserts the air can't rush in fast enough.  So you would end up with a warm low pressure area.
If you want to experience it here on Earth on a larger scale, visit "Craters of the Moon" national monument in Idaho.   You may be able to reference weather station data, and compare.  Not big enough to not be cooled from outside.  Google satellite image:
https://firstname.lastname@example.com,-113.9920283,117932m/data=!3m1!1e3!4m5!3m4!1s0x54aa5f3acc0c2525:0x593b4ba65a2caf7b!8m2!3d43.2058067!4d-113.5001702
You may want to check out icelands lava fields or the lava shields in Hawaii


how to tell what cameras a particular lens will fit

Question: I have a 10x High Def. 2 element macro lens, which was purchased for an older Kodak EasyShare Z612 camera.  Since it now appears that the camera may be broken beyond repair, I need to know if there is some other camera that this lens will work with.  The lens also says:  "Digital NC 58 mm Japan Optics" and Bower.
Comment: Possible duplicate of [Wide Angle Lens on a Step Down ring?](https://photo.stackexchange.com/questions/41669/wide-angle-lens-on-a-step-down-ring)
Answer:
The lens also says: "Digital NC 58 mm Japan Optics" and Bower.

It sounds like the macro lens you have is actually an auxiliary lens that attaches to the front of the camera's main lens. If that's the case, then that lens will probably attach to any other camera with the same diameter and thread pitch. From the 58mm in your description, it's a good bet that the diameter is 58mm, and filter thread pitches are pretty well standardized, so it should fit most cameras or lenses that takes a 58mm diameter filter.
Answer: The "lens" you have is a type of teleconverter that screws onto the 58mm filter threads of real lenses. It will fit any lens that can use 58mm filters, either directly or via step-up or step-down rings.
If you get a real interchangeable lens camera to replace your broken camera, you will be able to use real lenses that fit your needs without teleconverter filters. If you still want to use the teleconverter filter, it should work with most kit lenses (18-55/3.5-5.6, 55-250/4-5.6), which often have 58mm filter threads.
Answer: It's the question what a 10x lens is.  Closeup lenses are measured in dioptres and don't actually cause significant magnification (I assume that a 2 element 1 group lens is what you have, the typical achromatic closeup lens construction).  Instead they change the range where a camera can focus, allowing you to use the zoom capacities of your cameras from quite closer.  Is this really marked/marketed as 10x rather than +10 ?  On this camera, "tele zoom" reaches to a distance of 0.6m so an actual 10x lens would reach to 0.06m, making for something like +15 dioptres.  Which seems unusually strong and would be almost impossible to handle regarding depth of field.
At any rate, it sounds like you have a standard thread of 58mm.  A whole lot of cameras have threaded filter mounts (and you shouldn't really buy one without since you lose a lot of versatility) and if you don't have 58mm on your new camera, adapter rings are rather cheap.  Closeup lenses make most sense when you have a tele-capable lens/setting that cannot focus in close range.  If your tele focal length aperture is comparably fast and your closeup lens diameter is smaller than your objective's filter thread, you may have to stop down somewhat to avoid loss of sharpness and contrast.  But you usually want to do that anyway with a strong closeup lens since otherwise depth of field becomes unmanageable.
Answer: Each camera/lens maker specifies the type of mount. For example Canon has EF and EF-S mount, Nikon has F mount and so on. There are certain lens mount adaptors which make incompatible lens and camera combinations to work. You can search accordingly.
Comment: Those are not the type of "lens" OP has.
Comment: Thank you one and all:)  I'm now more hopeful this situation can be resolved without pitching everything and starting over!


What is Starting Torque?

Question: I'm having a hard time finding an answer from the internet. What does starting torque mean?
Answer: There are two different aspects to start-up torque.  One is associated with the motor and the other with the system which you are trying to drive.
The start-up torque of a mechanical system is the minimum torque required to get it moving from a standstill.  the start-up torque of a motor is the maximum torque which it is capable of producing from a standstill.  If the start-up torque of your motor is not greater than the start-up torque of your mechanical system, then the motor will not be able to get the system moving.
The image below shows the torque curve for a typical AC motor.  The start-up torque, although not marked, is the torque value at the far left of the plot (at zero speed).  If your mechanical system has a higher start-up torque than this, then this motor will not be able to get it running even if the torque required to keep it running is lower than the full load torque.
Answer: Is the torque required to make something that is not turning start turning.
You can think of starting torque as an instantaneous value (the torque just before the motor starts moving). You can also thing as the torque function from that moment until the motor reaches the desired speed.
The torque provided by a motor is
$T_{motor}(0) = T_{static friction}\\T_{motor}(t>0)=T_{dynamic\ friction}+J\dot{\omega} +K\omega^2$
where:
$\omega$ is the angular speed
$\dot{\omega}$ is the angular acceleration
$J$ is the polar moment of inertia of the motor rotor plus load (as seen from the motor)
$K$ is constant (in a simple model) that represents the viscous forces
Comment: No, the starting torque is required when there is zero speed. In most systems as the system speeds up, less and less torque will be required.
Comment: Well that sounds logical. But what does it mean practically: is it related to the minimum angular speed of a motor?
Comment: @mandrill may I get the reference, please?
Answer: "Starting torque" and "locked-rotor torque" are the same thing.  So if you run across the later term, you can treat it as a synonym for "starting torque."  The NEMA MG-1 definition of locked-rotor torque is:

"the minimum torque which [a motor] will develop at rest for all
  angular positions of the rotor, with rated voltage applied at rated
  frequency."
Answer: The starting torque is the  torque required by the starting motor to rotate from idle position during the engine cranking.This torque must be high so that the starting motor should rotate.
Comment: More detail would improve this answer, such as mentioning mass, torque & rotational inertia.
Answer: At slip=1 and speed of rotor N=0 rpm ,motor produces a torque called starting torque
Comment: This answer is very brief. More detail would improve it

What is Starting Torque?


How to play multiple audio files using AVAudioPlayer

Question: In my application, I am displaying multiple images in rows and columns when i click on a image i will play corresponding sound using
<code>someName = [someName stringByAppendingFormat:@".mp3"];
[audioPlayer stop];

NSURL *url = [NSURL fileURLWithPath:[NSString stringWithFormat:@"%@/%s", [[NSBundle mainBundle] resourcePath],[someName UTF8String]]];

NSError *error;
audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error];
audioPlayer.delegate = self;
</code>
When i am clicking on the one image i will get particular image sound. When i click on the another image the previous sound will be stopped and new sound corresponding the image will be played.
My requirement is when i click on the first image the sound must come and when i click on the second image the first sound must not stop and both must play and when i click on the third one the three sounds must play.
Please help me out
Answer: Apple recommends using an IMA4 encoded *.caf file for playing multiple sounds at once.


Should the Android contextual action bar check mark be replaced with an "x"

Question: Is it a good idea for applications (application developers) to replace the check mark icon in the contextual action bar when in selection mode. Is this a good design pattern? Does it make more sense to replace that check mark with an "x"? Does it break consistency? Will it confuse users?
The android selection pattern refers to the checkmark as a done action.
Here's a link for some more details:
http://developer.android.com/design/patterns/selection.html
Answer: I quote from the Action Bar page:

A contextual action bar (CAB) is a temporary action bar that overlays
  the app's action bar for the duration of a particular sub-task. CABs
  are most typically used for tasks that involve acting on selected data
  or text.

The check sign gives you visual feedback that you have actually selected something. It is a sign that most users would have associated during their education with getting something right.
An "x" would mean that you would want to close a window or other visual element, which is not what happens here. Android users are used to pressing the Back button to return to the previous state of the application (before the selection happened).
Overall, an "x" would break consistency and would confuse users in two ways: it would give feedback that the app failed to be in a temporary selection state, and would override expectations of the "back" button's functionality.
Comment: I totally agree. It could also give the feeling on a multiple select that it's the delete button.
Answer: I had a difficult time with this checkmark in the android selection UI.  To complicate the issue further on devices such as the Kindle Fire the checkmark is further augmented with a 'Done' label that communicates more of a complete this step sort of behavior to the user.
Ultimately I think this comes down to your app's audience, if you expect your customers to be Android interface convention saavy (or uses Google's own Android apps) then I think sticking with default conventions here is in your favor.  However if your customers are less tech savvy or don't use a lot of other apps there may be reason to consider being more explicit in this interaction than this default selection pattern.
I sided with accepting the default behavior, with the reservation to reconsider this UX/UI if I witnessed confusion from our customers during usability research.


SNAT on windows 2008

Question: I've an openVPN client which runs on windows2008 R2 server and through this windows 2008, I'm trying to do static nat to a machine which lies behind this win2008s real network. Here is my configuration for 2008 server;

OpenVPN server; 10.9.0.1
OpenVPN connection: "Local Area Connection
2" 10.9.0.28/24
Local network: "Local Area Connection"
192.168.10.71/24

output of my NAT configuration on 2008 server
<code>    # ----------------------------------
    # NAT configuration
    # ----------------------------------
    pushd routing ip nat
    uninstall
    install
    set global tcptimeoutmins=1440 udptimeoutmins=1 loglevel=ERROR
    #
    #NAT Configuration For Interface Local Area Connection 2
    #
    add interface name="Local Area Connection 2" mode=FULL
    add addressrange name="Local Area Connection 2" start=10.9.0.24 end=10.9.0.31 mask=255.255.255.248
    add addressmapping name="Local Area Connection 2" public=10.9.0.28 private=192.168.10.59 inboundsessions=enable
    #
    #NAT Configuration For Interface Local Area Connection
    #
    add interface name="Local Area Connection" mode=PRIVATE
    popd
</code>
When I try to ping 10.9.0.28 from openvpn server or connect to a tcp port on it, I see destination nat is done on windows 2008 server and my packets are sent to 10.9.0.28 but with source ip 10.9.0.1.
<code>  19:54:25.046131 IP 10.9.0.1.43109 > 192.168.10.59.2000: Flags [S], seq 870055875, win 5840, options [mss 1350,sackOK,TS val 8948005 ecr 0,nop,wscale 7], length 0
19:54:25.046198 IP 192.168.10.59.2000 > 10.9.0.1.43109: Flags [R.], seq 0, ack 870055876, win 0, length 0
  19:54:28.044561 IP 10.9.0.1.43109 > 192.168.10.59.2000: Flags [S], seq 870055875, win 5840, options [mss 1350,sackOK,TS val 8951005 ecr 0,nop,wscale 7], length 0
</code>
and for sure, returning packets does not find their way to originator then.I also tried not to map hosts directly but service/port translation but this didn't work either. In my linux boxes, I can of course change the source IP address while doing nat with iptables but for very same scenario, I couldn't find  how to do this on windows.
So, do you have any idea how to change source ip while doing NAT with windows servers?
thanks for the help in advance
goktan
Answer: You can use netsh to do that:
<code>netsh routing ip nat install
netsh routing ip nat add interface "Local sth or Ethernet etc" AddressOnly
netsh routing ip nat add addressrange "Local sth or Ethernet etc" start=10.9.0.24 end=10.9.0.31 255.255.255.248
netsh routing ip nat add addressmapping "Local sth or Ethernet etc" public=<what_you_want_the_ip_to_look_like> <what_the_ip_actually_is> inboundsessions=disable
</code>
The last option is for using (or not as we do here) the same addressmapping in the opposite direction. This might be break eg your internet connectivity if you don't know what you are doing.

SNAT on windows 2008


Is there any reason to choose my bank's index fund over Vanguard?

Question: I'm planning on transferring some of the money in my RRSP into an index fund. My bank (CIBC), has a balanced index fund that has 1.2% management expense ratio (https://www.cibc.com/en/personal-banking/investments/mutual-funds/growth-funds/balanced-fund.html). I'm just wondering if there are any advantages to sticking with my bank, or this fund in particular, given that I could put it into a Vanguard index fund with a 0.04% MER instead; especially since everything I read online suggests that the best way to maximize your profit with index funds is by reducing your MER.
Comment: Look at the average returns of each over time - does the bank fund earn more that 1.16% more annually than the Vanguard fund to make up for the additional fee?
Comment: Looking at the CIBC fund details, this is not an index fund.  It is an actively managed fund that invests in a "balance" of bonds and shares.  While I agree with others that 1.2% annual expences is high by todays standards, it is not high in the Canadian mutual fund market.
Answer: That expense ratio on the bank fund is criminally high. Use the Vanguard one, they have really low expenses.
Comment: While a colloquialism, the use of "criminally" would be an expected usage here.
Comment: 1.2% for an unmanaged index. I think someone should literally go to jail for this, even if it's legal today.  (Although, I'm not convinced the bank's product is an index fund)
Comment: I wouldn't use 'criminally', as it is not _literally_ criminally. It is high, and should be avoided, for sure.
Comment: It should be criminal. Outrageous fund fees are outrageous.
Answer: Extortionate expense ratio aside, comparing the fund to the vanguard balanced fund (with an expense ratio of 0.19%) shows that your bank's fund has underperformed in literally every shown time period. Mind you, the vanguard fund is all US stocks and bonds which have done very well whereas the CIBC fund is mostly Canadian. Looking at the CIBC top 10 holdings does seem to suggest that it's (poorly) actively managed instead of being an index tracker for what that's worth.
Maybe your bank offers cheaper transaction costs when buying their own funds but even then the discount would have to be pretty big to make up for the underperformance. Basically, go Vanguard here.
Comment: Care to explain the downvote?
Answer: Your bank's fund is not an index fund.  From your link:

To provide a balanced portfolio of primarily Canadian securities that produce income and capital appreciation by investing primarily in Canadian money market instruments, debt securities and common and preferred shares.

This is a very broad actively managed fund.  Compare this to the investment objective listed for Vanguard's VOO:

Invests in stocks in the S&P 500 Index, representing 500 of the largest U.S. companies.

There are loads of market indices with varying formulas that are supposed to track the performance of a market or market segment that they intend to track.  The Russel 2000, The Wilshire 1000, The S&P 500, the Dow Industrial Average, there is even the SSGA Gender Diversity Index.  Some body comes up with a market index.  An "Index Fund" is simply a Mutual Fund or Exchange Traded Fund (ETF) that uses a market index formula to make it's investment decisions enabling an investor to track the performance of the index without having to buy and sell the constituent securities on their own.  These "index funds" are able to charge lower fees because they spend $0 on research, and only make investment decisions in order to track the holdings of the index.
I think 1.2% is too high, but I'm coming from the US investing world it might not be that high compared to Canadian offerings.  Additionally, comparing this fund's expense ratio to the Vanguard 500 or Total Market index fund is nonsensical. Similarly, comparing the investment returns is nonsensical because one tracks the S&P 500 and one does not, nor does it seek to (as an example the #5 largest holding of the CIBC fund is a Government of Canada 2045 3.5% bond).
Everyone should diversify their holdings and adjust their investment allocations as they age.  As you age you should be reallocating away from highly volatile common stock and in to assets classes that are historically more stable/less volatile like national government debt and high grade corporate/local government debt.  This fund is already diversified in to some debt instruments, depending on your age and other asset allocations this might not be the best place to put your money regardless of the fees.
Personally, I handle my own asset allocations and I'm split between Large, Mid and Small cap low-fee index funds, and the lowest cost high grade debt funds available to me.
Answer: Basically, no.
Selecting an actively managed fund over a low-fee index fund means paying for the opportunity to possibly outperform the index fund. A Random Walk Down Wall Street by Burton Malkiel argues that the best general strategy for the average investor is to select the index fund because the fee savings are certain. Assuming a random walk means that any mutual fund may outperform the index in some years, but this is not an indication that it will overall.
Unless you have special information about the effectiveness of the bank fund management (it's run by the next Warren Buffett), you are better off in the index fund. And even Warren Buffett suggests you are probably better off in the index fund:

This year, regarding Wall Street, Buffett wrote: "When trillions of dollars are managed by Wall Streeters charging high fees, it will usually be the managers who reap outsized profits, not the clients. Both large and small investors should stick with low-cost index funds."
Comment: The random walk hypothesis (and the EMH it draws from) is flawed, even Malkiel himself has admitted this. It is still extremely hard for an everyday investor to outperform and they would do well to take up an index fund but actively managed funds that have periods of outperformance too long and too high to attribute to chance do exist.


How to encrypt email messages and attachments without using an extension in Gmail?

Question: Can anyone tell me how to encrypt Gmail messages and attachments without having to use an extension? I have come across a few extensions for Google Chrome and Firefox doing the encryption but the receiver would have to install the extension too in order to decipher. Therefore, I would really like to know if there is a way to encrypt your Gmail message without an extension.
Answer: Maybe this support site helps you: Email encryption in transit - Gmail Help - Google Support
Comment: It would be more helpful if you can add essential content from link into answer.


Language differences impact chain of command

Question: I'm an English-speaking manager in a (US) workplace where many other employees, including my secretarial assistant, speak a different language as well as English.  The problem is that because of their common language often employees seek out my assistant for advice or direction (which is not her formal role) when they should in fact be coming to me.  It's certainly easier for them to do so, but then I'm cut out of the loop and am not aware of what's going on - something that's very important to me as a manager, especially since my assistant isn't qualified to make some of the "decisions" she is making.  It's the chain-of-command impact, and the inappropriate role my assistant is taking on, not the use of another language per se, that's the issue.  How can I handle this in a positive, cooperative way?
Comment: better communication and a clear understanding of it's importance between you and your secretarial assistant comes to mind. Define his/her role and make sure they stick to it.
Comment: I take it this is effectively pushing your assistant into a managerial role when that isn't intended? Has English been defined as the company language or is that not practical/necessary? Voted unclear for now since I can't tell what you actually want to accomplish.
Comment: Are decisions being taken by your subordinates causing actual problems? Do you have examples?
Answer: Looks like you have a very nice assistant why not take advantage of that.
Now do you want micro managment all the orders or are you willing to share some of the tasks with your assistant?
Just sit with your assistance and set the groud rules.

What kind of request is the assistant allow to handle.

Even if doesnt handle the whole order maybe some pre process so you have to do only the final touch.

Define some form of report to keep you in the loop.
Comment: @JeffO Or they've been caught looking stupid because they had no idea about a "known problem" for which they are responsible.
Comment: When someone indicates a "chain-of-command impact," they want to micro manage.
Answer: In addition to the previous answers, here are some specific things I found that helped me in that kind of situation.
I had a similar situation on my team where a member was 'intercepting' communications from other team members that I should have been included in. Additionally this person was making policy decisions without including me. This led to me being unaware of various issues, status, concerns, etc., at least until something I didn't know about blew up enough for someone to come to me with it.
Often this kind of behavior is done w/ good intentions- they see a problem they can help with, and they want to show initiative, so they do so.  They may not realize all the negative impacts this can have, and that's the primary issue you need to address.
As you state, this makes your job much more difficult, since you don't have visibility on various issues/requests you need to be able to do your job effectively, and it can greatly confuse communications and lead to 'multiple realities' where everyone ends up with different understandings of what is going on.
What solved it for me was talking to the person in question and explaining:

I need to be included in these conversations, because it is my job to
know what is going on with my team and department, and I am
ultimately responsible for everything that happens on my team (You will need to be able to define which ones 'these conversations' are).
If I don't know what's going on, I cannot do my job effectively and
the whole team's efforts suffer, since my job is making sure the team is doing OK and the work is getting done.

Since I am responsible for them, I have to make the decisions on these matters.  This will also ensure clear communications with everyone else as to what's being done.

The goal is to show the impact this person's behavior is having on both you and the organization at large (and even how it could be making that persons own job more difficult)- again, something they may not realize is happening.
Answer: I think you need to clarify, with your assistant, his or her authority.  You are correct in assessing that being out of the loop on things is a bad thing.  Unless your report is titled "assistant manager," that person shouldn't be making decisions unless you've specifically granted that authority.  Fix this situation, because in a mess, you're on the hook!
Answer: The best advice I ever received was "work your foreign languages". In plural. Not only english. I did work german as well.
When I did my end-of-studies training period, we were on a project for building a new type of light for cars. We needed a new kind of plastic, manufactured in germany. The commercial team from the german chemical corporation went to visit, and we had a meeting. There were two of them, our project leader, one engineer, and two trainees(including me). Our project leader began the meeting in english. Everyone else was fluent in german(and some not that much in english), and naturally, the discussion switched to german. Noone forcasted that, or wanted that. But it happened.
Because he couldn't speak german, our perfectly bilingual french-english project leader was expelled from the decision process. And it was nearly unavoidable. When people have a job to do, they naturally go to the path of least resistance.
All the advice of disciplining your team in the other answers are nice, but they're not going to solve that problem a satisfactory way. Try to learn at least some of their language to have an idea of what is happening. If not, you'll always be vulnerable.
Answer: I think you either got a nice, passionate assistant or a want-to-dominate one.
In either case, just be very polite and praise him/her first for taking such crucial decisions and then put forward your viewpoint. You don't want to sound arrogant and disturb their morale.
Something like this should be good to go.

Dear X,
I am very impressed to have an assistant like you. You have been doing
  really good work with the decision making.
However, I would like to request you to keep me also in the loop, so
  that my expertise would help the team take much more polished
  decisions and help you add more value to the company, along with your
  professional careers.
regards,
Y

This would both appreciate him/her, and would also put your point forward without them feeling low or guilty for what they have done.


Accessing deep web with virtual machine on Windows

Question: I'm using Windows 10 on my PC. I have installed VMWare on it and I'm running Solus Linux in live mode. Is it safe or I have to install linux completely for further security?
Answer:
the question is: is it safe for or against what?
there is no absolute 100% safety: security is a process, not a product/software/app!
if your host-system is compromised or unsafe (which i would consider default windows 10 to be), your guest must also be considered as unsafe/compromised.
running a live-system - from an unwritable media (CD/DVD) - is even more secure than using an installed system, whether in a virtual machine or not: eventual (not hardware-related) malware is easily gone after a reboot and so is also every additional software/data to possibly track you.
i don't expand on hardware related issues to keep it somehow easily understandable, but your hardware can also be compromised, which makes it nearly irrelevant which software (programms and OS) you are running.

TL;DR:
for maximum safety with not that much more effort (WARNING: trade-off), i would advise to

use Tails directly on your machine from a liveDVD and update it immediately.
change as less as possible in the live session (only if you really, really know what you are doing and completely understand its consequences).
follow the Tor rules: Want Tor to really work?
read and understand the Tails warnings: https://tails.boum.org/doc/about/warning/index.en.html


Moon and the moving train

Question: While travelling by train (travelling West to East), it seems the moon is moving in opposite direction when seen from the window, but then it reverses its direction, after a certain amount of time and moves along the train, but then flips back again. And it kept oscillating, as the train kept moving. Can anyone point out the reason?
Comment: Are you quite sure it wasn't the train turning that caused it?
Comment: I am sure the train was training but the oscillations were very consistent all the way.
Answer: The Moon was moving in relation to what?
I had to think about this when you described your experience. Because of the distance of the moon compared to objects on the horizon, it should appear to stand still in comparison to everything else closer whizzing past you.
But then I thought of your description of "oscillations" and thought "AHA! The window."
If you were travelling exactly west to east, and you were observing the moon through a window exactly facing south (or north, depending which side of the train you are on and the time of year and where on Earth you are,) it would appear to be standing still in your window. (Neglecting for the moment the comparatively slow apparent progression of the moon through the sky.)
But I reckon your train track was not exactly straight for the duration of your trip and the moon was never exactly perpendicular to your train's direction. But it was probably quite close to perpendicular. So any slight deviation would cause you to observe the moon travelling towards one edge of the window, and then a slight deviation in the other direction would cause the moon to apparently move towards the other edge of the window.
It's simply the winding s-shaped route your train took, heading generally east but never exactly, that caused these oscillations.
Answer: I see a few factors that would cause the moon to "move" around. The most significant is variations in the direction of the train.The train may not be going in a straight line and these small variations in direction (slightly north or south), even if undetectable, may cause the moon to "move" from your perspective. If the train turns 1 degree north, then the moon should move 1 degree right, which may seem like it is moving a lot since humans have almost a full 180 degree field of view.
Also the moon is orbiting the earth, so the moon will drift through the sky slowly, however this effect would happen much more slowly and cannot account for the oscillations. I hope this helps, and get some sleep, don't spend all your night thinking about physics ;).

Moon and the moving train