What does FTP Jailing mean, and what features does a server OS require in order to enable it?

Question: I have a fuzzy notion of what the term "ftp jailing" means, but when it comes to permissions and security, fuzzy is imprudent.  What is it?  How is it implemented?  Is it mostly a capability of the ftp server, or does it emerge from how the underlying OS does permissions?
Answer: Here's how I do it in a Windows IIS environment.  Figure it will help someone in the future.

set up the local user accounts on the computer for each "user/client"
In explorer setup the NTFS structure so that you have a "root"
  folder and inside that folder you have
  folders for each client/etc.
Set up the NTFS rights, so that each user (you can use a group called
  FTP users, and add them all to that
  group) has "List" rights to the root
  folder.  Then give them specific
  rights to each of their "home" folders
  (read/write/whatever).
In IIS for the FTP site, create virtual directories named EXACTLY the
  same as the user accounts you created,
  and point each one to the right home
  folder.  ie. virtual directory of
  BOBJONES points to d:\ftpsite\BOBJONES
go back into explorer and create a new folder in the same folder as the
  ROOT folder and call it DEADEND
give the FTP users list/read permissions to the DEADEND folder
Back in IIS set the "root folder" for the FTP site to the DEADEND
  folder

That's it.
now when BOBJONES logs into the FTP
  site he is in the BOBJONES directory.
  If he gets wily and tries to do a cd
  .. to go up to the parent/root he'll
  get knocked into the DEADEND folder
  and won't see the list of everyone
  else's home folders, etc.   (NOTE: he
  can get back to his home folder by
  typing cd BOBJONES still)
ONE FINAL NOTE:  anybody that has a
  user ID but no virtual directory named
  the same will get defaulted to the
  root directory which has been changed
  to DEADEND.
Comment: I recently discovered that for Windows Server 2008 / IIS 7 there is a separate download FTP 7.5, which is much better than the old version.
Comment: +1 for explaining how to do this in Windows land.
Comment: I'm torn. Part of me is happy I just installed filezilla, which made it easier and cleaner by the looks of it. Part of me wishes I'd known this when I was trying to make it work with IIS.  Think I'm happy I have filezilla in the end.
Comment: This proved to be most useful - cheers.
Answer: FTP jailing means that the loggend in user sees his root directory as one that you define. He cannot go any higher up the tree, as the FTP client sees his dir as the root directory.
Say you have the following:
/home/ben_linus/
/home/ben_linus/data
/home/ben_linus/progs

You set the root to /home/ben_linus/
He will see
/
/data
/progs

Comment: Ben Linus :-) So, he doesn't see /home/jacob/ ? ;-)
Comment: That would be correct. Only john_locke can see /home/jacob, as his jailed root is set to /home/. :)
Answer: "Jailing" in ftp means locking the ftp session to a particular subset of the filesystem.
Usually it is set so that if a particular user logs in, they can only ftp to their own directory space.
The ftp server will often have an option that, when a user is connected, to chroot the user, which means as far as that user is concerned, the root of the universe is some specific portion of the total available filesystem.
'vsftp' has a really clear explanation and how-to at vsftpd.
Some other examples include proftp and ftp on hp/ux.
Answer: I don't see a reason why it should be OS dependent. Nothing keeps you from coding an FTP server that will return / for some random directory after using cd .. often enough without actually being in / on Unix or at the top level drive in Windows.
Regarding permissions it depends a lot on how you configure your FTP servers, some FTP servers can map from/to any user, that means you could configure an FTP server that need "normal" authentication but when writing the file to the OS on the host permissions will be mapped to a certain user you configured.
Some discussion about chroot (as well as a follow up link) can be found in the ProFTPd FAQ.
Answer: It's a feature of the ftp server (for the most of them) for example with vsftpd
you can "jail" users to their homedir by using configuration
chroot_local_user=YES

The ftp server will not let the user to go below that directory.
User homedir: /home/ftp
User can access: /home/ftp, /home/ftp/pub
User can not access: /home, /etc, /, /root etc..

Answer: It can mean two things:

a (or all) user/login is restricted to their "home directory" as opposed to having a full view of the FTP hierarchy.  This is typically implemented in software at the application
level (e.g. FTP server).
the FTP processes are jailed in a chroot type of setup, as a security measure.  This is pretty common for servers which allow anonymous access.  In the old days, this was done via the chroot syscall, although I've a feeling there may be more modern ways to do this now on some OSes.  Anyhow, this type of setup is a bit more tricky and far more OS dependent (even if simply using chroot).
Answer: In the old days on UNIX systems, jailing users to a certain directory was cumbersome, error prone, and could lead to problems. You had to compile special static linked binaries for things like ls and cd and move them in to the jail, for instance.  If your OS / software is requiring this - note to the wise, it's problematic. I much prefer newer FTP servers that don't require this approach.
On IIS, I find jailed FTP difficult to do - though there is one description for something close above, its not exactly as smooth. Kudos for doing that though, I've tried many times to find something like that.  I use Filezilla on Windows instead, it has a rather elegant solution to the jails problem that works as expected.  No security ramifications that I'm aware of, Filezilla seems to fix vulnerabilities quickly.
Modern UNIX FTP implementations seem to make jailing much easier, and probably much safer. The majority of the security concerns remaining; once you assume that you are OK to grant your user access to anything below the jail point, is the question of "is my vendor / FOSS software provider providing patches in a timely manner?"


(Ordering food) difference between なし and 抜き

Question: What is the difference between endings なし and 抜【ぬ】き when you want to exclude a certain ingredient from food?
Aside from 氷【こおり】なし when ordering soft drinks, I thought that for most other things 抜【ぬ】き should be used. But my friend has been saying 卵【たまご】なし to get rid of an egg, so I'm curious when which one of those is appropriate.
Answer: As a customer, using either one is completely fine.  Among us native speakers, it is like each person has a habit of using one over the other.
Point is each eatery tends to use one word over the other among its staff members as well, meaning that even when you order by saying, for instance, 「[卵]{たまご}なしで = "with no eggs"」, your waiter/waitress might reply by saying 「卵[抜]{ぬ}きですね?」.  This happens quite often but do not be discouraged because they are just using 「抜き」 almost as a house rule.  It is not that they are trying to correct you because you used the wrong word.
Comment: I'm glad you point that out because I always take those kinds of altered repetitions as corrections
Answer: Although similar, there is a small semantic difference between the two words.

抜き(ぬき)

Meaning: leaving out; omitting; skipping
As an example, at a conveyor belt sushi restaurant in Japan, if you order sushi without wasabi, you may get a little flag to indicate that the sushi comes without wasabi.

If it is typical or expected for a restaurant to serve sushi with wasabi then ぬき emphasises that something has been left out, removed or excluded.

なし(無し)

Meaning: without
The word is very similar to ない, which means something that does not exist.
なし is often used to refer to people whereas ぬき is often used to refer to ingredients. (氷なし being a strange exception to that rule)
Comment: Re your last paragraph, are you saying that 卵なし is less natural than 卵抜き? I think they are both common and natural (like the accepted answer says).
Comment: @DariusJahandarie True, the nuance is so small in most cases. I wanted to cover more about the meaning of each words that hasn't been included in the accepted answer.


Why "answer me" but not "answer me the question"?

Question: Why are "answer me" and "answer the question" acceptable but not "answer me the question"?  Is it similar to "explain me (something)"?
Comment: Possible duplicate of: [What's wrong with "I'll open you the door"?](http://english.stackexchange.com/questions/90530/whats-wrong-with-ill-open-you-the-door)
Answer: Riddle me this, Batman.
Sometimes it  actually is ok to "answer me a question". Acceptability may vary.  For example, this sounds fine to me:

If you can answer me this next question, you can go free.

Here are several examples from Google Books, all of which sound find to my ear:

I want you to answer me this question. What is your heart made of? He mocked  her.
Do answer me this question, if you please?' The exasperated dwarf returned no  answer, but turned round and caught up his usual weapon with such vehemence,  that Tom Scott dragged his charge away, by main force, and as swiftly as he ... [Charles Dickens]
Well, then, Bernadette, answer me this. Do you know what they're going to think  in Hanoi when they learn that the children of the officers of this country's military  are protesting the war?
Come, then, and answer me what difference it makes whether I present Paul  speaking in my way, or a commentator says 'this is what Paul means,' and goes  on to give his own explanation.
"Wait jest a minute, duke— answer me this one question, honest and fair; if you  didn't put the money there, say it, and I'll b'lieve you, and take back everything I  said." [Mark Twain]
Then he said: 'Can you answer me this one? Why is the county of Kildare like the  leg of a fellow's breeches?' [James Joyce]
"You answer me one question, there, Kali girl," he says quietly, the dangerous,  angry drunk gone for a moment, replaced by a sad, dejected man. "Answer me one question, and if you answer it right, I'll go. Okay?"
"Answer me one thing before you go. One thing, and tell me the truth. Have you  ever been in love?"
"I will tell you that if you will first answer me one question, Rima."
Answer me one word  — is it this mysterious stranger whom your father honours with his friendship?
"Before I draw nearer to that stone to which you point," said Scrooge, "answer me one question. Are these the shadows of the things that will be, or are they  shadows of the things that may be, only?" [Charles Dickens]
Before I reply," said Preciosa, "you must answer me one thing, by the life of the  one you most love." [Edgar Allen Poe]
The incognita, however, shook her head with a mournful, abstracted air, and did  not answer him one word.
And did you answer him his question? —I answered him a  few questions.
Listen to me," coming a step nearer, " before I go you shall answer me one  question.
I told him be had intimated that two or three times to me; that if he would answer me two questions, I would then listen to him.
'Noble count,' said Marco, 'answer me two questions, and I shall receive these  gifts in pay for your answers.' [Mary Shelley]
"You answer me three questions and then I will let you know how excited I am for  you."

Previous Answer
The simple answer is because we no longer talk that way. Here's a rather famous quote that uses the very thing you have asked about:

"He who would cross the Bridge of Death must answer me these questions three ere the other side he see."

As you might detect, that is a valid but archaic  formulation. (Another sign of deliberate archaism there is the present subjunctive following ere.)
The OED has several transitive senses of answer, but almost all are marked either archaic or indeed even obsolete, especially the bitransitive ones.
Here are a few such examples from the OED:

1581 Charke in Confer. iv. (1584) F f b, - You haue so often chalenged vs to answere you an argument.
1594 Shaks. Rich. III, iv. ii. 96 - Stanley looke to your Wife: if she conuey Letters to Richmond, you shall answer it.
1625 Donne Serm. cl. Wks. VI. 61 - Whosoever is dead in that family by thy negligence, thou shall answer the King that subject.
1731 Swift Corr. II. 649 - The maid will..sell more butter and cheese than will answer her wages.
1793 Smeaton Edystone L. §125 - The Proprietors could not answer it to the public..if they kept me in waiting.
Comment: +1 But the archaic formula is preserved–fossilized, you may say–in the still-current "Answer me that!"
Comment: @StoneyB Yes, the imperative form preserves it, as I have just pointed out to John.
Comment: @StoneyB Actually, it appears that you can get away with it when modals are involved, too: [check this out](https://www.google.com/search?q=%22must%20answer%20me%20one%22&tbs=bks:1,cdr:1,cd_min:1904,cd_max:2008&lr=lang_en). Similarly [here](https://www.google.com/search?q=%22answer+me+this%22&btnG=Search&tbs=bks%3A1%2Ccdr%3A1%2Ccd_min%3A1904%2Ccd_max%3A2008&lr=lang_en).
Answer: The simple answer is that, while answer is a transitive predicate, and therefore has a direct object (referring either to the question that was answered or the addressee of the answer -- but not both at the same time); nevertheless answer is not a bitransitive predicate, and therefore has no indirect object.

I told the number to Bill ~ I told Bill the number
I sent the book to Bill ~ I sent Bill the book.
(bitransitive verbs, direct & indirect objects, and Dative Alternation)
I fixed the socket ~ **I fixed the socket to Bill* ~ **I fixed Bill the socket*
I answered the question ~ **I answered the question to Bill* ~ **I answered Bill the question*
(transitive verbs w/ direct object, but no indirect object, therefore no Dative Alternation)
Comment: Answer me one question, please: is there anything wrong with this sentence? :)
Comment: Fixed forms exist. Answer yourself your question.
Answer: The more complicated answer is a lot of people don't accept that answer can be ditransitive (i.e. - they don't think it can validly modify both me and the question in OP's example).
I'm not going to say they're wrong - I'm perfectly happy with I'll open you the door, for example, but fairly obviously most people aren't.
But I would say that in the case of [in?] question, it's worth noting there are apparently over half-a-million written instances in Google Books of...

Answer me this

...so if it is wrong, a lot of people either don't know that, or don't care. I think many verbs are "marginal" in this respect, and that answer is considered "ditransitive" by a significant minority.

For reasons that aren't fully clear to me, people are more prepared to "stretch" marginal verbs when the additional indirect object is me. So **"I answered Bill the question"* sounds bad to people who don't mind "Answer me that!"
I think it's probably connected with the fact that forms like "Give me the money!" are acceptable to all because the indirect object (me) is a recipient. When you say "Answer me that!", what you really mean is "Give me an answer to that!". Semantically, answer serves as a "giving" verb, allowing it to be used ditransitively.
The specific indirect object me probably figures disproportionately high in the total number of utterances a person makes (we're always saying variants of "Give me this!" and "Give me that!"). My guess is that predisposes at least some of us to accept "Answer me that!" more easily than **"Answer Bill the question!"*
Comment: I've found quite a few others in Google Books, too, like "Answer me what difference it makes. . . ." It also seems to work if there is a modal like *must* or *will* before it: "You will answer me one last question before you leave here, young man."  This is almost always with "answer me"; instances of "answer him his question" are much rarer.
Comment: What, you think people would have a problem with "Open me one of those packages, please"?  Odd.
Comment: @tchrist: It's not a matter of what ***I*** think. Check the link, count the votes for the top answers, *then* tell me other people don't have a problem with some of these usages. Anyway, unless I'm much mistaken, you yourself had a problem with *"I'll cash you a cheque"*. Even if you personally don't, an awful lot of Americans do.
Comment: I assure that my only problem with you cashing me a check is completely limited to its spelling.  No really, cash me a check sounds fine.
Comment: @tchrist: The spelling of *cheque/check* was precisely what prompted me to use that one in [my answer](http://english.stackexchange.com/a/90531/2637) to the linked question. The two top answers (saying such forms are not valid) currently have 85 votes between them; mine (saying they *are* valid) has 4 votes. Like I say, I'm only reporting what other people think, since obviously I don't agree with them.


How to meditate lying down

Question: I use to meditate properly in a sitting posture, But recently my physical health got worse and it restricts me from sitting for a long time. hence I started meditating lying down, But I have observed that it is difficult to maintain concentration in lying posture due to sleepiness as compared to the sitting posture. how can I practice meditation in lying posture with full concentration.
Comment: then meditate in that position when you're not feeling sleepy at all :) i.e. after a good night's sleep, or after an afternoon nap. it is very difficult to get sleep after you have just slept for long time.
Comment: Just do Yog Nidra. https://en.wikipedia.org/wiki/Yoga_nidra
Answer: Shavasana is the most famous way of meditating while lying down. The only restriction is that one may not lie in left or right side. The posture has to be facing the sky:

To perform Shavasana, lie on the back with the legs spread as wide as the yoga mat and arms relaxed to the side. The eyes are closed and the breath is deep with the use deergha (long) pranayama. The whole body is relaxed on the floor with an awareness of the chest and abdomen rising and falling with each breath. During Shavasana, all parts of the body are scanned for muscular tension of any kind. Any muscular tension the body finds is consciously released as it is found. All control of the breath, the mind, and the body is then released for the duration of the asana, typically 20–30 minutes.
The asana is released by slowly deepening the breath, flexing the fingers and toes, reaching the arms above the head, stretching the whole body, and exhaling while bringing the knees to the chest and rolling over to the side in a fetal position.
Comment: Shavasana is a Hatha Yoga posture. It is not a meditative posture at all.
Comment: You should add Yog Nidra in your answer to help OP. Asanas alone are not sufficient to eradicate impressions on our Chitta. Asanas are for body, for mind & energy also you should quote. :)
Comment: @Rohit., the OP wants to avoid "sleepiness" as already mentioned in the Qn. Yoga Nidra which is a mental posture, is like between waking & sleepy stage or like the "going-to-sleep" stage. Shavasana which is a physical posture, may or may not include the "yoga nidra" depending on practitioner's choice.
Comment: @Rickross, the *shavAsana* is primarily to commence the meditation with ease. It may not be meditation in itself, but strongly related to meditation. The same can be found further into the wiki article [& elsewhere]. `Shavasana then becomes the beginning of deeper, meditative yogic practices ... On the other hand, yoga-nidra ("yogic sleep") meditation is often practiced in a lying position.` Personally, I am not aware of any other postures, which helps meditation in the lying position. Though there may be some.
Answer:
But I have observed that it is difficult to maintain concentration in lying posture due to sleepiness as compared to the sitting posture.

You don't need to worry about this. In fact, you can use such condition as meditation as well! From VijnAnaBhairava Tantra-

When sleep has not yet fully appeared i.e. when one is about
  to fall asleep, and all the external objects (though present) have
  faded out of sight then the state (between sleep and waking) is
  one on which one should concentrate. In that state the Supreme
  Goddess will reveal Herself. Verse 75.

Now, how to concentrate?
For concentration there are many ways one has been described here. Another is repeatedly direct mind towards your present condition as whatever you practice repeatedly it becomes habit of mind whether concentration or distraction (Watch this). So, for concentration only you can do is you can put right efforts. You can also witness flow of your breath while lying down. When you are distracted concentrate again. repeat this concentration repeatedly.

How to meditate lying down


Selective versioning in Document Library

Question: I need selective versioning in Document Library in such a way that I am able to check mark versioning while uploading some specific files only (irrespective of file formats).
Answer: You can't do that on a single document library.  If you have SharePoint Server 2010, you could use the content organizer to have a single place where documents are submitted and based on your metadata (enable versioning yes/no) you could put the documents in two different libraries, one with versioning and one without.


'All Time' reputation rank shown in percent

Question: Is it possible to see  All Time reputation rank shown in percent? If you i.e. have top 10% this month shown on your user page - you can get the All Time rank in number i.e. #12345 - can this be shown as i.e. top 15% all time?
Comment: You might want to have a look at http://data.stackexchange.com/stackoverflow/queries - I think this might be what you are looking for: http://data.stackexchange.com/stackoverflow/query/6772/stackoverflow-rank-and-percentile
Comment: that query is wrong - its cut-off is at 100 rep, and for some reason the rank it finds is (for me) about 20 lower (i.e. better) than what's shown in the "leagues" ranking. It might be counting duplicate rep entries as one, but I'm not sure.
Comment: Thanks @Marco13, I didn't know of the *SO queries* - very useful
Comment: Lo, there be a [userscript](http://stackapps.com/questions/6485/show-each-users-percentile-in-rep-leagues) for yea this very reason.
Answer: when you click on "top 10% this month", you get thrown into something like http://stackexchange.com/leagues/1/month/stackoverflow/2015-10-01/...; in the address bar, double click on "month" (it gets selected), type over "alltime", and press Enter.
you will see your alltime rank. then look at the side table and note "total reputation" entry for "200+".
divide the first number by the second, and multiply by 100, to get your "top X% overall" percentile, as would be shown by SO.


What do I do to prevent and treat frostbite?

Question: I'm going to be winter camping, and I'm concerned about getting frostbite. What can I do to protect myself?
Answer: It is much better to avoid frostbite than to treat it. You can easily lose fingers and toes to frostbite. When you are camping in the winter, you cannot go into the lodge and warm up like you do snow skiing. You should really pay attention to frostbite.
If it is much below freezing and you have numb fingers or toes, you should take some kind of action. If you have more clothes, use them. Chemical foot or hand heating packs work well and can prevent frostbite. You can warm your fingers or toes on someone else's stomach. You might be able to move around a lot and warm up your fingers or toes.
When your body starts getting cold, it reduces circulation to your extremities (fingers and toes) and they get cold. If you can warm up your whole body, it will warm your fingers and toes.
You can also get frostbite on your face if you leave it exposed to the wind. Your face warms up easier than your fingers and toes, though. If you have any numb spots on your cheeks, ears, or nose, warm them up. You can also see fresh frostbite on a face -- it's usually kind of white colored.
Comment: Great answer. I have one tidbit to add: Don't wear boots that are too tight as this restricts blood flow, and don't wear boots that are too wide as this leaves your toes prone to get cold.
Comment: A very good point. This happens to a lot of people.
Comment: +1 for stomach warming, an old school mountaineering technique that breeds camaraderie and can save a finger or toe.
Answer: As stated above, the best way to treat frostbite is to avoid it all together.
As for proper treatment, you should slowly warm the affected area, typically done through a warm water submersion. Frostbitten feet should not be thawed until you are ready to no longer walk, as you will more than likely lose the use of your feet.
Additionally, in a situation where you are likely to get frostbite you are also likely to get hypothermia. Make sure you study up on the early warning signs of hypothermia. It's a killer.
Make sure you tell people where you are going, when to expect you, etc. if you plan on doing this.
Answer: As said, prevention is better than cure. But, most importantly, don't attempt to thaw frostbitten areas if there's any chance of them re-freezing. This typically means don't try to treat it yourself in a back-country setting.
...And once you're in civilization, get a medical professional to handle it!
Answer: How can you protect yourself?

Extra layers on your extremities
Chemical warmers
Stay dry
Stay out of the wind
Use 4-season gear meant for freezing temperatures
Answer: Very important: Do not exhale air into your gloves/boots or at your hands/feet while still exposed to cold conditions. It may warm them up for a few seconds but since your exhalation contains moisture, your extremities will get wet(ter) and even colder very quickly. Just a simple thing to keep in mind.


Why isn't rasterization combined with raytracing more often?

Question: If I'm not mistaken, you can make a hybrid renderer which lets a rasterizer solve the visibility problem, then shade all of the projected shapes with a raytracing algorithm. It seems that this isn't commonly done however, what's the reason for that? Oversight?
Answer: Rasterization is sometimes used for primary rays. However, it limits greatly what you can do - depth of field, motion blur, participating media, refraction, only basic camera models, no adaptive or custom sampling, etc.
Comment: Using the z-buffer should enable you to make an approximate of the DOF effect. I don't see how it limits refraction however. Lets suppose you don't actually render the triangles using rasterization, you just tell the raytracer which portions of which triangles to shade given the z buffer (now you have your t-parameter which gives you a hitpoint ), you should be able to just refract that.
Comment: @AnnoyinC This "approximation will be arbitrarily bad. In general dof depends on the aperture of your camera, which you cannot really model very well in rasterization. The issue with refraction, is that if you put a glass panel in front of your camera, your rasterization will effectively just "intersect" the glass panel, which may be made from 2 triangles, so you don't get the usual high gain compared to ray tracing.
Comment: @lightxbuld in that example, a pure raytracer would be even slower. It woul raytrace the first intersection, and then the refraction/reflection, so it has to do 2/3 passes for a render. Offloading the first pass to a rasterizer would still provide gains.
Comment: @AnnoyinC I wouldn't be so sure. In rt you may hit the bounding box of this glass quad and be done, in a rasterizer you may have to render millions of tris hidden behind it.
Comment: Oh, I see what you mean now. Yeah, I was thinking along the lines of "get a very simple rasterizer to simply get the nearest triangle for each pixel, then use a raytracer as a shader." Then the raytracing shader can concern itself with material properties like transparency.
Comment: @AnnoyinC The issue is how you find the "nearest" triangle. And if two tris intersect, then some parts of both are nearest - that's where z-buffer comes in, but you may have to render you whole scene for that. Some tricks may be used however to achieve something similar like acceleration structures in ray tracing.
Answer: There are renderes that do this. Most notably Pixars Renderman prefers to work this way. Hybrid renderers can work in other ways too...
It used to be that hybrid renderers like this were quite common, they still are somewhat  in software only implementations. They are slowly being replaced though by a new breed of trace only renderes though. Mostly the reason is that by foregoing the other you get a simpler piece of code.
Answer: Disclosure: I work for IMG/PowerVR
Indeed there are rendering systems that can do this: Imagination demonstrated hybrid rendering on their "Wizard" Ray Tracing/Rasterisation system. Scroll down to "Making ray tracing happen" and there is a screen grab of a hybrid demo.
As others have mentioned, there are pros and cons: Some advantages include that rasteriser can be extremely efficient at handling the first set of intersections and, for shadows, you don't spend effort pre-rendering portions of shadow maps that may never be visible in the final render. On the downsides, you are typically constrained to the standard pinhole camera model.
Answer: Because when you test the visibility of a fragment during rasterization you already know (or can easily calculate) all the details that raytracing will give you.
So doing the ray-triangle collision calculation is redundant.
But it is the additional lighting beyond the first hit where raytracing is helpful. However each ray is only a small part of what contributes to the lighting in a scene, so you need a lot of them per fragment. And each ray has relatively large cost to compute.
Those two properties make raytracing not very atractive for real-time rendering without some dedicated acceleration.
Comment: _"Those two properties make raytracing not very atractive for real-time rendering without some dedicated acceleration"_  One could probably say the same for rasterisation.  ;-)
Comment: When you combine rasterization with ray tracing, you're allowing the standard rasterization to determine the location that the primary ray would hit. It's not redundant because you no longer have to test the first ray for intersection.


Why has Earth's core not become solid?

Question: The Earth is billions of years old, yet its core has not yet cooled down and become solid. Will this happen in the foreseeable future?
Comment: Isn't the inner core solid?
Comment: yes, the inner core is solid.
Comment: @RoghanArun It is, but not because it isn't hot enough to be molten, but because the pressure is too great
Answer: I generally take "foreseeable future" to mean "in my lifetime" in which case the answer is No. However, if you are really asking, "What does science say about the solidification1 of earth's core?" then we can answer this.
In the core of the planet, we actually have this pretty picture:

The "solid inner core" is pretty much pure iron at a nice pretty temperature of about 5700 K (strangely close to the sun's surface temperature), which seems to be greater than iron's melting point of about 1800 K, but the Clausius-Clapeyron relation shows that melting points change with an increase in pressure, so all is well there.
The reason the heat has been retained in the core is that the only processes to move the heat are convective transport and thermal conduction, the latter being a fairly slow process (aside: it's the convective currents that cause the magnetic field). Degeun et al (2013) state,

...the dynamical time-scale of the thermal convection in the inner core [is] $\sim$1 My or more.

Which, though shorter than the age of the planet, is still pretty long. But the inner core is also growing at a rate of about 0.5 mm/year (possible paywall) and has been doing so for about a billion years. Though unreferenced, this Earth.StackExchange answer suggests that the core has cooled only 250 K since it was formed (a rate of 55 K/Gyr). At that rate, "...it would take something like 91 billion years to cool to 0 K." So no, not in our lifetime for sure!
Note also that the mantle is being partially heated by radioactive decays of Uranium-238, Uranium-235, Thorium-232, and Potassium-40, all of which have half-lives of greater than 700 million years (up to about 14 billion years for Thorium). This will protect us for some time from the complete cooling of the core.
So, fortunately for our tiny planet, the core will stay nice and toasty warm for a few more billion years (my estimation). Unfortunately for the planet, the sun will go red giant phase and eat it up before the core cools.

I'm being liberal with this word. As I state elsewhere, the core is solid. OP intends it to mean a cold lump of iron rather than the toasty lump of iron that we have
Comment: *" (a rate of 55 K/Gyr). At that rate, "...it would take something like 91 billion years to cool to 0 K"*. That assumes a linear relation. That is not reasonable for such systems. It is more like exponential (if the "heat flow" is proportional to the temperature difference), and it would take much much longer (infinity in fact for 0 K - a more reasonable temperature of 300 K could be assumed).
Comment: @PeterMortensen that is probably a more appropriate assumption; I just quoted a value I found there. If I get a chance later today I can edit it in. Though if you want to edit it in yourself, feel free (that is what the edit button is for ;))
Answer:
Why has Earth's core not become solid? Will this happen in the foreseeable future?

TL;DR answers:

Why has Earth's core not become solid?
A lot of residual heat from the Earth's formation remains inside the Earth. Heat is released as iron and nickel freeze onto the solid inner core, which slows this freezing process down. The Earth is big. Moon and Mars are much smaller, and they still have liquid outer cores.
Will this happen in the foreseeable future?
No.

The answer to the second question is no. It might happen in a few billion years, then again it might not happen at all. The Sun will turn into a red giant in about five billion years or so and might expand to engulf the Earth. If that happens, the Earth will be gone.
The core answer to the first question is that a lot of residual heat from the Earth's formation still remains inside the Earth, and a good fraction of this residual heat is concentrated in the Earth's core.
An argument against the Earth's core freezing any time soon (e.g., a billion years is "soon") is that the Moon (Williams 2006) and Mars (Yoder 2003) still have liquid outer cores. The Moon and Mars are much smaller than is the Earth. The square-cube law suggests that a large body such as the Earth will have an even slower core cooling rate than those much smaller bodies. Going against this, the Moon and Mars have stagnant lid convection systems while Earth has an active plate tectonics system. However, that our Moon still has a liquid core has to argue against the the Earth's core freezing any time soon.
One key to answering this question is the rate at which heat energy crosses the core-mantle boundary. Estimates of this heat flux vary widely, from less than 2 terawatts to over 15 terawatts. The possible sources of this heat flux are:

Latent heat of freezing as molten iron and nickel in the outer core freeze onto the inner core.
Secular cooling of the Earth's inner and outer core.
Gravitational heating as lighter elements in the outer core are rejected from the freezing process.
Radiogenic heating from decay of radioactive elements in the Earth's core.

The final item is highly controversial. Most geochemists and geophysicists are of the opinion that there are but negligible amounts of radioactive elements (235U, 238U, 232Th, 40K) in the Earth's core. Uranium, thorium, and potassium are strongly lithophilic elements. Moreover, they are incompatible elements. Compared to chondrites, these elements are concentrated in the Earth's crust, depleted in the upper mantle, and are likely slightly depleted in the lower mantle. These elements just shouldn't be in the core.
Recent geoneutrino detection experiments (KamLAND 2011) bolster these views, at least with regard to 238U and 232Th. (The neutrinos produced by 235U and 40K are of too low an energy to be detected by existing detectors.) That uranium and and thorium are not present in the Earth's core is consistent with results from the these geoneutrino observations.
Nonetheless, several recent papers (e.g., Lay 2008) argue for a very high core-mantle boundary (CMB) heat flux. This presents several problems. One is that it means the Earth's inner core is very young, a billion years old or less (Labrosse 2001). Others argue that the inner core is at least two billion years old (Stacey 1999), and possibly even older. A related problem: If the Earth's inner core is very young, what powered the geodynamo prior to the formation of the inner core? Another problem is that this high heat flux means implies a non-negligible amount of radiogenic heating in the Earth's core.
One way around this dilemma is that the Earth's core does contain a non-negligible amount of radioactive elements, particularly 40K (Nimmo 2004). Others argue that even if it is possible for potassium to enter the core, there just isn't enough potassium in the Earth to explain a large heat flux from the core (Lassiter 2006).
An alternative is that a considerable amount of heat is generated at the CMB, in the D'' layer. The recent discovery of post-perovskite might provide a mechanism. There could well be a deep magma ocean or a partial melt at the base of the mantle (Labrosse 2007, Stixrude 2009). As uranium, thorium, and potassium are incompatible elements, this deep magma ocean would naturally contain concentrated amounts of those elements.
References
KamLAND 2011. KamLAND Collaboration (2011), "Partial radiogenic heat model for Earth revealed by geoneutrino measurements," Nature Geoscience 4.9 : 647-651.
Labrosse 2001. Stephane Labrosse, Jean-Paul Poirier, and Jean-Louis Le Mouël (2001), "The age of the inner core," Earth and Planetary Science Letters 190.3 : 111-123.
Labrosse 2007. Stéphane Labrosse, J. W. Hernlund, and Nicolas Coltice (2007), "A crystallizing dense magma ocean at the base of the Earth's mantle," Nature 450.7171 : 866-869.
Lassiter 2006. J. C. Lassiter (2006), "Constraints on the coupled thermal evolution of the Earth's core and mantle, the age of the inner core, and the origin of the 186 Os/ 188 Os "core signal" in plume-derived lavas," Earth and Planetary Science Letters 250.1 : 306-317.
Lay 2008. T. Lay, J. Hernlund, and B.A. Buffett (2008), "Core–mantle boundary heat flow," Nature Geoscience 1.1 : 25-32.
Nimmo 2004. F. Nimmo, et al. (2004), "The influence of potassium on core and geodynamo evolution," Geophysical Journal International 156.2 : 363-376.
Stacey 1999. Frank D. Stacey and Conrad HB Stacey (1999), "Gravitational energy of core evolution: implications for thermal history and geodynamo power." Physics of the Earth and Planetary Interiors 110.1 : 83-93.
Stixrude 2009. Lars Stixrude, et al. (2009), "Thermodynamics of silicate liquids in the deep Earth," Earth and Planetary Science Letters 278.3 : 226-232.
Williams 2006. J. G. Williams, et al. (2006), "Lunar laser ranging science: gravitational physics and lunar interior and geodesy," Advances in Space Research 37.1 : 67-71.
Yoder 2003. C. F. Yoder, et al. (2003), "Fluid core size of Mars from detection of the solar tide," Science 300.5617 : 299-303.
Comment: Isn't the inner core solid?
Comment: It occurs to me that radiological heating of the mantle affects the rate of heat transfer across the core-mantle boundary even if there is no appreciable decay heating in the core proper. Not sure how that feeds into *"The final item is highly controversial."*.
Comment: Can you introduce the abbrev. *CMB* in your answer?
Comment: Does the radiation from elements in the crust also penetrate towards the Earth's center and provide some heating effect?
Comment: Is CMB = core-mantle boundary?
Answer: Hot stuff on the surface of the Earth cools fast because air can carry away the heat pretty easily by convection. This heat is eventually radiated back to space.
The outer core, on the other hand, touches the hot mantle. Due to the relatively small temperature difference, there's not much heat transfer to the mantle. The mantle itself does slowly cool, but this is at the subduction zones in the ocean (which are relatively few compared to the entire surface area of the mantle), as the rocky crust insulates the mantle.
Besides that, radioactive decay is a significant contributor to keeping the outer core molten.
So, no, the core won't cool significantly in the forseeable future.
Answer:
Earth is big, so takes a long time to cool down.  Note that Mars, being smaller, has already cooled down to this point.

The heat from radioisotope decay over something with the mass/area ratio of earth is significant.
Comment: Mars has not cooled down to this point. It still has a liquid core. See Yoder, et al. (2003), "Fluid core size of Mars from detection of the solar tide," Science 300.5617 : 299-303.
Comment: @dj_mu: The initial heat is lost by black body radiation from the surface. The energy of this heat is proportional to the planet mass, but the loss rate is proportional to the surface area. Small planets like Mars have less mass per surface, so cool faster. Radioisotope heating power is also proportional to mass or volume, but is also lost proportional to surface area. Mars looses again compared to Earth, as does our moon.
Answer: Earth's inner core is already solid. However not because it is cold, but because of high pressures. Now for whether Earth outer core will freeze, well radioactive decay heats up Earth's outer core. Pressure also prevents Earth outer core from losing heat. Of course a part of Earth's outer core is solidifying. Lighter elements are solidifying on the surface of the outer core as the outer core loses heat to the mantle. This causes dynamical patterns and is one reason for why the Earth has a magnetic field. As this happens molten iron moves through these solidified lighter elements. Amplifying the magnetic field coming from deeper in the outer core.
Answer: Don't forget the gravitational title forces of the moon and the sun combined, that stretch and cool the earth, also generate heat within the planet.
Example, take a plastic spoon or something like that and start to slowly bend it – bend it back and forth slowly so it doesn't break and it will slowly start to get soft and as it gets soft, bend it back faster and faster until it actually gets hot enough to cause a first real first-degree burn in the spot that's been bending the most.
If we didn't have the moon, we would've ended up like Mars. Mars does not have any real moons to speak of – it has two large asteroids. If Mars had a moon similar to ours, it would've kept the center of the planet liquid and hot, which would have its magnetic field and prevented the atmosphere from being blown away by solar winds....
Mars once had a huge ocean and an atmosphere but then lost it… And the only way to lose that is to lose your magnetic field… And the only way to lose that is for the core of the planet to cool.
The amount of radioactivity based on the materials in our planet earth are not enough to keep our planet as warm and hot as it has been underneath the crust... Certainly radioactive decay has played a role in keeping the center of our planet warm… But the two main factors are high pressure and density combined with the title forces of the sun and moon. When the sun and moon are in opposition, the planet is slightly stretched out and is more oval-shaped...when the sun and moon are at 90° angles of the planet that pulls on the planet in a different manner… And when the sun and the moon are on the same side of the planet, that pulls that side of that side of the planet even further towards the sun and the moon.
So our planet is constantly being kneaded like bread dough....and if you ever kneaded bread, you know that the act of doing it keeps the dough warm.
Plus don't forget all of this tugging and pulling creates a huge amount of friction… And as we all know when you rub your hands together and generate friction – they get warm. The same thing with our planet.
Just do an Internet search for "what if the earth had no moon" and you will find many scientific articles that say we would be just like Mars or close to it nowadays. I'm not saying a moon is required for a planet to stay warm, but in our case, it is the most contributing factor to prevent our core from being cold by now.
Comment: That isn't true. Tidal heating of the earth by the Moon is negligable. See [this book for the details](https://books.google.co.uk/books?id=VC2mKJlHbokC&pg=PA110&lpg=PA110&dq=tidal+heating+earth+moon+system&source=bl&ots=Qfs4NS8QH3&sig=kzx5roQdrE_soKrjGM2xzZeZS1A&hl=en&sa=X&ved=0CGMQ6AEwCWoVChMIjrqlmo-ayAIVSO0UCh0t0wqV#v=onepage&q=tidal%20heating%20earth%20moon%20system&f=false).
Comment: I read that book and it doesn't really have scientific merit in my opinion… I have read plenty of scientific articles that basically contradict that entire book

Why has Earth's core not become solid?


Why was Jesus asleep during the storm?

Question: In the Bible, it is said that Jesus was asleep in the boat during the storm.  What is the reason?
Comment: What sort of answer beyond "he was tired" are you after?
Comment: Like, if it was to represent something.
Answer:
Psalm 107:23-29 (DRB)
They that go down to the sea in ships, doing business in the great waters: 24 These have seen the works of the Lord, and his wonders in the deep. 25 He said the word, and there arose a storm of wind: and the waves thereof were lifted up. 26 They mount up to the heavens, and they go down to the depths: their soul pined away with evils. 27 They were troubled, and reeled like a drunken man; and all their wisdom was swallowed up. 28 And they cried to the Lord in their affliction: and he brought them out of their distresses. 29 And he turned the storm into a breeze: and its waves were still.

Here in the Psalms, God is portrayed as testing His redeemed, by willing there to rise a storm and that they would cry out to Him. I see nothing else here in Matthew 8 than this. We would be 'slow of heart' not to see the intended parallel:
(Ps. 107:25-28)

"there arose a storm of wind: and the waves thereof were lifted up.
They mount up to the heavens, and they go down to the depths: their
soul pined away with evils."

(Mk. 4:37-38)

"And there arose a great storm of wind, and the waves beat into the
ship, so that the ship was filled. 38 And he was in the hinder part of
the ship, sleeping upon a pillow; and they awake him, and say to him:
Master, doth it not concern thee that we perish?;"

(Ps. 107:28-29)

"and he brought them out of their distresses. 29 And he turned the
storm into a breeze: and its waves were still;"

(Mk. 4:39)

"And rising up, he rebuked the wind, and said to the sea: Peace, be
still. And the wind ceased: and there was made a great calm."
Answer:
The LORD is in his holy temple, the LORD'S throne is in heaven: his eyes behold, his eyelids try, the children of men.The LORD trieth the righteous. [Psalm 11:4,5 KJV.]

The Lord tries the righteous. His eyelids try the children of men.
Sometimes the Lord does not answer prayer. Sometimes he appears to be asleep. And in those times we are tried. What will we do ?
Jesus tried his disciples, betimes. When they came to him regarding the feeding of the five thousand, he did not immediately feed the multitude, he first asked the disciples what they had. What have you got ? What can you find ? What do you have to work with ?
So in the boat. He slept. Remarkable that he could, in the midst of storm and chaos and the upheaval. It would indicate his exhaustion with the responsibility of ministry and travel.
But, because of his sleeping, the disciples were tried in their faith. What would they do in the Lord's 'absence' ? What would be brought out in their trial ? How would they react ?

Master, carest thou not that we perish ? [Mark 4:38 KJV.]

Master ? Not Lord ? In distress, they revert to a relationship of Master and servant.

Why are ye so fearful ? How is it that ye have no faith ? [Mark 4:40, KJV.]

The Lord, by his inactivity, has drawn out something that was within them. And he speaks to it. And they learn by the experience.
His eyelids try the children of men.

O God, no longer silent be,
from slumber do thou cease:
be thou no longer still, O God,
and no more hold thy peace.

Psalm 83 :1.
Answer: Jesus (the man) the same as you and I; would become tired in his human body. Jesus traveled extensively, and he did not have the luxury of any conveyance. Travel was either on foot or aboard an animal such as his entry into Jerusalem on a donkey.
Even beyond that Jesus having foreknowledge of his death on a Roman cross; must have had much mental stress.

Matthew 26:38 and 39  KJV  Then saith he unto them, My soul is exceeding sorrowful, even unto death: tarry ye here, and watch with me. And he went a little further, and fell on his face, and prayed, saying, O my Father, if it be possible, let this cup pass from me: nevertheless not as I will, but as thou wilt.

And the closer he drew to that hour, the greater that stress must have been. In the above Scripture we see that on the night, before his crucifixion; he was distressed to the point that he even asked the Father, if there were another way to save mankind; to please release him from that death. Just imagine that you were aware from birth, that you were going to die a violent death at the hands of some machete wielding thugs. the closer it came to the date the stronger your stress would become. It is a well established medical truth, that great stress is more tiring than physical stress
I often thank God that I do not have to suffer as Jesus did, and that he has not shown me the future; or how my demise will occur. I know that in Jesus position I could not be as willing a servant as he was.
It must also be remembered; that Jesus having foreknowledge of his death, would have known they would not perish in the Storm. And that his calming of the storm was for the worry of his compatriots:

Matthew 8:24 through 26 KJV  And, behold, there arose a great tempest in the sea, insomuch that the ship was covered with the waves: but he was asleep. And his disciples came to him, and awoke him, saying, Lord, save us: we perish. And he saith unto them, Why are ye fearful, O ye of little faith? Then he arose, and rebuked the winds and the sea; and there was a great calm.

His rebuke of them shows that they were not fully believing in his deity.
Hope this helps
Answer: It did not just happen that Jesus was sleeping in the storm. In fact, the storm was too strong and it might have thrown the boat back and forth such that no one would have had the nerve to sleep, yet Jesus was sleeping – certainly, it happened for a good reason. At the end of the story, Jesus calmed the storm and questioned the faith of His disciples. The whole event had happened so that He would teach His disciples to exercise faith in God. Moreover, His disciples learned at firsthand the power of faith. Read the full story here.
Answer: From an intertextuality perspective, I see three relevant passages:
Noah

survived the deluge enclosed in a floating box
this becomes the symbol of death and resurrection

Jonah

Jonah was a prophet
he was asleep in a boat
a storm came up
Jonah is rejected by his own
Jonah dies and is resurrected
Jonah goes to the gentiles and they repent

Paul

Paul was a prisoner on a ship
a storm destroys the ship
Paul and all aboard survive

The first two would certainly be known by the author.
Answer: It's quite simple. Jesus, being God incarnate, was not bothered by storms (or the problems and trials of life we humans like to lament about) because He has ultimate authority over them and can even use them for His own purposes. The flesh is weak yet the spirit is willing. Suffering is as important as blessings in God's grand narrative. Read the Book of Job and Isaiah 45:7 for more info on this.
Hence why He's sleeping, sarcastically yet silently denouncing the Apostles' embarrassing lack of faith, since they believed they were literally going to die in the storm.
Answer: Sleep signifies spiritual slumber.
His sleeping represents a time when he is with his disciples but they lack active faith. When they fear for their lives, they call upon him with hope. He immediately rebukes them for their lack of faith.

Why was Jesus asleep during the storm?


What is the etymology of "happy as a sandboy"?

Question: "Happy as a sandboy" is obviously a simile for happy / content. Where does it come from and what is the eponymous "sandboy"?
Comment: There seems no background research by OP. GR. See: http://www.worldwidewords.org/qa/qa-hap2.htm http://www.randomhouse.com/wotd/index.pperl?date=20000922 http://www.phrases.org.uk/meanings/as-happy-as-a-sandboy.html
Comment: @Kris: I asked the question because it had recently come up in conversation, and I thought asking it here would help a young Stack Exchange site (and give me an answer). Feel free to delete if it falls under a "general reference" rule.
Answer: Meaning
Sandboys were boys or men who drove donkeys selling sand, to put down on the floor. Here's W. Meyler's 1805 poem The Rider and Sand-boy: A Tale to paint a picture of the trade.
Etymology
The earliest printed citation The Phrase Finder found is Pierce Egan's Real Life in London, 1821:

"...appeared to be as happy as a sand-boy, who had unexpectedly met with good luck in disposing of his hampers full of the above-household commodity. "

I couldn't find anything earlier, but even better, I found a definition from the same period, in a John Badcock's 1823 Slang, a Dictionary of the Turf, the Ring, the Chase, etc.

Sand-boy — all rags and all happiness ; the urchins who drive the sand-laden neddies through our streets, are envied by the capon-eating turtle-loving epicures of these cities. ' As jolly as a sand-boy,' designates a merry fellow who has tasted a drop.

(A neddy is a donkey; a capon is a rooster for meat; an epicure is "a person who cultivates a discriminating palate for the enjoyment of good food and drink".)
Bonus Victorian speculation!
The phrase was also the subject of speculation in the 19th century journal Notes and Queries (a bit like a Victorian Stack Exchange).
A reply to a query about other obsolete phrases in 3rd Series, Volume XI, June 1, 1867:

Pismire is an ant. - Merry has the sense of active, bustling, referring to the enjoyment derived from rapid motion or active occupation. You have the analogous phrase, " As merry as a grig" (cricket). Jolly is sometimes used in the same way, as for instance, " Jolly as a sand-boy," which is derived from similar movements of small insects found in sand.

In 1888, it's noted:

JOHN COLEBROOK ("Merry as a sand boy"). — More commonly "Jolly as a sand boy." This question has been twice asked in ' N. & Q.' without eliciting a satisfactory answer. See 3rd S. ix. 278, 331 ; 4th S. v. 257.

Here's the first 1866 of these unsatisfactory answers:

And here's the second 1870 unsatisfactory answer:

Charles Dickens' The Old Curiousity Shop was published in 1840 but we have earlier citations of the phrase (and a dictionary definition, no less). It's probably safe to say Dickens took the name from the phrase. Our correspondent believes the jolliness is from being drunk ("potations pottle deep"), rather than the earlier suggestions.
World Wide Words says the sandboys' hard work lasted some 15 hours a days for bad pay:

Their prime characteristic, it seems, was an inexhaustible desire for beer. ... A writer in Appleton's Journal in the USA in 1872 remarked that the saying presumably arose because "as sand-boys follow a very dry and dusty trade, they are traditionally believed to require a great deal of liquor to moisten their clay".
Answer: The phrases.co.uk syllabus on this expression does not really give a reason for why sandboys were happy, except that they were intoxicated. However, it does clearly state that the sandboys were young men delivering sand, which would then be spread on floors to absorb liquids (like sawdust).
Comment: Excellent, thanks. It's one of my Dads favourite phrases, but he didn't know where it came from.
Answer: My aunty who is ninety-one years old told me that the saying came from England where the young boys would carry a bucket of sand and their job was to scrub and leave sand on the steps of buildings so that they weren't slippery. The sand boys would whistle and were happy in their work.


Ubuntu 13.10 and Lenovo video card

Question: i have a old Lenovo Y510.
i was running Windows 7 and Ubuntu 12.04
it ran very well in either windows or Ubuntu 12.04 but i never could find the drivers for the video card more specifically the s-video TV out wont work ... i use this old faithful Laptop for a Media Center it plays movies and music quite well i still use it for work from time to time and it does well.
point being i like this laptop we have been though hell together. i had hoped Ubuntu 13.10 would have more updated drivers for that.. i have to run Windows to connect this to my old TV via the s-video output. i would rather use Ubuntu for all that. any clues? or am i stuck using Windows 7 or do i have to invest in a new TV with VGA inputs?
 was hoping to retire this computer to my entertainment center and let her live out her days that way as i have Much Newer more powerful computers i use for my work.
Please if anyone has any INFO help me keep my old friend in service.
FYI she is running 4 GIGs RAM and a core 2 Duo, 1 TB Hybrid Hard-drive. very fast for her age.
Answer: I have used this guide to solve it on my old desktop computer back in the day. You could try it out. The feature is switched OFF by default because it's not working very well.
At least give it a try.
https://wiki.ubuntu.com/X/Config/SVideo
Edit: Using desktop effects is not recomended though, and last time I used it I was using Gnome 2.x
Answer: Actually chances are better if you tried an older version of Ubuntu (or at least of the kernel). Newer versions seem to play worse with my oldish Lenovo ThinkPad T61 (see https://askubuntu.com/questions/400044/nvidia-x-server-flickers-hangs-and-segfaults-on-start-up).

Ubuntu 13.10 and Lenovo video card


How to evolve blue skin?

Question: So, I understand that human skin color is based on the distance from the equator, but would it be possible to evolve skin to be a non-natural color such as green, pink, blue, purple, ect? Perhaps if it would not be possible on Earth, would it be possible on another planet with a different climate? What gives skin pigment, anyway? Does blood alter the color of skin? Does our red blood make us look pink? I'm sorry, that's a bit off track. Help?
Comment: For evolution of blue skin: https://en.wikipedia.org/wiki/Blue_Fugates
Comment: Since some animals have  blue skin, it is obviously possible to evolve it.  See e.g. the western fence lizard, commonly known as the bluebelly lizard: https://en.wikipedia.org/wiki/Western_fence_lizard#Identification  Some mammals also have areas of blue skin: http://www.yale.edu/opa/arc-ybc/v32.n30/story15.html
Comment: Why? A big rapid change can be a feedback of sexual preference.  Blue skin, like breasts, would take off if it was found to be desirable in a mate, esp. during the period when humans were splitting off from chimps.
Comment: FYI: some people on earth already develop pink skin.
Comment: The question is not how, but *why*. As to the answer, I have no idea, but I'm sure it's possible.
Comment: Related:  http://worldbuilding.stackexchange.com/questions/720/what-environment-would-make-leaves-light-blue
Comment: Another important point to consider is that most mammals (primates being an exception) have rather poor color vision, which perhaps explains why most mammals are rather drably colored.  Mostly shades of brown & grey, with nothing even approaching the peacock or parrot.
Comment: See also [the Blue-Footed Booby](https://en.wikipedia.org/wiki/Blue-footed_booby#Foot_pigmentation), whose iconic foot color "comes from carotenoid pigments obtained from its diet of fresh fish."
Comment: Actually, it was agriculture that whitewashed our skins.  The Mongoloid body plan evolved from a single individual mutation 35,000 years ago.
Answer: Skin colour in humans is affected by three main sources: blood, melanin, and the skin cells themselves.
In the absence of the first two, skin is generally a yellow-white colour; this is the least likely to change (assuming something close to normal human biology), but also the least important. It's not a particularly intense colour, so it's easy for other things to overpower it.
Human blood is primarily coloured by the hemoglobin in our red blood cells. This is based on ferrous iron (Fe2+), giving the classic red colour. There are other options here; changing some of the iron in the hemoglobin to ferric iron (Fe3+) makes the blood (and therefore skin) appear blueish - unfortunately it does that by making it less effective at transporting oxygen, so while this does occasionally happen in individuals, it is highly unlikely to ever become widespread in the population.
Moving to more exotic options, some other species use hemocyanin instead of hemoglobin, which gives them blue blood. In pale-skinned humans, this would lead to a blueish skin colour instead of the normal pink. Changing the oxygen-transporting molecule used in the bloodstream is a major change to bodily function, though; it would be plausible as a result of genetic engineering, but not natural evolution.
Finally, most 'normal' variation in human skin colouring is due to variations in melanin concentration. This is a pigment which essentially exists solely to colour skin, for the purpose of protecting us against damage from UV light. This is the most likely way that other skin colours would evolve - humans already have multiple forms of melanin with different colours (red/blonde/black hair all get their colour from it in one way or another), and similar chemicals in other species have different colours again (particularly relevant to the question is squid ink, which is coloured by melanin and is blue-black). It would be perfectly plausible for some group of humans to develop a different skin colour due to a change in how their melanocytes function - possibly due to a change in diet and/or environmental pressure, or possibly due to a random mutation.
Comment: To elaborate: Oxygen transport molecules using other metals (e.g. copper and chrome) are **much** less efficient at transporting oxygen to the critter's tissues.  Something like $\frac{1}{4}$ as effective.
Comment: Most of this would be a case of an evolutionary "You can't get there from here" problem.  Human blood is pre-selected, and a change so drastic as to use a different oxygen transport molecule would be more lethal than revolutionary.
Comment: Would it be feasible to evolve less efficient oxygen transporting capabilities if a modern day human would live in an environment with a higher oxygen concentration? As far as i understood evolution, anything can develop as long as it does not hinder the creature. Add some sexual attractiveness for selection, and it might work out? Or is that jsut my poor knowledge of biology?
Comment: Very few things are 100% _impossible_, but it's still not likely. Higher oxygen concentrations _would_ potentially allow blood to get less efficient at transporting oxygen... but they'd also mean that it stays red for longer. Blue blood is basically a sign that your blood isn't efficient enough _for the environment you're in_. (And switching from iron to another metal without the species going extinct in the process would be ... difficult.) Sexual attractiveness is probably going to work against the change - it's usually a signal of fitness, and inefficient blood doesn't qualify.
Comment: Monty Wild and Toby Y - the op doesn't specify the skin color of humans, and talks about both Earth and other planets. The op presumably asks about the skin color of both animals and intelligent beings evolved both on Earth and on other planets.  You don't have to assume a possibly extraterrestrial  species has Earth like blood to switch from in the first place.
Answer: Skin color in humans is normally determined by the concentration of the pigment melanin in the skin.  The genes of albinos prevent the synthesis of melanin, which means that their skin itself contains no pigment.  Thus, they are very pale, except where their blood shows through the skin, in which case they may appear pink.
People may develop blue skin through a variety of medical disorders, such as cyanosis.  They may also become blue because they consume silver orally, by way of a quack medicine called "colloidal silver", whose effects are demonstrated in the picture linked below.  Apparently, this condition is called "argyria".
https://i.stack.imgur.com/dJqYG.jpg
Thus, perhaps some species could evolve the ability to consume silver to make their skin blue.  The most obvious advantage for such an adaptation would be for camouflage, assuming that some part the species' environment (the sky?) is a similar color.
Comment: Do you have a source for that image?
Comment: I did a Google image search for "colloidal silver".  It's included in a story on Reddit, at the URL "https://www.reddit.com/r/creepy/comments/2x88nu/guy_self_injected_himself_with_colloidal_silver/".  The URL of the image itself is "https://i.imgur.com/WFdXIFi.jpg".  I gather that it may originally be from the television show "Oprah".  Sorry if it falls afoul of some copyright rule--I'd be happy to delete it if so.
Comment: I went ahead and replaced the inline image with a link.
Answer: Most of the answers so far have concentrated on the biological processes that contribute to the our perception of skin colour.
An alternative approach might be to look at how the human eye might evolve to interpret optical light differently.
Our eyes and brains currently interpret a certain range of frequencies in the optical light spectrum as possessing colours.  If our eyes were to evolve so that a gradual shift in the range of frequencies we perceive were to take place, then what we perceive as natural skin colour today could in the future be interpreted as blue.
Answer: When we are exposed to too much silver dust, or injest too much colloidal silver, our skin actually does turn blue - it's called argyrosis. I'm not completely sure of the medical implications of the condition, but apparently it damages the rods in your eyes, and your kidneys.
If you had a population of people that lived off a food source rich in silver (for whatever reasons) they would definitely be blue. Add a little bit of genetic resistance to the more damaging aspects of silver, and voilà! Blue (or purple) people! It's just like how pink flamingoes are only that colour because of their diet!
Answer: I may be wrong but I think plants have evolved to be green because green is the opposite colour to the light they receive from the sun. This means they absorb the most light possible.
As you didn't specify if the skin had to belong to a human, one could suppose that if an animal on a planet orbiting a red dwarf needed some way of converting its stars light to energy in its skin, their skin would be blue.
Comment: Plants that are green are green because they reflect more green light. The chloroplasts absorb blue and red light more effectively. By doing so, they fail to use a large portion of the incoming sunlight. Sunlight is white because is contains the full spectrum of colors of light (plus UV and infrared)
Comment: I don't think red dwarf stars are literally red... and the opposite of blue is yellow!
Comment: @colmde the opposite of blue is actually orange, i.e the mixture of the other two primary colours, in this case red and yellow. And, red dwarfs (often) are red. That's what gave them their name. A quick google search will provide pictures.
Answer: Perhaps spending a lot of time at sea would cause it to do so, as it would blend in with the sea color and serve as camouflage.   Cetaceans evolved from land animals, and their skin is blue.
Comment: Welcome to WorldBuilding! If you have a moment please [take the tour](https://worldbuilding.stackexchange.com/tour) and [visit the help center](https://worldbuilding.stackexchange.com/help) to learn more about the site. Have fun!
Answer: Photosynthesis.
Some forms of chlorophyll are coloured blue.
So they evolved to get a daylight energy top up from the sun.
Answer: Blue skin would be skin that reflected a lot of blue light. So perhaps we'd have blue skin if our environment exposed us to enough blue-wavelength light for it to be damaging, and our skin developed ways of reflecting it.

How to evolve blue skin?


Plugin privelages for "editors"

Question: I have a few plugins installed in wp that appear in the submenu of the dashboard. I want users with the "editor" role to only have access to specified plugins.
Answer: You can do that easily using this plugin
But I think it might be better if you create a new role, then copy roles from "Editor" using the plugin above, and then allow the new role to access those plugins you wanted.

Plugin privelages for "editors"


How do I display a histogram in live view on a Nikon D7500?

Question: I just bought the Nikon D7500.   I can't find the histogram. How do I get the histogram on my screen? I would like to view it on the live view?
Answer: Page 187 of the Nikon D7500 User's Manual:

If the Overview (with luminance histogram) or RGB histogram screens are not showing when you cycle through the photo information options, you need to enable them using the Playback display options menu covered on page 219.
Answer: Have you tried pressing the info button couple of times to check the different display views, the histogram should be displayed through this button as it is done in other models of Nikon.
Answer: This post is old but I just figured this out myself.
To get the histogram on Live View (Michael C's response is for the Playback display):

Press the Live View button (Lv),
Press the Live View info button (the sort of stylized "i" right next to the Lv button),
Scroll to "Exposure preview" and set it to "ON".

Now, when you're in Live View, press the "info" button (the one on the left, with "info" written on it) repeatedly until the live histogram appears.
Hope this can help you or at least other 7500 users!


What is the difference between discrete data and continuous data?

Question: What is the difference between discrete data and continuous data?
Comment: Just think digital vs analog. Same thing - different names.
Comment: Did you try Google first? For me, it gives [this](https://web.archive.org/web/20130510121554/http://infinity.cos.edu/faculty/woodbury/stats/tutorial/Data_Disc_Cont.htm).
Comment: This was the top result in Google, @robingirard.
Comment: I truly don't know what the difference between "discrete" and "continuous" data. For some reasons, intro stat classes seem to really enjoy making students memorize rules to distinguish these two things. As far as I've been able to understand, the differences are not in the data--but in how we choose to model the data.
Comment: Here is a nice video which answers your question.
https://www.youtube.com/watch?v=MIX3ZpzEOdM
Comment: All actual and physically existing data, be it stored in writing, on tape, disk or in the brain is discrete both in space and in time at least as long as we hold QFT more fundamental than Newton, which means that continuous data doesn't really exists, but it can be derived from discrete data.
Comment: @user67783 , the video link is broken. do you remember its title or channel?
Answer: Discrete data can only take particular values. There may potentially be an infinite number of those values, but each is distinct and there's no grey area in between. Discrete data can be numeric -- like numbers of apples -- but it can also be categorical -- like red or blue, or male or female, or good or bad.
Continuous data are not restricted to defined separate values, but can occupy any value over a continuous range. Between any two continuous data values, there may be an infinite number of others. Continuous data are always essentially numeric.
It sometimes makes sense to treat discrete data as continuous and the other way around:

For example, something like height is continuous, but often we
don't really care too much about tiny differences and instead group
heights into a number of discrete bins -- i.e. only measuring
centimetres --.
Conversely, if we're counting large amounts of some discrete entity
-- i.e. grains of rice, or termites, or pennies in the economy -- we may choose not to think of 2,000,006 and 2,000,008 as crucially
different values but instead as nearby points on an approximate
continuum.

It can also sometimes be useful to treat numeric data as categorical, eg: underweight, normal, obese. This is usually just another kind of binning.
It seldom makes sense to consider categorical data as continuous.
Comment: > "*There may potentially be an infinite number of those values, but each is distinct and there's no grey area in between*" -- it's actually perfectly possible to have a discrete distribution with distinct values, and *yet at the same time*, for any two distinct values you pick, always have more values between them ('grey area' in a sense). They don't come up all that often in practice, but it's perfectly possible for them to come up for real; indeed I can think of two distinct (if related) examples that can easily arise.
Comment: @walktalky as @jeromy alludes to, in psychology at least, categorial variables such as reponses to questions are often presumed as being a representation of a underlying trait, so in that sense categorial data is sometimes taken as being continuous.
Comment: @richiemorrisroe One could nitpick about the difference between the data and the putative trait, but of course you are right. Some very interesting further points were made in response to [this follow-up question](http://stats.stackexchange.com/questions/539/does-it-ever-make-sense-to-treat-categorical-data-as-continuous).
Comment: thanks for the link, those answers are indeed very interesting.
Comment: so to clarify, even if you had 10 billion rows of ohlc data for a stock asset, it would be still be considered discrete? but then cant the price of an asset be anything between 1 to infinity, how to think in this type of situation?
Answer: Data is always discrete. Given a sample of n values on a variable, the maximum number of distinct values the variable can take is equal to  n. See this quote

All actual sample spaces are discrete, and all observable random
  variables have discrete distributions. The continuous distribution is
  a mathematical construction, suitable for mathematical treatment,
  but not practically observable. E.J.G. Pitman (1979, p. 1).

Data on a variable are typically assumed to be drawn from a random variable.
The random variable is continuous over a range if there is an infinite number of possible values that the variable can take between any two different points in the range.
For example, height, weight, and time are typically assumed to be continuous.
Of course, any measurement of these variables will be finitely accurate and in some
 sense discrete.
It is useful to distinguish between ordered (i.e., ordinal), unordered (i.e., nominal),
and binary discrete variables.
Some introductory textbooks confuse a continuous variable with a numeric variable.
For example, a score on a computer game is discrete even though it is numeric.
Some introductory textbooks confuse a ratio variable with continuous variables. A count variable is a ratio variable, but it is not continuous.
In actual practice, a variable is often treated as continuous when it can take on a sufficiently large number of different values.
References

Pitman, E. J. G. 1979. Some basic theory for statistical inference. London: Chapman and Hall. Note:  I found the quote in the introduction of Chapter 2 of Murray Aitkin's book Statistical Inference: An Integrated Bayesian/Likelihood Approach
Comment: A probability, too, is a "mathematical construction" and not "directly observable." Does this mean that probability does not exist?  Overall, this interesting reply seems based on an untenable premise that data should be characterized by the values they *do* have rather than by the values a mathematical model allows them to have. The latter is the crucial characteristic, not the former.  This all suggests that what matters in the continuous/discrete distinction is *how we think about the data* (that is, how we model them).
Comment: There's a clever little fable illustrating @whuber's point: Lord (1953), "On the statistical treatment of football numbers", *American Psychologist*, **8**, pp750-51.
Comment: Thank you,@Scortchi. Web versions are available through a [Google scholar search](https://www.google.com/search?q=On+the+statistical+treatment+of+football+numbers). Lord is addressing a misconception, hotly debated 60 years ago, about the extent to which "measurement theory" should influence (or even limit the scope of) statistical analysis. My point was a different one about the distinction between model constructs and observations.
Answer: Temperatures are continuous. It can be 23 degrees, 23.1 degrees, 23.100004 degrees.
Sex is discrete. You can only be male or female (in classical thinking anyways). Something you could represent with a whole number like 1, 2, etc
The difference is important as many statistical and data mining algorithms can handle one type but not the other. For example in regular regression, the Y must be continuous. In logistic regression the Y is discrete.
Comment: When you record temperature to the nearest degree, it can be considered discrete--and perhaps *has* to be so considered for certain forms of analysis. Also, in "regular" (OLS?) regression, $Y$ need not be continuous: many--and practically all its useful properties--apply to many types of discrete data, even binary responses.  What these points and counterpoints begin to suggest is that *data* are not necessarily discrete or continuous, but rather *statistical procedures* are discrete or continuous.
Answer: Discrete Data can only take certain values.
Example: the number of students in a class (you can't have half a student).
Continuous Data is data that can take any value (within a range)
Examples:

A person's height: could be any value (within the range of human heights), not just certain fixed heights,
Time in a race: you could even measure it to fractions of a second,
A dog's weight,
The length of a leaf,
The weight of a person,
Comment: You could also tell us where you copy pasted the answer from: https://www.mathsisfun.com/data/data-discrete-continuous.html
Comment: Nicely described.
Answer: In the case of database, we would always store the data in discrete even the nature of the data is continuous. Why should I emphasize the nature of data? We should take the distribution of data that could help us to analyze the data. IF the nature of data is continuous, I suggest you to use them by continuous analysis.
Take an example of continuous and discrete: MP3. Even the type of "sound" is analogy, if stored by digital format. We should analyze it always in a analogy way.
Comment: This is very questionable. Different data types exist in a DBMS for their reasons. For a particular DBMS it can be beneficial to store floats as integers to not lose on precision, but it's not generally so: some have exact number format that is arbitrarily precise and you don't have to use conversion (like, /1000) in each query.
Answer: On the one hand, from a practical point of view I do agree with Jeromy Anglim's answer. In the end we are most of the time dealing with discrete variables – although from a theoretical point of view they are continuous – and that has a real impact for instance for classification. Recall Strobl's paper indicating that Random Forests is biased towards variables with multiple cutting points (higher accuracy but potentially similar nature). From my personal experience probabilistic neural networks may present also a bias when variables present different accuracy unless they are of the same type (i.e., continuous). On the other hand, from a theoretical point of view the classical classification (e.g., continuous, discrete, nominal etc.) is, IMHO, right. In accordance I think that the source name of Quinlan's paper describing the M5 algorithm, which is a 'regressor', is a great choice. So the definition and the implications of continuous vs. discrete are relevant depending on the 'environment'.
Refs:
Quinlan J.R. (1992). Learning with continuous classes. In: The 5th Australian Joint Conference on AI. Sydney (Australia), 343–348.
Strobl C., Boulesteix A.-L., Zeileis A., & Hothorn T. (2007). Bias in random forest variable importance measures: illustrations, sources and a solution. BMC Bioinformatics, 8, 25. doi: 10.1186/1471-2105-8-25
Answer: Discrete data take particular values, while continuous data are not restricted to separate values.
Discrete data are distinct and there is no grey area in between, while continuous data occupy any value over a continuous data value.
Answer: Discrete data
They can take particular values .they are numeric.
Comment: Welcome to CV! Thanks for answering, but please take the time to look at previous answers & considering if you're adding anything useful.
Answer: Discrete data perticularly talks about the finite values and continuous data talks about ifinite values.....
Comment: Care to elaborate?


Pot or cooler based mash tun?

Question: What's the pros and cons about mash in coolers or pots? How to choose?
Comment: Chino tells the pros and cons listed as I asked, so I'm accepting his very good answer. But Denny's experience sharing was also very important to me to buy a cooler and give it a try. Thanks you both.
Answer: Cooler as Mash Tun
Pros: Relatively cheap and easy to modify with a bulkhead fitting and ball valve. Holds a steady temperature very well. Lighter weight, and therefore easier to clean.
Cons: Cannot be direct-fired, so any step mashing has to be done with additional infusions or by decoction - step infusions will increase your mash's water-to-grist ratio. Will not perform double duty as a kettle (but can be used for cold beverages).
Kettle as Mash Tun
Pros: Can be direct-fired for stepped mash schedules. Can be used in advanced homebrewing setups such as RIMS or HERMS systems. Can double as a kettle.
Cons: Higher cost. The kettle is not insulated, so it is harder to maintain a steady temperature. More difficult to modify to add a ball valve. Heavier, and therefore harder to clean, relatively speaking.

How to choose?

It comes down to your budget and personal preference.
Answer: I have used a cooler for 466 batches over the last 17 years.  I have tried using a pot to mash in and found I preferred the cooler because it held the temp so well.  I seldom find a need to do step mashes and in fact question their value.  But when I want to do one, it's a simple matter to simply infuse boiling water until I get to the temp step I'm going for.  You can see my equipment and methods at www.dennybrew.com

Pot or cooler based mash tun?


Send 2 ETH from Nano to Bittrex, but run out of gas

Question: I sent 2 ETH from my Nano wallet to Bittrex exchange. However, the transaction gets stucked due to lack of gas. I expect to see my 2 ETH goes back to my wallet minus the gas fee. However, I haven't seen the 2 ETH balance in my wallet. How can I recover my 2 ETH. Greatly appreciated for any help.
Etherscan Tx details.
Comment: did you get it sorted?
Answer: As you have correctly mentioned this an out of gas error. What happens in this situation is, it returns with failure and rolls back to the state it was before sending the transaction except that you have to pay the gas cost to the miner for executing it.
When I inspected your account the balance is 213.119202218 Ether

To check the correctness of the balance it's needed to add all the INs and deduct succesfully completed OUTs (except the failed one) and deduct all the Tx costs of OUTs as below (assuming no internal transactions happened),
------------------------------------------------------------------------------------------
| IN Txs                  | OUT Txs (Except fails) | Fees for OUT Txs      | Balance     |
------------------------------------------------------------------------------------------
| 15.42115568 + 100 + 100 | - 2.3                  |-(0.001512462+0.000441)|213.119202218|
------------------------------------------------------------------------------------------

i.e. 15.42115568 + 100 + 100 - 2.3 - 0.001512462 - 0.000441 = 213.119202218
which is exactly your account balance. So your ETH balance in wallet is correct and you have the 2ETH remaining.

I expect to see my 2 ETH goes back to my wallet minus the gas fee

If what you meant by this is to see a reverse transaction kind of thing to happen and a see a IN transaction again, that's not the case. There's no need of such thing because actually an amount of 2 ETH was not sent and it's in your wallet already.


Why does NAT translate a source port?

Question: I'm beginning to learn about NAT and I was wondering: Why does NAT translate a source port?
Doesn't a port represent an application that's requesting a service? So why must it be translated? Also what would happen if NAT hypothetically didn't translate the source port and two separate machines on the same network sent out a message but had the same source port?
Would anything bad happen?
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can post and accept your own answer.
Answer: First, I'm assuming you're focused on TCP.  UDP has some differences, and I'm not as up-to-speed on that part.

I'm beginning to learn about nat and I was wondering why does NAT
  translate a source port?

You're right to ask this question, and to be frank, it doesn't always need to.  However, sometimes that translation IS required.  Given that it is sometimes required, and given that the NAT system therefore needs to track source port for some traffic, and because there are efficiencies in doing something the same way every time, most NAT implementations don't make an effort to re-use the original source-port on the NATted connection.
Many (most?) protocols don't depend on the source port for TCP connections, so that's the simplest approach, and it rarely hurts.

Doesn't a port represent an application that's requesting a service?

It does, but generally the source port is not specified by the application.  Instead it is assigned (somewhat) randomly.  This is actually good, because before that was true it was way too easy to break existing connections by predicting the source port number (the "unreach" attack using ICMP DESTINATION UNREACHABLE packets).

So why must it be translated? Also what would happen if NAT
  hypothetically didn't translate the source port and two separate
  machines on the same network sent out a message but had the same
  source port?

The answer to your first question is in the answer to the second, so I'll take a stab at the second, and you share if it doesn't answer the first.
First, assume your NAT host only has one IP address (N) to translate to.  Second, assume you actually have an extra coincidence where internal hosts A and B both try to communicate with external host X on port 80 with source port 17835.

A's packets (when generated, before NAT) look like: src: A:17835, dst: X:80.
B's packets (when generated, before NAT) look like: src: B:17835, dst: X:80.

After NAT, assuming no translation of source port:

A's packets (after NAT) look like: src: N:17835, dst: X:80.
B's packets (after NAT) look like: src: N:17835, dst: X:80.

Oops.  They look the same.  They particularly look the same to the remote host X.  It is most likely to drop the packets associated with the second connection attempt because the sequence numbers are going to be wrong.
You also have a problem on the NAT host, as it can't tell the difference between the two either.  It can only maintain one "connection" record with remote host X on port 80 per source port. It has to keep this record so it knows which internal host to translate back to when it receives an inbound packet.  If the record corresponds to the first host to connect, then you would have the experience where A (the first host) has no problems, and B cannot connect.
If, more entertainingly, B's record  in the NAT overwrites A's after the connection is built for A, then the NAT system will never forward X's responses to A (it only has B's record), and X will never respond to B (wrong sequence numbers / connection state) and nobody wins (communicates).
Let's be honest.  NAT is a hack.  It is an ugly hack, and we are either lucky it works (because we haven't rolled out IPv6 universally yet) or victims of its success (because it works well enough, people don't insist on IPv6 support).
Comment: "_Many (most?) protocols don't depend on the source port for TCP connections..._" I don't quite understand that statement. TCP itself requires both source and destination IP and TCP addresses for a connection, and applications and application-layer protocols that use TCP depend on the TCP connections, which, in turn, depend on the source port.
Comment: Sorry, I meant protocols that operate over TCP.  Examples would be SMTP, HTTP, RDP.  These protocols specify a standard destination TCP port, but they function regardless of the TCP source port used for the connection.  Arguably the only reason they even have a standardized destination TCP port is so that you and I don't have to specify one for every connection.
Comment: You are right that the source and destination port are both required for a TCP connection to be meaningful at the TCP layer, but many protocols above the TCP layer don't care what either port number is (TCP is just used for transport of bytes)
Comment: Yes, and protocols above the transport layer (OSI layer-4) are actually off-topic here.
Answer: A NAT (Network Address Translation) does not actually translate the port. You are most likely referring to a PAT (Port Address Translation).
Even more specifically, you are likely referring to a Dynamic PAT -- which is a type of translation which allows any number of internal hosts to share one or more public IP addresses:

In the illustration above, notice all three hosts initiate connections to a destination on the Internet. All three hosts (A, B, and C) select their own source ports randomly (2222, 3333, and 3333, respectively). When their packets traverse the translation device, the router selects new source ports (7777, 8888, 9999, respectively).
This is crucial, because the re-writing of the source port is what allows the return traffic to be forwarded back to the correct initiating host:

The Router made note of the mapping between initial source port and post-translation source port, and uses that to correctly return the response traffic to the correct host.
Had the Router NOT re-written the source ports, both Host B and Host C's return packets would have been to the same destination port:

When those packets would make their way back to the Router, there would be no way for the Router to know which packet should have gone to Host B and which packet should have gone to Host C.
Hence, it is crucial for the Dynamic PAT device to also re-write the source port to ensure the return traffic can be successfully returned to the original host.
To learn more about Dynamic PAT's operation, check out the Dynamic PAT Article in the Network Address Translation article Series
Comment: -1 for pushing what appears to be ciscoisms as if they were authoritive definitions.
Comment: @PeterGreen Hi Peter. I would encourage you to list where my answer(s) doesn't line up with the industry or reality. If it is merely in semantics then I don't know what to tell you, [every vendor calls them something different](http://www.practicalnetworking.net/series/nat/nat-terminology-disambiguation/) -- but that doesn't change the fact that there are only [four types of translations](http://www.practicalnetworking.net/series/nat/nat-terminology/#types-of-nat) that exist: Static NAT, Static PAT, Dynamic PAT, Dynamic NAT.
Answer: Probably the easiest answer:
Imagine two LAN clients accessing the same external web server and coincidentally both using the same source port.
If the NAT router now uses the same external source port for both sessions with the external destination IP and port also being the same, how is it supposed to find out which returning data is to go where?
Moreover, the external web server might get deeply confused with two intermixed sessions from a single IP/port combination.
Answer: I assume you mean the NAPT version of NAT. NAPT translates both the IPv4 address and the transport address (TCP port, UDP port, or ICMP identifier). The reason is that there may be multiple hosts using the NAT which could be using the same protocol with the same transport address (port or identifier).
Comment: Okay thanks. And if NAT didn't translate the port and multiple hosts tried to use it then the message would be lost?
Comment: If you happen to have two hosts that use the same transport address, the router would not know to which host the return traffic should be sent. Routing must be deterministic. You should look at the NAT RFCs. NAPT really only works (sometimes) for TCP, UDP, and ICMP. NAPT breaks other transport protocols, as well as many application layer-protocols (even when using TCP or UDP).
Answer: There are different types of NAT. It sounds like you're talking about the standard PAT (port address translation, also known as Hide NAT) used by private-addressed clients behind an internet-facing firewall.
There will always be (for TCP anyway) a source port and a destination port. The destination port can identify the service ( such as 21 for FTP, 443 for HTTPS, etc.) The source port does not. It is just a random numbered high port.
Source port and IP address are used by remote systems to uniquely identify the connection. With two computers behind a PAT appliance, there's a small chance that both systems might choose the same source port for two different connections to the same remote IP. For this reason, the device must be able to change the source port while keeping track of its association with the original.

Why does NAT translate a source port?


One Click Table of Contents in Google Docs

Question: I would like to create a table of contents in Google docs that would take only one click for the user to get to where the hyperlink is pointing rather than the two clicks that it seems to require (click on the TOC words and then click on the hyperlink).  Is this possible in Google docs?
Answer: Requiring two clicks to follow a link in a Google Doc is a property of the Editing and Suggesting modes of the Docs editor. Basically, it does this so that you can insert the caret (typing "cursor") into the middle of hyperlinked text using your mouse without automatically taking you to the link's destination.
Your users will be able to follow TOC links in one click so long as they are viewing the document in Viewing mode (in the editor) or in published HTML form. (For information on how to publish a document, check out this Docs editors Help article.)