Can other WIFI users see my network traffic?

Question: Lets say I go to some hotel, the hotel has a WIFI network that requires as password and/or username to access. Can other hotelguests then see my wifi traffic if they are not logged in to the wifi, and can they see it when they are connected to the WIFI as a guest like me..but not as the network admininistrator (which CAN obviously see it)?
Comment: Just a slightly offtopic side note: You usually can't be sure you are connected to the right network. Once you connect to one insecure network, you might have opted for autoconnect. What's worse, your device will cast names of such networks in order to find them. So, in many cases, some tool like Pineapple can be used to connect you to attacker's Wi-Fi without realizing it, no matter how much secure is the network you think you are connected to.
Comment: Fun listening: [Tim Perry - HTTPS Is Not Enough](https://www.youtube.com/watch?v=zPhi_fzVbh8).
Comment: And even if you don't enable automatic reconnect, attacker can poison your webbrowser cache (e.g., load some JS over HTTP with distant expiration date), even on pages you don't visit.
Answer: Yes, if they know what they're doing. See https://www.howtogeek.com/204335/warning-encrypted-wpa2-wi-fi-networks-are-still-vulnerable-to-snooping/ for an assessment of the vulnerabilities for WPA2-PSK (the most common form of encrypted WiFi). If the hotel wifi network uses WEP, that's even easier to crack, and if it doesn't use encryption at all (open Wifi), it's trivial.
The only way to protect yourself is to use a VPN service, so that all of your network traffic is encrypted at your end (regardless of whether you are browsing a news web site or doing Internet banking). This will protect you from someone snooping at the router as well.
Note that it doesn't stop anyone from kicking you off the wifi (via DEAUTH), but at least they won't get any of your data even if they capture the encryption key used between your device and their wifi hotspot.
Comment: "The only way to protect yourself is to use a VPN service" is misleading. Assuming all the protocols you use are encrypted and properly authenticated (cert checking, etc.), only a minimal amount of info (DNS queries, SNI, etc.) leaks regardless of whether you're using WPA, open wifi, or wired ethernet with potentially hostile machines connected. The moral of the story is **all networks are hostile; use safe protocols**.
Comment: Using encrypted connections is a good idea, if the service supports it. If the web site doesn't use SSL, or the protocol (e.g. DNS) isn't encrypted, your traffic can be sniffed. For people who are used to just typing in a website name, and having the web server automatically redirect them to the encrypted version of the web site, [an MITM attack becomes possible](https://scotthelme.co.uk/wifi-pineapple-karma-sslstrip/) (HSTS makes it more difficult, but [not impossible](https://null-byte.wonderhowto.com/how-to/defeating-hsts-and-bypassing-https-with-dns-server-changes-and-mitmf-0162322/)).
Comment: VPN does not protect you unless your system cuts all the network when the VPN is unavailable. If it doesn't, attacker can trivially block the port and force you to communicate without VPN.
Comment: I wouldn't treat it as safe; there are ways to snoop mobile traffic; e.g. [Stingray](https://en.wikipedia.org/wiki/Stingray_phone_tracker). However, if this happens, it is more likely to be by law enforcement/signals intelligence organisations, and then probably as part of some operation targeting someone else.
Comment: Then best to ensure that your devices don't connect without the VPN! My devices don't.
Comment: By this logic using the mobile network from my service provider (4G) wouldnt be safe either?
Answer: Well, sort of.
Someone would wants to read your data has two options(that I can think of) to your your data. He could either try to sniff the data that goes over the air. This can be achieved by simply using a wifi interface and configuring it to run under monitor mode. You wouldn't notice a thing either, but the attacker would likely miss some packages.
The other option would be to conduct a man in the middle attack by using ARP spoofing. Basically tricking your computer to send data to his computer instead of the router, and then forwarding it to the router. He then does the same with data going in the other direction. (this by the way, also allows the attack to alter data going in either direction, allowing him to inject anything he likes)
However,
Note that both these methods don't work against you if you use encryption. If you communicate with a website over https then your data should, usually be safe.
These attacks both only work if the attacker can access the network.
Comment: so you can't 'sniff the data that goes over the air.' on a wifi network that you're not connected to?
Comment: Well, you can. However if you're not connected to the network and the network uses any kind of PreShared Key (a password needed to connect to the network), then that traffic will have a layer of encryption on it, and would be useless to the sniffer.
Answer: No. (assuming they're not using WEP) Under 802.11i security, even with everyone using the same PSK, the actual on-air encryption key is different for each station-AP pair.  The "four-way handshake" uses a nonce from both the AP and the station (your laptop) to make a unique encryption key.  There is a potential attack if this exchange (both messages) are observed.
Note that this only protects the data in the air.  If someone can get to the wired network, then other attacks are possible.
Best to use a VPN and/or HTTPS connections to protect your data end-to-end.
Comment: Public wifis often use no security layer at all, and the username and password are entered on a web page to activate access for the requesting MAC address (captive portal).
Comment: @DaveM, the "potential attack" you mention is trivial for an attacker to exploit. They simply send a DEAUTH packet to your MAC, and your computer will be forced to reconnect -- and it will renegotiate the key again; this time, while the attacker is eavesdropping.
Answer: The bottom line is you should always assume any public wifi network is high risk and your data is exposed to sniffing. There are people who will tell you as long as they are not using WEP your safe or that your OK if they use WPA2 etc, but this isn't enough.
One of the big problems with public wifi at hotels, coffee shops etc is that often, it isn't administered by someone who has strong technical and security knowledge. Systems can be mis-configured, may not have latest security patches, may be based on domestic rather than enterprise grade equipment, is unlikely to be monitored for threats etc. Bottom line, the wifi is a low profit 'add-on' service often run by people whose main objective is to have a sign saying 'free wifi' to draw business and who have little concern regarding the security of your data.
Then you have the other part of the problem - it is way too easy for bad guys to hack at the system. They can be anonymous, they can setup fake access points which easily fool users and they can take advantage of all the things mentioned in the first paragraph. I've actually sat in a motel, setup my laptop as an access point and just watched the number of poeple who try to connect - I reckon if I set up a fake capture portal that looked to be branded like the hotel I would probably get credit card details as well!
Note also that many of the capture portals used by hotels and the like are often very poorly designed. There are numerous posts on various security lists regarding vulnerabilities found in many commercial capture portal solutions.
So, assume your operating in a hostile environment. Only use services where you can be confident that your traffic is end-to-end encrypted or only use the service for low sensitivity data i.e. accessing public web pages etc. Check certificates before entering credentials etc.
If you travel a lot or are forced to use public or untrusted networks, consider setting up your own tunnel from your device to a server you trust and then use that server as a hopping off point to access other services. Tolls like ssh can do this - can be a pain to setup initially, but once you have it working, it works well.


Stop mysqld service when monit service stops

Question: I'm monitoring mysqld with monit but I would like that if I stop monit then the mysqld service also stops.
Answer: The easy way to do this is to modify the Monit init.d script to also stop mysqld.  The main problem with this is that future updates to the Monit package may overwrite your changes.
Alternatively, you could write your own init.d script that controls mysqld and monit, and use that instead of the provided init.d scripts.
Answer: You fundamentally can't, and shouldn't want to, because that's not the way monit is designed to work.  Monit is, as the name suggests, a monitoring system, that has some automatic problem-handling logic built-in.  I also can't imagine why you'd want to do something like this, so I'm at a loss to give you alternative solutions to your actual problem.
Answer: This might  be a a bit simplistic, but have you thought about this:
create a script that just stops/starts both services at the same time, and use that to call them instead of the regular init.d scripts?
You could put them into your bin folder if you want to be able to run them as a command.
Answer: Is it because you want to stop MySQL and do maintenance or whatever?
If so, just:
'monit unmonitor name_of_service_check_here'

... and monit will leave it be. If you have configured a monit state file (defaults to /var/.monit_state or something), then monit remembers unmonitors and such even after a reboot.
You might also want to try the monit status to see current status for all or one given check:
monit status

Like Womble said, start by explaining what problem you have instead of focusing on one (probably bad) work-around.


Particle Accelerator Energy and Luminosity

Question: Both beam energy and luminosity are important for succesful particle accelerator experiments. The LHC's nominal design is for $7 \ \mathrm{TeV}$ beams and $ \ \mathrm{1\ E34\  cm^{-2} \ sec{^-1}}$ luminosity, while the SSC's nominal design was for $20 \ \mathrm{TeV}$ beams and $1 \ \mathrm{E33 \ cm^{-2} sec^{-1}}$ luminosity. The LHC has $10x$ greater luminosity while the SSC would have had almost $3x$ greater energy. If the SSC was alive and both machines were operating at nominal levels, which would have the greater advantage for discovery of: i. the Higgs boson, ii. supersymmetry, iii. extra dimensions? I'm asking on the assumption that all three of these exist.
Comment: Aside from the Higgs (which we think we know where to expect (low, so luminosity wins)) this is pretty speculative. To answer one must make assumptions about parameters of the overarching theory.
Answer: Dear Michael, with the energies and luminosities you described (which are not necessarily those that may be quickly achieved by either machine, and the LHC is still not there), the SSC would be a more potent machine to discover all the things you mentioned, especially the physics associated with the very heavy scales - a few TeV (which is surely extra dimensions, if they exist, and maybe even SUSY) - that the LHC may be unable to reach.
The new particles near the upper bound of a collider's energy reach become extremely rare - so the LHC is producing e.g. a top quark many times a second while it used to be produced once a month at a lower energy but comparable luminosity by the Tevatron.
But even if the luminosity of a higher-energy machine is smaller, it may still produce many more particles even if they're lighter because a more energetic collision contains more particles in the final state. So for example, despite the fact that the LHC has only collided 0.3/fb in each detector, it has beaten the Tevatron with its 10/fb in pretty much everything - and in some "disciplines", the LHC advantage has become overwhelming. Of course, examples of the latter include supersymmetry - the exclusion limits by the LHC are far more far-reaching than those by the Tevatron and the Tevatron couldn't even match the current LHC results even if it were running for another decade.
There remain some special features, such as the top-antitop asymmetry, that are harder to be seen on the LHC than on the Tevatron because the latter is a proton-antiproton collider.
Despite the advantage of the SSC, it would be a kind of a brute-force, expensive machine. The LHC is doing many things in a smarter, cheaper, and technologically more advanced way. The names may be confusing. The SSC was "super", like in "superconducting". Of course, the magnets in the LHC are also superconducting and technologically more advanced, in fact, than the SSC plans.
Comment: Luboš: Based on your answer, beam energy wins over luminosity per the stated question. Thank you for the clarity of your response.
Answer: Beacuse of its higher energy the SSC would have been able to search for SUSY and other BSM exotics with higher masses so it would have been superior in that respect, but it is not so clear that it would have been superior for finding the Higgs.
There are other factors apart from energy and luminosity that were key to the LHC discovering the Higgs before the Tevatron. The detector energy resolution was arguably the most important factor. The Tevatron had energy resolutions around 5GeV whereas the LHC detectors had 1 GeV resolution for diphotons and 4leptons. This means that the LHC could measure the energy of the particles much more accurately.
When searching for the Higgs there is a lot of background in these channels and the higher energy only makes the background stronger. It is the higher energy resolution that makes it easier to extract the signal from the noise. Note that in other channels such as the dominant bb decay the LHC has not yet matched the tevatron despite the higher energy and total luminosity. That is because the LHC does not have much better resolution than the Tevatron for jets and the higher energy only produces more background.
It is not clear what all the specs of the SSC detectors would have been but it is likely that they would have been initially similar to the Tevatron's detectors of that time. In that case with the lower luminosity and higher energy it would have been difficult for the SSC to do better for finding the Higgs than the Tevatron did. It is possible that the detectors would have been upgraded later to be more like the ones at the LHC but that might not have happened any sooner.
There are other factors that could have been problematical for the SSC. One is that they were considering a proton-antiproton collider like the Tevatron. This means that they would have had to build up a store of antiprotons before each fill and if the beam is dumped it could take a day to generate a new store. This was a limiting factor for the Tevatron. From experience with the LHC we know that holding stable beams at higher energies is not easy. The design of the LHC included advanced magnets that could help with beam stabilization and the SSC would have needed those too. But the good thing about the LHC was that it was a proton-proton collider so when the beam was lost they could produce a new one relatively quickly.
There are other factors that might have been a problem for the SSC due to less advanced technology of the time and the bigger jump in energy being attempted. For example they would have had less computing power and data storage at the time making it difficult to gather enough events. They might also have suffered badly from problems such as e-clouding and UFOs that have been discovered at the LHC and get worse with increasing energy.
In conclusion it is certain that the SSC would have been better for BSM physics assuming they reached its design spec but whether it could beat the LHC to the Higgs would depend on some design and technological considerations that are uncertain given that it did not reach completion. It seems likely that this would have been problematical given that the Higgs turned out to be in the most difficult mass range to search where seeing diphoton and 4lepton events clearly was crucial.


What additional ethics you find in Buddhism which are not found in other religions?

Question: What additional ethics you find in Buddhism which are not found in other religions?
Other religions mean Abrahamic religions, Hinduism, Taoism or any other religion you know.
I also like to know whether other religions have any ethics you do not find in Buddhism.
To start with concentrate on five, eight precepts compare them to other religions.
Answer: Divisive Speech.
This is definitely something unique to Buddhism (I think). Other religions talk about lying, but I don't remember any mentions of divisive speech.

Abandoning divisive speech he abstains from divisive speech. What he has heard here he does not tell there to break those people apart from these people here. What he has heard there he does not tell here to break these people apart from those people there. Thus reconciling those who have broken apart or cementing those who are united, he loves concord, delights in concord, enjoys concord, speaks things that create concord.

This comes from Buddha's special insight into the nature of dukkha. Dukkha comes from a conflict of mind, an unresolvable uninergated contradiction. Craving is one example of such contradiction, aversion is another, and conflict between people because of their incompatible views (about the world or about each other) is a third!
So when you engage in divisive speech, you create and spread conflict between the sides, which will sooner or later bear the fruit of dukkha.
While the non-violence is taught by many religions, it is only (to my limited knowledge) in Buddhism is where the source of dukkha is understood so deeply that the role of divisive speech in creating dukkha is clearly recognized.
Harsh speech

They give up harsh speech. They speak in a way that's mellow, pleasing to the ear, lovely, going to the heart, polite, likable and agreeable to the people.
Answer: Very high level comparison, not intended to be perfect but at least highlight known ethical differences:
Before Life:
Buddhism - Ignorance
Taoism - Just reincarnation, no specific explanation on ignorance
Abrahamic - Original Sin
During life:
Buddhism - You are the owner of your Karma, good/bad things happen because of your actions.
Taoism - Follow the "Path", be conscious of good and bad, cause and effect. Also believe in karma, but not as much explanation as Buddhism. Follows the Master's teachings.
Abrahamic - Good/bad things happen due to God's plan
After Life:
Buddhism - Eliminate Ignorance, Escape reincarnation, through Eight Folds Paths
Taoism - Reincarnation. Believe in Ghosts and Deities. Worships Deities and Ancestors.
Abrahamic - Enjoy life in heaven with God, 'Believing in God' is the only path to rise to Heaven
Salvation:
Buddhism - no one can save you, except Yourself. Practice the 8-folds path. Meditation is Key.
Taoism - Specific ceremonies to help the ghosts reincarnate. Possible to ascend as deities. Lot's of techniques and chanting to make life better/wealthier. Communicate with ghostly beings, fang shui designs, palm/face/birthday readings. Meditation is optional.
Abrahamic - no one can save you, except God. Meditation not preferred, some suggests may attract "demons".
Path to Wisdom:
Buddhism - Understand the true nature of suffering, eliminate suffering. Everything that is conditioned are impermanent, suffering, and no fixed self/identity.
Taoism - Be a good person. Be mindful of Karma. Follows the right Path according to master's teachings.
Abrahamic - Believe in God is wisdom. Happiness can be eternal as long as in Heaven. God is permanent. Soul is true self and permanent.
Comment: "Follow the law, not the person" in the Nirvana Sutra accords with the points under "Salvation" and "Path to Wisdom".
Answer: Other religions, as far as seen, may have certain elements of generosity, yet mostly upwardly, like in arabic.
Most religion praise the worthy and honor of parents.
Many religions have similar precepts like the basic five, yet mostly limited toward human beings to keep, some only toward "own kind". No other religion has a simple and clear cut set of the basic precepts.
Most, especially Arabic religions, praise abstain from sensuality, sex, intoxication, entertainment... most more than the basic four.
Certain Dhammic religions do not give much into abstain from sensuality.
Like in Dhamma, most religions have the unspoken precept of refuge as obligation, even stronger.
Less religions, here mostly the Dhammic, have focus on mental cultivation as guided teaching.
Liberation from the bounds of becoming is only found in the Buddhas teachings.
It's all naturally: no giving up outwardly, no complete virtue, no real virtue, no concentration, no concentration, no wisdom, no liberation.
As far as such as re-ligion can still be found, it's probably only the Buddhas which has been not become solvely secular missing contemplatives and homeless life totally.
Generally my person does not encourage to waste time, since even the best rest disappears very fast and anicent paths will be soon no more traceable since no one has gone them any more.
There is a nice and friendly "all religions community", my person got known this days. Surely a good place if interested to explore, Nyom Sarath.
(not given for trade and exchange but for release)
Answer: The Vinaya, including the four parajikas (defeats).
Answer: well the short answer is that right view is not found in wrong doctrines and since it is the view and samadhi and dana which determine the realms of rebirth, people who cling to their wrong views and yet are skilled into the jhanas may or may not access some realms of rebirths. It turns out that most devas and humans who behave well have access to plenty of realms, but the buddhas claims that there is a realm only accessible to non-returners and above. https://www.accesstoinsight.org/ptf/dhamma/sagga/loka.html
The thing is that you would like a list of meritorious cetana-actions or a list of precepts which are not found in wrong doctrines, but all there is samadhi either tainted by some wrong view or tainted by right view. So concretely it is the same word & the same jhana, but the intention changes and, as per the claim of the buddha that the cetana of an activity is the karma of this activity, the result changes.
So the people who create wrong views and yet are skilled into jhanas do not know about this ''additional ethics'', but only because they do not have right view and it is right view which is really this ''additional ethics''.
Comment: Right view is not considered ethics. It is considered wisdom.
Answer: Abortion.  Buddhism is the only major religion to explicitly ban abortion in its foundational texts.  Moreover, it condemns all parties involved in the act including the doctor and anyone who provides aid in the procurement of the procedure.
It's found in the Vinaya - https://en.dhammadana.org/sangha/vinaya/227/4pk.htm


Frequency of cosmic microwave background

Question: Some people refer to cosmic microwave background's (CMB) frame of reference as an absolute one. If I understand correctly, we can measure 'absolute' velocity in this frame by using the Doppler effect. However, I don't know how we can know what the 'basis' frequency of CMB is (in its own frame)? Can it be obtained by some quantum-cosmological consideration?
Answer:
The velocity of Earth relative to the CMB frame is measured by observing the anisotropy of the CMB temperature.
The above data is the is the anisotropy of temperature of the CMB as measured by NASA U2 airplanes in the 1970s.
The anisotropy is due to the redshift and blueshift of the Earth moving 300 kilometers per second or 1,080,000 kilometers per hour relative to the frame of the CMB, in the direction of the + at the center of the red region of the plot.  This is mostly due to the peculiar motion of the Milky Way toward the Great Attractor.
Note: in the figure red means hotter and blueshifted, blue means cooler and redshifted. The contours are 1 millikelvin intervals.
The "basis frequency" (as the question calls it) of the CMB would be the frequency of the temperature with zero anisotropy.  Really it is a black body frequency distribution of temperature 2.725K.
Comment: In another sense, the "frame of the CMB" is the frame from which it was emitted c. 13bn years ago. In that frame it is (was?) rather hotter ;-) Maybe 4000K or so, red-shifted to 2.725K?


How can I effectively organize disparate files?

Question: So I moved out of mom & dads last year. I've saved every bank statement, every bill, every home insurance letter, basically everything piece of mail that wasn't a credit card offer. My desk is a mess and it's totally overwhelming, I want to be able to use my desk again, but aside from throw everything into a folder, I have no idea of how to start organizing it. When I was living with my parents, I just had a three ring binder that I organized my taxes and a few other odds and ends in, but being a home owner comes with a tremendous amount of monthly paperwork, and I'm not sure how to start on getting it organized. Any suggestions?
Answer: After some searching I found an excellent system. Obviously, you probably need to start with a filing cabinet, but alphabetical order won't help much because of all the different files, and for one credit card related file, you might put "Credit card" and on another you might put "Amazon card", and they would get filed completely differently regardless of the heading you put on them. I've found that using differently colored hanging file folders as seperators works well for me, I have several simple one word headings for various subjects on the colored folders, while items of that subject type go behind the folder. I went ahead and cut the colored folders in half - I don't want to file directly into those folders, they are simply organizers. Here is a photo of my example. Hope it helps anyone with the same issue.
Comment: I think this is basically what most organized people do.  Look for the bottoms of the hangers, where there are creases.  When you stuff many pages into a hanger it won't hang well unless you fold the hanger on those crease line, [so that the hanger bottom is flat](http://ecx.images-amazon.com/images/I/41GWHTmvUFL._SY300_.jpg) and all the pages sit like a book, rather than jamming to the lowest point they can.
Answer: I used to keep a three ring-binder of all my statements.  Each year, I would start a new binder each year.  Collecting statements for 10+ years (and rarely looking at them, I decided to reorganize.  For me, it was just too much hassle to sort and file everything.
First, I would ask if you need to keep everything.  Look at http://publications.usa.gov/epublications/keeprecords/keeprecords.htm to see how long you should keep common documents and where you should keep them.  (E.g., some important documents should kept in a safe deposit box or a fire safe.)
Second, ask yourself how frequently you need to retrieve documents and do you care if similar statements are together.  Since I rarely need to look back for documents, I now use magazine holders.  I use one for each year and print out a "cover sheet" to say what year is in that box.  I keep the current year's box on my desk.  After I'm done with a statement, it goes in the box.  This makes my filing quite quick and easy.  At the end of the year, I take the one off my desk and put it on a bookshelf, shred the contents of the oldest box, print a new cover sheet, and put that box on my desk.


Level of detail in description?

Question: There's a trope or two that says you shouldn't bother describing anything unless it's relevant to the story. However, in RPG's where the participants partially shape the story with their actions, any part of the world might become part of the story. How does one go about deciding the level of detail for descriptions of rooms/environments?
Comment: The biggest factor is your target audience and what they enjoy, and is thus very subjective.  For example, despite *The Lord of the Rings* being undeniable classics, it's difficult for me to sit through three pages describing Gandalf and Bilbo's smoke rings, and I much prefer a Kurt Vonnegut, short-and-dirty kind of style.  And there's an audience that completely disagrees with me and prefers the verbosity.  Just give the amount of detail that keeps you and your players having a good time with the game.
Answer: Usually when I describe things I have a few guiding rules around which I base my descriptions.
The first one is that there will be no more than three details in my initial description of the room/environment. I usually find 2 details too little and more details just confuse the players.
The second rule is that the description will be no longer than about 20 seconds. The logic is pretty much the same.
Combining these 2 elements makes the description detailed enough for me and my players but not too much. When they want to explore a certain aspect from the description I just give another 20 seconds chunk about it, thus giving the details just where they need them.
A typical description (for a dungeon crawl kind of game), thus, will look something like this:

You enter into a big room. There're a few chairs on the right which look a little bit rusty, while you smell a big stench from a pile of trash to the left. Between those 2, 3 goblins lie sleeping in their sleeping bags. What do you do?

Another one might look something like this (modern, this time):

You come to a huge square. Cars are going from side to side, making a lot of noise as they do so. A street performer is giving a mockery show of the queen, mimicking her voice and accent. A few policemen are running to the far end of the square, probably running after someone. What do you do?
Comment: +1 for a practical approach, based on experience and backed up by an explanation.
Answer: One aspect that hasn't been discussed so far is the use of description as a pacing tool. The principle is quite straightforward.
For creepy scenes, or those where you are signalling that you are giving the players a breather you give longer, more detailed descriptions. For scenes where you want excitement and the action to move quickly you make the descriptions much more terse and to the point.
I have found that if you do this well, it is an excellent way of helping to get the flow of a session right, with periods of excitement mixed with relative rest.
Answer: In my experience it really depends on the game world and the tone of the campaign.
Modern or recent historical periods don't require much description at all, unless the game itself is focused on details. For example, for a run-and-gun action hero mercenaries game set in the 1980s a few references to movies or common tropes will do, because constant action and rapid pacing is at the heart of the game. Breaking that up with lengthy description would be disruptive. A meticulous, detail-oriented 1980s spy game that follows the Le Carre style and uses a d100 system with lots of specific skills and rules for noticing things would require full descriptions for every new environment, and that would not go against the spirit of the game.
Licensed game worlds like Star Trek or Star Wars tend not to require too much detail in descriptions because those worlds are so well known that shorthand will usually suffice for the broad sweep of description, except in situations where the PCs are encountering something outside the expected norms of the source material.
When the game world is further afield and it is more difficult for players to get a grip on what constitutes "out of the ordinary" or noteworthy, I'll sometimes spend a couple of minutes describing the scene and embellishing that description with background info (the rugs hanging on the wall don't just have sky runes on them, they're obviously indicators that the owner is an Rune Priest of Orlanth).
Answer: You could look at what writers do and do a similar thing.  However, the main point to get is to let the player's mind fill in the gaps.  For example which of the two below descriptions brings a more vivid image to your mind?

The car interior smelled as a cross between an ashtray and a fast food kitchen.

vs

The room is littered with discarded fast food wrappers, half eaten chips, and cigarettes butts. It smells pretty bad of stale tobacco.

The trick (and it is a hard one) is to learn what works for your players so ask them for feedback.
Comment: I actually liked the second one better. Gives me an idea of what the room is like at the same time as making me guess what it would smell like. Was that your point?
Answer: It depends on the game and players' expectations.
Two things make details into play traps - if you choose not to play that way, as a group, and agree to not play that way, details can be fun additions to play and not confusing.
The "Gotcha" World
If the players expect the whole world to be potentially adversarial in an unrealistic, paranoid fashion, every detail becomes something to obsess over.  This is your classic deathtrap dungeon, the old school game in which all 4 walls, the ceiling and the floor happen to all be living monsters, etc.  This could also be the jerky GM who is out to get the players.
If you don't run that game, suddenly details are... fun interesting things and not potentially a life or death piece of info every step of the way.
Illusionism
If the players expect the only way to "play the scenario" is to try to pick up secret clues about what they "should" do next, then every detail becomes something to read into and try to guess what the GM is REALLY thinking.
At the worst type of this play, the players can expect their characters to suffer some form of punishment for failing to "go in the right direction" or at the least, to waste play time playing "Guess what the GM really wanted you to do" instead of simply having it given to them as a cut-scene.
Again, agree not to play this game and the players can just assume details are exactly what they are, and not secret messages about how to advance the plot.
One you get past those two things, the level of detail that's appropriate depends on the genre and what is entertaining - one genre might gloss over a detail in one setting and go in depth in some details in another - just as much as a movie or book might give you a sentence about one thing or give you paragraphs on another based on how much they want to "zoom in" on it.

Level of detail in description?


Do paint programs also need database?

Question: I was thinking about how would a paint software works. Firstly I thought that it might not use any database but when I started thinking about the undo function I realized that it might be that the data is somehow stored in the database. Can anyone please help me out by telling me how the images are stored in a normal paint program(say MS-PAINT of Windows).
Comment: Not an answer but I could definitely see a case for an in memory database for a paint program. Still, most cases you would use it could be satisfied by a stack or perhaps some design pattern that escapes me at the moment (but could reference :) )
Comment: @rig the [command pattern](http://en.wikipedia.org/wiki/Command_pattern) might have been what you were thinking of.
Comment: @ConradFrix You got it I believe.
Answer: Images aren't usually stored in a database (assuming you mean something like an SQL database) as the format isn't suited to image data.
Images are usually stored as files in folders - just as Word, Excel, OpenOffice documents are.
When you manipulate the data the program keeps a record of your changes in memory (usually) so that you can undo and redo modifications. Sometimes when you save the file the undo stack is cleared so you can only undo to last version on the hard drive.
Some file formats allow revision information to be stored in the file itself - but this isn't usually the case for images. What you have on disk is the only version of the file. If you want to keep a revision history then you need to either keep manual backups or store the file in a version control system, unless the underlying file system supports this natively.  An example of the latter is ZFS under OpenSolaris, which allow for a "look back in time" functionality with Time Slider - http://java.dzone.com/news/killer-feature-opensolaris-200.  Unfortunately, Solaris is heading in a different direction these days.
Comment: Some modern file systems provide built-in versioning.
Comment: @ThorbjørnRavnAndersen - Can you edit a reference into the answer? That would be useful.
Comment: @ChrisF: MacOSX "Versions"
Answer: You could look at the implementations of the undo functionality in some open source programs. Perhaps the The GIMP or Version 3.36 or earlier of Paint.NET (when it was still open source) might provide you with some inspiration. However, the Command and Memento design patterns are commonly cited as good ways to implement the undo/redo functionality.
Answer: If I name the filesystem as non-relational database - then probably - yes, else - depends what and how do you painting and how do your paintings organized.
Answer: CSLA for .NET serializes a copy of the object that you wish to save undo-history on and stores it in a stack of undo's... so you can keep popping back through history (Might be a little off on how it's stored, but fairly confident in the overall method)...
No database needed, infact, it's overkill to have a database to save "undo" information.  Just find a way to store "instances" of your data (paint info) and be able to recall them.

Do paint programs also need database?


the relation between a continuous family of distributions and a distribution of 2 variables

Question: Let X,Y be smooth manifolds and let $f:X \to C^{-\infty}(Y)$ be a continuous  map, where $ C^{-\infty}(Y)$  is the space of generalized functions on $Y$ equipped with the weak topology. By Schwartz kernel theorem, this gives us a generalized function $\xi_f$ on $X \times Y$.  Do you know any reference for this construction and its properties?
Specifically, what is the relationship  between this construction and the wave front set?  For example, if we know the  wave front set of $\xi_f$, it seems that we can bound the wave front set of $f(x)$. Is it written anywhere?
In general, it is reasonable to say that the restriction of $\xi_f$ to $\{x\}\times Y$ is $f(y)$. On the other hand there another is a notion of restriction (or more generally pull back) of a distribution (see   Hormander The analysis of Linear PD operators I, Theorem 8.2.4 ). Do you know any reference for the fact that those to notions coincide whenever both are defined?
Answer: We have describe the constriction and its relation with WF and Hormander's restriction in section 2.3 of https://arxiv.org/pdf/1212.3630.pdf


Is all traffic routed through Tor when using TBB?

Question: Consider a computer connected to the Tor network through the Tor Browser Bundle: my question is does the whole internet traffic go through the Tor network like windows update, kaspersky update, vlc update or if I'm watching a video on YouTube in Tor browser does only that video data traffic get encrypted?.
Answer: When running the Tor Browser, only the Tor Browser connects through the Tor network. Other applications are not affected and will connect in the same way they always do.
Answer: Unless you are using special system like Whonix or Tails, then only the Tor Browser connects through Tor.
Answer: The answer is NO. Tor is not a routing(i.e. OSI Layer 2 or 3) software, and TBB is just a browser. Tor itself opens a SOCKS proxy service for Layer 3+, and TransPort, i.e. transparent proxy, for Layer 3 alone. You can route all the traffic through Tor, but you need to elaborate by yourself a component to utilize tor's service ports: usually you use a firewall + TransPort for tasks like this. That's actually why you can configure which kind of packet forwarding format it will expect ( via TransProxyType directive in torrc)


Can I filter out vanilla bean seeds?

Question: When I scrape out the seeds out of my vanilla beans and simmer them with milk or incorporate them into batter, they always leave little tell-tale black dots in the finished product. Is it possible to filter them out somehow and is it something commonly done in the professional kitchen? I don't think I remember seeing these dots in restaurant desserts. It's not critical, but I'd rather my panna cotta be pristine white :-).
Comment: All the restaurants I've been to leave the seeds in to show they've used real vanilla pods over essence or extract (so there is a perceived better quality)
Answer: A chinoise will not--I speak from daily experience--filter out vanilla seeds. A coffee filter would, but my question is: why on earth would you bother? It's annoying to do (and depending on what the product is, filtering through a coffee filter would ensure you lose other things), and seeing actual vanilla seeds in the final product tells your guests that you are using real vanilla beans, not extract.
Professional kitchens do not, generally speaking, attempt to remove the seeds for the reasons noted above.
@stephenmacdonald, most dessert recipes that call for a fine mesh strainer do so because there is the possibility of chunky things ending up in the product. In the case of that recipe, I would guess it is to prevent chunks of undissolved gelatine from ending up in the final dessert.
Comment: @roux: Thank you for the info.  I'm much better at cooking than baking, so all desserts I've made like this I've just followed the straining part of the recipe blindly.  Great point about wanting to see the seeds, that makes a lot of sense!  A big +1 from me, and I've updated my answer to remove the bad advice. :)
Comment: That's exactly the reason that makes me choose one vanilla ice cream over another. Having visible vanilla beans is a benefit.
Answer: Just use vanilla extract if you don't want specks of seeds showing.  Straining of custards is to remove any coagulated egg particles, not to remove the seeds.
OR,
infuse the cream with the whole bean intact, do not split it.  It will still infuse flavor, not as quickly or as much but that would be one way to use it without specks showing in your finished dessert.
Answer: A coffee filter should do the trick.  I believe cheesecloth wouldn't be fine enough, but I'm not 100% sure.
This recipe for panna cotta calls for scraping seeds and using a fine mesh strainer on the final product, but as per @roux and @Darin's answers, it's not for getting the seeds out.
I'm not certain as to whether professional kitchens strain them out.
Answer: I use Vanilla extract instead of vanilla bean and it turns out pure white and taste great. I have made it and shared it with my neighbors and they said that it taste , as good, if not better than the one they had at the resturant. I use 2 tsp. vanilla for one recipe. I hope this helps.

Can I filter out vanilla bean seeds?


From console to GUI applications

Question: I'm a beginner programmer and all I've worked with so far are console applications in C++. Coding wise, how is the graphical side of programs created? I understand the logic that I am using from console apps will be the same, but how do programmers create the graphics that this logic is then used in? I know this is sort of an ambiguous question but basically I am trying to understand how I would go about creating a program that is not a console application, such as a video game or an iPhone application.
Comment: [Qt](http://doc.qt.nokia.com/4.7/) is what I'm going to learn soon. I already know DirectX (fast for games; alternative is OpenGL) and Windows Programming (Windows API), but those are Windows only, and I wanted to know something cross-platform.
Comment: Server-Side applications are real. They don't usually have a GUI.
Comment: Also, the definition of a "GUI" has also changed drastically during the last two decades.
Answer: To learn GUI, all you have do is to put one idea in your mind, only one, which is: event-driven.
That's it, the pattern appears in all GUI/gaming stuff. Then, what is event driven? Before we goes into details, let's see the common sequence console program first
ask user for some parameters
read file
calculate some values
write to the file
close the file
...

It appears to be some code like this, and here, let's see how an event driven program looks like.
while event_queue is not empty:
    event = event_queue.get_event()
    if event is quit_event:
        break
    else if event is mouse_click_event:
        do something to response user
    else if event is key_board_event:
        do something to response user
    ....

As you can see, the major difference between common console applications and GUI applications is: there is a main loop in GUI application.  So, what's the loop?  And why it is event-driven? That's simple, in an GUI application, we don't know what will the user do next, user might click a button "about", "ok" or "cancel".  What we can to do here is to wait, see what user do and make a response.  That's it, the "event" is exactly the "action" user took, and our response is driven by the event, therefore, it is so call event-driven.
And let's talk about the loop.  That loop is simple, it checks is there any event in the queue, if there is, it pops the event from the queue and react.  So, where are those events from?  It's usually from OS.  When an user takes some actions on our interface, let's say, a button in our window frame, OS put corresponding events in the event queue.
Still don't understand? You can imagine that there is a store, a staff named Bob, and here comes the customers, they line up in a queue, the staff can only serve one customer one time, when there is no customer, the staff can only sit there and play his finger.  The staff is the main loop, and customers are the events.
Then, what would happen if Bob took all his time to deal with one customer and never finish it?  Let's say, a customer make such a request
I would like to order some elixir.

And here Bob starts his trip for looking elixir.  Can you hear those dirty words from those customers in the queue now?  Yes, a major common problem appears in event-driven is that it we get blocked in handling one event.
while event_queue is not empty:
    event = event_queue.get_event()
    if event is mouse_click_event:
        # I will never release the control!
        while True:
           pass
    ....

As you can see, when the event is mouse_click_event, we goes into the scope, and it is an endless loop.  Did you ever see "No response" windows?  Yes, that's it, some event gets blocked in the main loop, which caused the main loop can't handle any other events.
You may say "Hey! I'm using wxWidget, what's the matter with the event-driven", as what I said,  event-driven pattern appears in all GUI applications, including QT/wxWidget/MFC/VB/.Net Framework.... at least all GUI stuff I know.  Therefore, once you can understand what is event-driven, they are all the same.
Comment: Fantastic answer. Going to use it to introduce GUI in the future.
Answer: Basic answer: Graphics are made by pushing frames to a frame buffer.
Modern answer: You're going to be given an API to make a "Window" or a "Scene" or something like that. Find an API that fits your goals (GTK+, QT4, Windows (??)), and run through some tutorials for it.
If you're actually interested in games, or more low-level graphics, check out this SDL Exercises Page.
Answer: From a GUI perspective there are basically 2 different kind of desktop applications.

Standard windowing application
Game

The difference is that a standard window application will typically use the native OS API provided to provide a similar experience to other applications that exist on the OS.  A game typically takes over the user experience and excludes any paradigm that exists in the OS.  The approach to developing each is completely different.
Since I haven't done any game development I'm not going to pretend to talk to that topic.  From a standard windowing (*nix/Windows) perspective though the development experience is quite different from a console application.  Typically console applications assume a fairly serial user experience (i.e. the app has a good idea of what the user will do next).  In a window/GUI based application, the user can do more or less whatever they want so at the application level everything tends to be (user) event driven.
If you are looking for a way to learn more about developing a GUI application I would suggest reinventing the wheel and doing something that you know how it should work.  A good example would be a reimplementation of NotePad, or something similar that is simple but gives a good feel for some of the basics of developing a windows app.
Comment: +1 For re-implementation of Notepad. Gives one great insights!
Answer: First you might want to look into the curses library, which facilitates the creation of terminal-based interfaces.
On the truly graphical side of things, the OS windowing system is responsible for most of the heavy lifting. Generally the OS draws a bunch of stuff to an in-memory bitmap, and then says to the graphics card "Hey, can you show this crap on the monitor please?". Repeat 60x per second.
As such, when you're wanting to write a proper graphical interface, a lot of the stuff you're going to be doing is basically just talking to the operating system - "I want my window to be placed here", "let me know when the mouse is over this part of the window", "alright can you change the mouse pointer to an hourglass please" etc.
Of course for most uses you want to be using a graphics library to handle that talking-to-the-OS stuff, leaving you free to code up your UI in a platform-independent manner.
Answer: Well it really depends. Usually it depends on the libraries and API's used.
Like if you want to make a GUI you could use QT4 or GTK+
Lets say you want to make a game? you might use SDL or Opengl.
really all depends what you want to do?
Comment: What in those libraries exactly makes GUIs possible though, Im not really looking for specifics, I am just trying to understand the fundamentals.
Answer: Expanding on Ken answer, from the perspective of game development, there are two ways of seeing this, since there is an game engine and the various games that are made typically in a game engine.
A game engine, makes the calls to graphic api (opengl and direct3D come in mind) in order to draw the different game scenes and animations, supports the loading of 3d shaped modeled in programs like 3d max, supports the loading of shaders, helps calculating the intersections of all objects, and tells when two or more of them collide, provides an interface to the sound library in order for one to play sounds if a character gets a head shot (like your boss) (and in this case openal, DirectSound and FMOD come into mind), and provides an way to implement characters controlled by AI, that go after donuts as soon as the game begins (tasty donuts, ahahahah).
Then, there is the game that implements the game logics (if the player starts farming, he gets head shoted, or if the warrior player, finds a mage he is immediately iced and then the mage uses the ice cube and a stool to put is feet), and also the characters modeled in some software, and everything that is specific to a game, since all the general things are provided by the engine. (Gamedev.org and gamasutra excel in this)
Answer: There is (at least) one big issue that you're likely going to run into as a CUI-developer when moving to GUI: GUI programs need to continue to run to keep displaying and reacting to the user (the user expects continuous reaction from the interface).
When you're going to run functions that take somewhat longer (or need to run continuously) you should be aware that your GUI might be frozen if you don't do it the right way - for a GUI to continue to run normally it must keep running in foreground. So continuous (or time-consuming) functions should almost always be fired in another thread, while sending events to the GUI when a status changes.
Some GUI systems provide this for you and abstract these details away for you (mostly systems that have seperate markup- and code-languages like WPF/Silverlight), but in others (like GLADE) you have to manage this by yourself.
Comment: There is usually a trick to move such operations to a separate thread, leaving the GUI thread responsive.
Comment: Thnx, rephrase for more brevity.

From console to GUI applications


Smart Contract to receive tokens and give ether?

Question: A CrowdSale contract usually receives Ether in exchange of certain token. Is it possible to make it backwards? To receive certain token and give an amount of ether in exchange? Is as simple as changing positions of the variables in my code or it's a little bit more complicated?
Answer: It's slightly more complicated because users don't just send you tokens. They have to first give you allowance to spend the token, then they call your function (say tokenToEther())
First your user would call this function on the token contract, assuming the contract implements ERC-20 interface.
function approve(address _spender, uint256 _value) returns (bool success);

The spender would be your contract, the value would be however much they wish to spend, to receive ether from your contract.
Then your user would call function on your contract
function tokenToEther() returns (bool success);

The way you handle it in your contract is pretty simple if you understand ERC-20 interface. Something like
require(myToken.allowance(msg.sender, this) > 0);
uint tokenAmount = myToken.allowance(msg.sender, this);
require(myToken.transferFrom(msg.sender, this, tokenAmount));
msg.sender.transfer(getRate(tokenAmount));

The above code makes some important assumptions:

The myToken is a contract address, which is some kind of ERC-20 compatible token
Your sender must give allowance to your contract first, otherwise require will fail
Your contract will take all the allowance, transferring it to your contract.
Your contract will be the owner of the transferred tokens. Make sure you write a withdraw function or tokens will get locked up in your contract!
Comment: Approve and transfer are different. The reason approve exists is that the users don't have to trust you to send them ether. If you want your contract to send tokens to you once `tokenToEther` is called, you can use `transferFrom` to transfer tokens to you instead of the contract itself
Comment: Great, your answer is very clear and I think it would help me a lot. Just one extra question: For the sender to give me allowance, it would be enough if he send me tokens in the traditional way, I mean, when I exchange tokens with someone, lets say someone sends me BAT token, he just need to send them to my address, that would be a kind of allowance approval? Wrapping it: when the user sends tokens to my contract is a way to give me allowance? Or he must specifically use approve function?


Trying to make xml data readable for Arcgis

Question: I am trying to convert xml data into tabular form for the process of geocoding.  We have the xml file with info that we are going to run through an address locator.  Do I need a script for this? Can we import directly into arc without coverting to xls, maybe using Python?
Answer: Yes the process can be scripted. To build one. the best how-to walk through ive seen is.
http://www.doughellmann.com/PyMOTW/xml/etree/ElementTree/parse.html
Doug builds a xml to csv script and explains the process well.
If this process is something your going to do/rerun often consider a look at FME, it has excellent XML to . tools.
but if a one off is needed. there is
http://www.xml-converter.com/
to be honest I have not tried the converter tool, but looks promising


How does Samson foreshadow Christ?

Question: Samson is an Old Testament character that is often depicted from the pulpit as a womanizer of marginal character.  However, there seems to be a growing perspective that Samson foreshadows first advent Christ.  Is there any record in Church history that would support this growing perspective?
Comment: `However, there seems to be a growing perspective that Samson` is there a link that will point to the growing perspective?
Comment: [Letter 53](http://www.newadvent.org/fathers/3001053.htm) of the letters of St. Jerome has the statement "In the book of Judges every one of the popular leaders is a type."(not necessarily of Christ, though) [This article](http://www.bible-researcher.com/schmeling.html) says "this type was used throughout the history of the church" and quotes Luther (not early Church but not modern): "Who has time enough to explain all these stories and to see how Samson, David, Solomon, Aaron, and others literally and accurately signify Christ?"
Comment: seven dreadlocks <=> seven horns ?
Comment: If "Samson and Christ" is Googled the to of the list is http://www.scripturetruths.net/pdf/SamsonAFigureOfChrist.pdf
Comment: Onesimus: there is an interesting article in Biblical Archeological Review about slavery in Rome when Onesimus was alive.
Comment: @PaulA.Clayton Will review and thank you for answering my question
Comment: @Rick I read the link. Interesting article.
Answer: Early Christian theologians find many analogies or types of Christ, the church, and the world in the story of Samson.  Samson himself is often seen to be a type of Christ, but other times, he is considered a type of the church or even the world.  Caesarius of Arles (468–542) writes extensively on the analogies he sees in Samson's story, and summarizes his method of analysis:

What was the meaning of Samson? If I say he signified Christ, it seems to me that I speak the truth.  However, the thought immediately occurs to anyone who reflects: Was Christ overcome by the flattery of a woman?  How is Christ understood to have gone in to a harlot? [...] Inasmuch as Samson performed virtues and miracles he prefigured Christ, the head of the Church.  When he acted prudently, he was an image of those who live justly in the Church, but when he was overtaken and acted carelessly, he represented those who are sinners in the Church. (118.3)1

This is an important point: the authors identifying Samson with Christ do not do so blindly.  Their methods of biblical interpretation allow a variety of images to be drawn from the text, and sometimes more than one.  One stark example will suffice for our purposes here: when Samson kills the lion in Judges 14:5–9, Caesarius sees the lion as an image of Christ, since "to us Christ is a lion in whose mouth we found the food of honey after His death" (119.1).  Conversely, Samson, far from typifying Jesus, is said to represent the "Jewish people who killed Christ" (119.2). However, as we'll see, other writers make different connections in this particular story.
Turning now specifically to the connections drawn between Christ and Samson, we can put them into a few categories:

Samson's wife
Samson's humiliation
Samson's victories over his enemies

We'll draw primarily on the writings of Caesarius, but also those of Ephrem the Syrian (306–373), Augustine (354–430), and Gregory the Great (540–604).2
Samson's wife
One place where Caesarius sees Samson representing Jesus is in his relationship with his Philistine wife.  Like Christ, Samson takes a sinful bride:

The harlot whom Samson married is the Church which committed fornication with idols before knowing one God, but which Christ afterwards united to Himself. (118.3)

The analogy is extended to Samson's friend, who took away Samson's wife:

Then follow the words: 'Samson was angry because a friend married his wife.'  This friend prefigured all heretics.  It is a great mystery, my brethren.  Heretics who divide the Church have wanted to marry the wife of the Lord and carry her away. (118.4)

Samson's humiliation and death
Samson's final humiliation begins when his hair is cut in Judges 16:18–21.  Caesarius writes that the strength found in Samson's hair is analogous to the "strength in a covering" that Jesus had "when the shadows of the old law protected him."  When the law was rejected by the killers of Christ, he suffered, and his purpose was revealed, like Samson suffered and had his secret exposed when his "covering" was cut. (118.6)
This humiliation led to Samson's imprisonment and death, paralleling Christ's:

Samson was condemned to prison, while Christ deigned to descend into hell.  Samson extended his hands to the pillars, and the house of the Philistines fell with its princes; Christ stretched out His hands to the two beams of the cross as to two pillars, overthrowing and destroying the house or kingdom of the devil and his angels. (120.4)
Notice here an image of the cross.  Samson extends his hands spread out to the two columns as to the two beams of the cross. (118.6)

Samson's victories over enemies
Lion
Unlike Caesarius, Ephrem the Syrian sees Samson as an type of Christ in his defeat of the lion:

The Nazirite, Samson, gazed at the type
of Your courage. He tore the lion apart,
the likeness of death.  You ripped [death] asunder
and made the sweet life emerge
from its bitterness for human beings3

Similarly, Augustine:

Who was in Samson, when he killed the lion that met him as he went to get a wife among strangers, but He who, when going to call His Church from among the Gentiles, said, "Be of good cheer, I have overcome the world?"4

Philistines with the jawbone
Caesarius notes several places where Samson's victory over his enemies parallels that of Christ.  For example, his defeat of 1,000 Philistines in Judges 15:14–16:

Before the coming of Christ all the Gentiles were torn to pieces by the devil and lay scattered like dry bones form the ass's body, but when Christ the true Samson came, He seized them all in His holy hands.  He restored them to the hands of His power, and with them overcame His and our adversaries. (119.4)

Philistines and their gates
Samson's capture and subsequent victory over the Philistines in Judges 16:1–3 is explained by Gregory the Great as an image of Christ's death and resurrection:

What does the city of Gaza signify, if not hell, the abode of the dead?  What is shown by the Philistines, if not the mistaken confidence of the Jews?  For, when the Jews saw that the Lord was dead, and his body placed in the tomb, they posted guards around it.  They were delighted that Jesus, whom the author of life had glorified, was now held captive by the gates of death, just as the Philistines were exultant that they had imprisoned Samson in Gaza.  However, in the middle of the night, Samson not only escaped, but carried the gates away with him.  Just so did our Redeemer, rising against before it was light, not only walk free out of death and of hell, but also destroy hell's very gates.5

Caesarius sees matters similarly, and, like Gregory, extends the image to include the ascension:

Moreover, he removed the city gates, that is, He took away the gates of hell.  What does it mean to remove the gates of hell, except to take away the power of death? He took it away and did not return it.  Furthermore, what did our Lord Jesus Christ do after He had taken away the gates of death?  He went up to the top of a mountain.  Truly, we know that He both arose and ascended into heaven. (118.5)

Philistines in death
Of course, Samson's greatest victory is associated with his death, like Christ's:

In the fact that he is written to have destroyed more enemies at his death than he struck before in the whole course of his life, the mystery of the Lord's Passion is shown, for through it the house of the devil fell and the kingdom of death was shattered. (120.4)

Ephrem connects the freedom Samson purchases with his life to that of Christ:

Samson is a type of the death of Christ the high priest:
Samson's death returns prisoners to their towns,
whereas the High Priest's death has returned us to our heritage6

Summary
Christian theologians in the fourth century identified Samson with Christ in particular ways, and additional analogies were developed by authors in the centuries immediately following.  In particular, the humiliation and victories of Samson lend themselves to parallels with the humiliation and final victory of Christ.

References and notes:

Caesarius of Arles, Sermons 118, 119, and 120, in  Sermons, Volume 2
Ambrose teaches on Samson in On the Holy Spirit, Book II, but does not connect Samson to Christ in the same way as do the other authors here.  Jerome says that "every one of the popular leaders" in Judges is a type of some kind in Letter 53.  Samson receives only fleeting mention in the surviving writigs of the earliest fathers.
Ephrem the Syrian, Hymns, Hymn 13.4, 137
Augustine, Reply to Faustus, Book XII, §32
Gregory the Great, Forty Gospel Homilies, 21, in Reading the Gospels with Gregory the Great, 36
Ephrem the Syrian, Hymns on Paradise, 13.12.13, in Ancient Christian Commentary, 167
Answer:
Heb 11:32  And what shall I more say? for the time would fail me to tell of Gedeon, and of Barak, and of Samson, and of Jephthae; of David also, and Samuel, and of the prophets:
Heb 11:33  Who through faith subdued kingdoms, wrought righteousness, obtained promises, stopped the mouths of lions,
Heb 11:34  Quenched the violence of fire, escaped the edge of the sword, out of weakness were made strong, waxed valiant in fight, turned to flight the armies of the aliens.
Heb 11:35  Women received their dead raised to life again: and others were tortured, not accepting deliverance; that they might obtain a better resurrection:
Heb 11:36  And others had trial of cruel mockings and scourgings, yea, moreover of bonds and imprisonment:
Heb 11:37  They were stoned, they were sawn asunder, were tempted, were slain with the sword: they wandered about in sheepskins and goatskins; being destitute, afflicted, tormented;
Heb 11:38  (Of whom the world was not worthy:) they wandered in deserts, and in mountains, and in dens and caves of the earth.
Heb 11:39  And these all, having obtained a good report through faith, received not the promise:
Heb 11:40  God having provided some better thing for us, that they without us should not be made perfect.
Heb 11:6  But without faith it is impossible to please him: for he that cometh to God must believe that he is, and that he is a rewarder of them that diligently seek him.

Samson was a womanizer and adulterer but he did have faith and faith pleases God. He is marginally mentioned in the Hall of Faith in Hebrews 11. Samuel and David have many more word hits in the New Testament. Gedeon, Barak and Jephthae are also only mentioned in this one passage in the New Testament. That does not mean there are not lessons to be learned as verse 34 of Hebrews 11 is dedicated to warriors of the faith but the emphasis is placed on what they did through faith rather than their character. Samson's birth was foretold by an angel, he did some things correct by faith, he was an imperfect deliverer and he died of his own fault serving God. Christ's birth was foretold by an angle, he did every perfectly and in faith and he died not of his own faults but for the sins of others delivering them perfectly serving God.
Comment: The question seems to be looking for evidence of the interpretation of Samson as a foreshadowing (or type) of Christ in earlier Church writings--**not** for a rationale for that interpretation. I do not remember *The Letter to the Hebrews* or other NT writings using Samson in this manner.
Comment: If Samson is a foreshadow of first advent Jesus Christ then this may be an effective witnessing tool to the Jew.  The Jews recognize David as a type of Messiah; however, Samson began the work of Deliverance that David ultimately completed. http://readfortruth.myfreeforum.org/Samson_about61.html
Comment: @PaulA.Clayton when someone asks for something which isn't possible to answer its fine to answer something similar. If someone were to ask are there white horse like unicorns with spiral shaped horns you could say the Bible does discuss unicorns but it does not describe them exactly that way.
Answer: The story of Samson throughout the Bible supports this perspective:
Samson is unique: He is mentioned as one of the Faithful in Hebrews 11 and God never once chastises Samson for His behavior.  What follows is a line by line commentary on how the life of Samson and the life of Christ parallel:

Judges 14:1-4 https://www.blueletterbible.org/kjv/jdg/14/1/s_225001

Note: Samson seeks a wife outside of his own kind in the same way Jesus Christ sought His bride of humanity outside of His divine heritage. God sought an occasion against the Philistines and he also sought an occasion against the satanic realm by betrothing His Son to a bride that belonged to the world. The Philistines typically represent the "satanic realm" or that which belongs to it.

Judges 14:5-9 www.blueletterbible.org/kjv/jdg/14/5/s_225005

Note: Many assume Samson disobeyed the Nazarite requirement of not touching a dead thing. We see that he took the honey, which does not necessarily mean he touched the carcass.

Judges 14:10-14 www.blueletterbible.org/kjv/jdg/14/10/s_225010

Note: Jesus Christ is the "Lion of Judah" and from His broken body (death) comes grace (Jhn 6:55 "is meat indeed") that is sweeter than honey!

Revelation 5:5 And one of the elders saith unto me, Weep not: behold, the Lion of the tribe of Judah, the Root of David, hath prevailed to open the book, and to loose the seven seals thereof.

1 Corinthians 11:24 And when he had given thanks, he brake [it], and said, Take, eat: this is my body, which is broken for you: this do in remembrance of me.

Judges 14:15-20 www.blueletterbible.org/kjv/jdg/14/15/s_225015

Note: Humanity (in Eden) was unfaithful to God; trusting in the words of the serpent rather than in the "Word of God". This resulted in mankind being handed over to Satan, the "prince of this world". Samson's intended was unfaithful to him as well when she revealed what he had asked her to withhold. This resulted in her being handed over to Samson's best man from his own wedding party (a type of Lucifer).

Judges 15:1-2 www.blueletterbible.org/kjv/jdg/15/1/s_226001

Note: While out collecting a bridal debt for his in-laws, Samson's father-in-law gave his daughter to another man. Her younger sister was offered to Samson as a substitute, with no recorded outcome. This is similar to Christ's 1st Advent when He was scorned and wifeless.

Judges 15:3-5 www.blueletterbible.org/kjv/jdg/15/3/s_226003

Note: Here Samson uses the craftiness of the fox to execute judgment upon the worldly provision of the Philistines.

Mathew 8:20 And Jesus saith unto him, The foxes have holes, and the birds of the air have nests; but the Son of man hath no where to lay His head.***

Note: Jesus Christ turned the tables on the Pharisees (the establishment) by surrendering to an unjust execution, which transferred the right of judgment into His hands. The victim of injustice is the only one that can legitimately administer judgment and forgiveness!
Note: Firebrand (Strong's # 3940) is often translated as lamp, but always signifies God's work, just as in

Isaiah 62:1 For Zion's sake will I not hold my peace, and for Jerusalem's sake I will not rest, until the righteousness thereof go forth as brightness, and the salvation thereof as a lamp [03940] [that] burneth.

Note: Jesus Christ in His 1st Advent is the lamp spoken of by Isaiah and the firebrand caught between two world systems (Rome and Pharisaical Israel).

Luke 13:32 And he said unto them, Go ye, and tell that fox (Herod), Behold, I cast out devils, and I do cures to day and to morrow, and the third [day] I shall be perfected.
Luke 23:12 And the same day Pilate and Herod (foxes, tail to tail) were made friends together: for before they were at enmity between themselves.***

Judges 15:6-13 www.blueletterbible.org/kjv/jdg/15/6/s_226006

Note: Samson made sure that his own people did not harm him and ultimately gave his life while in Philistine captivity. Likewise, Jesus was arrested by a mob of His own people and died voluntarily in the hands of His enemy!

Judges 15:14-16 www.blueletterbible.org/kjv/jdg/15/14/s_226014

Note: David is often thought of as a type of 2nd advent Christ, in fact it was for a king like David that Israel was looking for.  David's first weapon against the Philistines was a rock, which he used to defeat Goliath (a type of Satanic realm). David, by using a rock, makes a direct connection with Christ who is the "Rock", or Petra. All the victories that 2nd Advent Christ will realize are built upon the foundation of His 1st Advent work.
Note: In the balance of King David's conquest, the most striking contrast between he and Samson is their choice of weapons. Later, David fought with a sword and Samson fought with his only hand-held weapon, the jawbone of a donkey.
Note: Jesus Christ in His 2nd Advent will conquer with a sword. In the book of Revelation, He uses the "sword of the Spirit" to execute judgement.

Revelation 19:15 And out of his mouth goeth a sharp sword, that with it he should smite the nations: and he shall rule them with a rod of iron: and he treadeth the winepress of the fierceness and wrath of Almighty God.

Note: In contrast, the donkey is the premier beast of burden throughout the Bible. Jesus Christ came initially to bear the burden of sin in the world.  Samson's wielding the jawbone of a donkey (in-lieu of a sword) prophesied that the bearing of sin (underpinned by the word of truth) produced Christ's victory in his 1st Advent.

John 1:14 And the Word was made flesh, and dwelt among us, (and we beheld his glory, the glory as of the only begotten of the Father,) full of grace and truth.

Judges 15:17-19 www.blueletterbible.org/kjv/jdg/15/17/s_226017

Note: The hollow place that opened up in the jawbone (Judges 15:19) is like the leaven of Jesus Christ in contrast to the leaven of the Pharisees. The leaven of the Pharisees (sin) results in death, while the leaven of Jesus Christ (righteousness) results in eternal life.

Leviticus 23:16,17 Even unto the morrow after the seventh Sabbath shall ye number fifty days; and ye shall offer a new meat offering unto the LORD. Ye shall bring out of your habitations two wave loaves of two tenth deals: they shall be of fine flour; they shall be baken with leaven; [they are] the firstfruits unto the LORD.
Mathew 13:3 Another parable spake he unto them; The kingdom of heaven is like unto leaven, which a woman took, and hid in three measures of meal, till the whole was leavened.
Leviticus 10:12 And Moses spake unto Aaron, and unto Eleazar and unto Ithamar, his sons that were left, Take the meat offering that remaineth of the offerings of the LORD made by fire, and eat it without leaven beside the altar: for it [is] most holy:
Matthew 16:6 Then Jesus said unto them, Take heed and beware of the leaven of the Pharisees and of the Sadducees.

Note: Leaven is used in parables to show the infectious aspects of either sin or righteousness. It is from the hollow place (vacuum) caused by the sinless death of Jesus Christ, that eternal life flows and is dispersed throughout this temporal realm. The penalty of sin is death (a=life; b=sin; c=death; a+b=c; c-b=a), thus a sinless death results in eternal life.

John 4:10 Jesus answered and said unto her, If thou knewest the gift of God, and who it is that saith to thee, Give me to drink; thou wouldest have asked of him, and he would have given thee living water.
Revelation 22:1 And he shewed me a pure river of water of life, clear as crystal, proceeding out of the throne of God and of the Lamb.***
Judges 15:20 And he judged Israel in the days of the Philistines twenty years.
Judges 16:1 Then went Samson to Gaza, and saw there an harlot, and went in unto her.

Note:  Many commentators believe Samson went into the harlot's home for sexual gratification. This reads more into the scriptures than they actually reveal. Samson was the Philistine's single greatest adversary; he more likely took refuge with her until midnight. Jesus Christ was also falsely accused because of the company He kept.

Mathew 11:19 The Son of man came eating and drinking, and they say, behold a man gluttonous, and a winebibber, a friend of publicans and sinners.

Judges 16:2-3 www.blueletterbible.org/kjv/jdg/16/2/s_227002

Note: The Cross-is our door into the eternal realm. Jesus Christ carried His door (the cross) on His back up to the hill of Cavalry, just as Samson carried the city door on his back and set it upon a hill. The Jews should have recognized the significance of this act. By taking the door (post, bar and all), he makes a connection to their own Passover, where the lamb's blood was placed on the post and lintel of the door so the "angel of death" would pass over them.
John 10:9 I am the door: by me if any man enter in, he shall be saved, and shall go in and out, and find pasture.

Judges  16:4-5 www.blueletterbible.org/kjv/jdg/16/4/s_227004

Note:  Jesus, like Samson, was betrayed by a fellow Jew for silver!

Judges 16:6-16 www.blueletterbible.org/kjv/jdg/16/6/s_227006

Note:  Jesus was tempted three times and He withheld the source of His power until His "time had come".

Judges 16:17-30 www.blueletterbible.org/kjv/jdg/16/17/s_227017

Finally, you be the judge:
Two wooden pillars hold up the balcony in the Philistine arena. Today, an Israelite named Samson, with arms spread wide is tied in-between those pillars. He is to serve as a novelty, to be made sport of for the sake of Philistine entertainment.
The Philistines dominated Samson's world. Arenas of amusement nurtured their social arrogance. They were a people that defied the God of Israel and mocked His children.
This was a special day, for the Philistine's greatest adversary was under their control. His eyes had been gouged out and he appeared to be powerless against their taunts. The Philistines could see Samson praying to his God, and this incensed the crowd all the more, for their god had been victorious over the God of Israel, having delivered Samson over to them. Dagon, the Philistine's god, had discovered, through betrayal, the source of Samson's strength. It was his hair, his covering since birth. Once his hair was cut from him he would become like every other man, helpless. However, one thing had gone unnoticed, his hair once again covered his head!
In Hell, demons shouted with joy, for their greatest adversary, Jesus Christ, had been captured. His Father for the first time had been cut off from Him. He was Spiritually isolated and blinded to any possible escape from His abductors.
Satan's empire was built upon two simple laws; the first "all have sinned" and the second "the penalty for sin is death" (which is separation from the Creator). Now he held the very "Son of God" captive by sin and its penalty. Mysteriously, with arms spread wide, sin came upon the Son while He hung upon the cross.  This amazed Satan for he had no record of God's Son having ever sinned.
The Philistines were startled; those in the upper deck sensed it first. It was almost undetectable, a feeling of instability, a gentle movement. Suddenly, all realized Samson had dislodged the two center pillars that the arena rested upon. Just as quickly, a loud crash and total annihilation consumed all within the facility. It was finished. Samson, in his death was more victorious than in his entire life.
Suddenly, the Spirit of God engulfs Hell and the Father is immediately reunited with His Son. Hell begins to tremble as the Son of God stirs, and the two pillars of sin and death begin to wobble. Confusion ensues as the law of sin and death give way. Satan's legal claim on the captives of sin and death collapses and his prison is destroyed. God's truth radiantly reveals that while the penalty for sin is death, a sinless death offers eternal life! Creation once again can be restored to its Creator!

1 Corinthians 15:55-58 O death, where [is] thy sting? O grave, where [is] thy victory? The sting of death [is] sin; and the strength of sin [is] the law. But thanks [be] to God, which giveth us the victory through our Lord Jesus Christ. Therefore, my beloved brethren, be ye stedfast, unmoveable, always abounding in the work of the Lord, forasmuch as ye know that your labour is not in vain in the Lord.
Rev 1:18 I [am] he that liveth, and was dead; and, behold, I am alive for evermore, Amen; and have the keys of hell and of death.
Rev 20:14 And death and hell were cast into the lake of fire. This is the second death.**
Comment: This is one of our longest answers on this site. Is there any way it can be shortened?
Comment: @Andrew Still long but much shorter, hopefully this will help

How does Samson foreshadow Christ?


What is the difference between linear and affine function?

Question: I am a bit confused. What is the difference between a linear and affine function? Any suggestions will be appreciated.
Comment: A quick definition for linearity would be "$f(x)$ is linear if $f(\alpha x_1+\beta x_2)=\alpha f(x_1)+\beta f(x_2)$". This is coherent with the comment by @Rahul above.
Comment: @Karlo the comments are gone so your comment is confusing. Do you mind clarifying? perhaps the definition of affine might elucidate.
Comment: @CharlieParker Thanks for pointing this out. I do not remember what it was about. Should I remove my comment? More information is given in the answers below.
Answer: A linear function fixes the origin, whereas an affine function need not do so. An affine function is the composition of a linear function with a translation, so while the linear part fixes the origin, the translation can map it somewhere else.
Linear functions between vector spaces preserve the vector space structure (so in particular they must fix the origin). While affine functions don't preserve the origin, they do preserve some of the other geometry of the space, such as the collection of straight lines.
If you choose bases for vector spaces $V$ and $W$ of dimensions $m$ and $n$ respectively, and consider functions $f\colon V\to W$, then $f$ is linear if $f(v)=Av$ for some $n\times m$ matrix $A$ and $f$ is affine if $f(v)=Av+b$ for some matrix $A$ and vector $b$, where coordinate representations are used with respect to the bases chosen.
Comment: _An affine transformation does not necessarily preserve angles between lines or distances between points, though it does preserve ratios of distances between points lying on a straight line._
From [Wikipedia](http://en.wikipedia.org/wiki/Affine_transformation)
Comment: Fixed! Thanks for catching that; it's slightly unnerving that something so wrong survived for 18 months!
Comment: @godaygo: It was a question because I didn't understand what was intended in the original version of the answer.  I deleted it because I just reread the answer and see that it was obsolete.  Your comment is incorrect however, because neither linear transformations nor affine transformations typically preserve distance.  The reason is not the translational term.  A translation map does preserve distances.
Comment: @JonasMeyer I think your comment is wrong, because the *linear transformation* preserves the distance, while the *affine transformation*, on the other hand, does not have this property because it has a translational term.
Answer: An affine function is the composition of a linear function followed by a translation.
$ax$ is linear ; $(x+b)\circ(ax)$ is affine.
see Modern basic Pure mathematics : C.Sidney
Comment: Not sure why this got downvoted, made the most sense to me.
Comment: Probably because this is just a particular case. In general an [affine space](http://en.wikipedia.org/wiki/Affine_space) needs to be introduced.
Comment: For those in need of a picture: https://thesciencepan.com/difference-between-affine-and-linear-functions/
Answer: An affine function between vector spaces is linear if and only if it fixes the origin.
In the simplest case of scalar functions in one variable,
linear functions are of the form $f(x)=ax$ and affine are $f(x)=ax +b$, where $a$ and $b$ are arbitrary constants.
More generally, linear functions from $\mathbb{R}^n$ to $\mathbb{R}^m$ are $f(v)=Av$, and affine functions are $f(v)=Av +b$, where $A$ is arbitrary $m\times n$ matrix and $b$ arbitrary $m$-vector. Further, $\mathbb{R}$ can be replaced by any field.
More abstractly, a function is linear if and only if it preserves the linear (aka vector space) structure, and is affine if and only if it preserves the affine structure. A vector space structure consists of the operations of vector addition and multiplication by scalar, which are preserved by linear functions:
$$f(v_1+v_2) = f(v_1) + f(v_2), \quad f(kv) = k f(v).$$
An affine structure on a set $S$ consists of a transitive free action $(v,s)\to v + s$ by a vector space $V$ (called the associated vector space). Informally, $v+s\in S$ is the translation of the point $s\in S$ by the vector $v\in V$, and for any pair of points $s_1, s_2\in S$, there is an unique translation vector $v\in V$ with $v + s_1=s_2$, also written as $v = \overrightarrow{s_1 s_2}$. Then a function between two affine spaces $S$ and $T$ (i.e. sets with affine structures) is affine if and only if it preserves the structure, that is
$$f(v + s) = h(v) + f(s)$$
where $h$ is a linear function between the corresponding associated vector spaces.
Answer: $(1)$Linear continuous Functional equations of the Form:
 $$F(\alpha x +\delta y)= \alpha F(x) + \delta F(y)$$;
or rather 1- point homogeneity
$(1a)$ (often with Cauchy's equation as well), as in the above post.
However,  sometimes Cauchy's equation is not needed in addition to $(1a)$ if one can get to it $(1a)$ (for all reals) directly, which is not generally the case.
$(2)$Affine of the form;
Continuous Function Form: $$\forall (x,y)\in \mathbb{R}F((1-t) x + t y)= tF(y) +(1-t)F(y); t\in [0,1]$$
ie:'concave and convex' .
*Or is it  $\forall (x,y)\in $ $\text{dom(F)}$ or $\forall (x,y)\in$[0,1]$?
For(2)  Function Form: $$F(x)=Ax+B$$
Where $A$ is an arbitrary constant
(1a)$$\forall x\in \mathbb{R},\forall \delta \in \mathbb{R}:F(\delta x)=\delta F(x)$$
(1/1a) Linear Function: $$F(x)=Ax$$(in this case $A=F(1)$)
One always (or nearly always) needs to derive Cauchy's equation beforehand, to derive  $(1a)$ for all rational numbers. And then a weak regularity requirement, generally, given Cauchy's equation, to extend homogeneity to all reals ie to get to equation $(1a)$)
Sometimes on can extend it to the algebraic irrationals given the field auto-morph-ism equations, although they 'apparently' already specify the function and grant continuity I have some issues with that (but that another story; vis a vis- the trans-transcendental numbers).
In both cases, I may have accidentally  may be restricted domain to $[0,1]$ but are in their continuous forms, so that in some sense they are now function rather than functional equations . Or rather in a functional form from which the function should be directly derivable; as opposed to 'the general (often continuous) solution to Cauchy equation or Jensen's equation etc).
Although that may not be quite correct.
I think that sometimes convex functions (presumably not convex and concave ones but I might be wrong) can have trouble with continuity at the end points . However, I presume they are ruled as degenerate or not possible in the current system, ie not Lebesgue measurable.
And often that is when one is speaking of midpoint convexity or Jensen's equation rather than their,already, or (possibly) allegedly already, continuous versions $(1)$ and $(2)$.
I am  just being tentative about $(2)$ here. I am not disputing anything, I just want to be careful.
Generally   unless it is not restricted to an interval (or real line version).
interval (there is presumably a real line generalization). Notice that delta is restricted here, one cannot solve for the origin directly.
I presume that $(2)$ is just the real line version $(2)$ of convexity and concavity perhaps. once the origin has been fixed.
In (2) One cannot solve for $F(0)=0$,or directly solve for $F(1)=a$; for $F(x)=ax$, but only that $F(0)=b$ for $F(x)=ax+b$.
Although I think that both $(1)$ and $(2)$ are the restricted versions to the unit range, but with $F(0)$ being directly incorporated into $(1)$.
As one can set $a=1$ and $b=1$,$x=0$, $y=0$
To get $[F(0)=2F(0)]\,\Rightarrow\,F(0)=0$ in $(1)$
But one cannot do so in $(2)$.
As there is only one free parameter, so that one always gets $F(0)=F(0)$
I suppose one gets that (I think/perhaps)
(2a)$$F(tA)= t(F(A)-F(0)] +F(0)$$
Where $$F(A)$$ is the  F(max element of domain; when $A$ positive or increasing) or
$$F(A)=F(1)-F(0)$$ here.
I am not sure if $(2)$, in this form,  $F$ is defined only the domain $[0,1]$ .
However, its unclear whether $F(x)=ax+b$ falls out/(is derivable) of $(2)$ As directly  as $F(x)=Ax$ (is derivable)/falls out of $(1)$.
I am probably using the wrong version confined to that domain $[0,1]$ domain).
Answer: Answer for any confused French reader.
In France/French, the distinction between linear and affine appears to be different from other countries.
An affine function in the French sense is a any function that may be written
$f(x) = a + bx$
where $a$ and $b$ are independent of $x$ (not necessarily Real). For example, $f(n) = a + bn$, where $n \in N$ is an affine function over the Natural number set $N$.
A linear function in the French sense is an affine function that passes through the origin, that is $a=0$ and $f(x)=bx$ for some number $b$ independent of $x$.
Reference: wiki/Fonction_affine


Redirecting "looking for package in R" to SO

Question: I noticed that multiple questions that ask about R packages are voted to migrate to SO (I also do this). This is consistent with the fact that CV is not about programming. On the other hand, "I am looking for R package that does something" is not really a programming question and I would say that this kind of question is also off-topic on SO. So maybe the unwritten policy of migrating those to SO is not valid? What do you think?
Comment: I think it depends. There might also be some other SE sites, which better fit software-focused questions. For example, most recently I've recommended to migrate [this question](http://stats.stackexchange.com/q/139709/31372) to Data Science (DS) SE site, as, while the question is clearly off-topic on Cross Validated, it fits DS reasonably well.
Answer: I have seen other forums migrating such requests to Software Recommendations, though that forum tends to be a still defining itself and not known for prompt responses or well moderated. Right now as it covers a broad range of topics and not people who are say, experts in R or what it does in this case.
R packages based on this forum's core competency I believe would be appropriate here due to the original core purpose of R and its continued primary use even though it's use is definitely branching out.
Though in general, I would prefer any such requests that 'are migrated'go to Software Recommendations than the bigger black hole of Stack Overflow which is supposed to be programming questions.. not which software package should I use....
I know I have recommended R packages over in Software Recommendations on several questions as well.
Answer: Stack Overflow uses a fairly stringent definition of what constitutes a programming question (perhaps just as we have a fairly strict definition of what constitutes a statistical / machine learning question).  A question that simply has to do with how to use, say, R is not necessarily a programming question.  One good rule of thumb is that programming questions should have a reproducible example / MCVE.  A question about programming that doesn't have one should not be migrated until it has been edited to include such.  A question that cannot have one (e.g., 'what is the package for _______') should not be migrated, but should simply be closed here as off-topic ("because it is not about statistics, machine learning, data analysis, data mining, or data visualization").
I recognize that this may seem harsh to people who want help and are upset that we are not providing it.  However, there is no guarantee that any given question must fit in somewhere on the SE system.  Many general R questions can go to the r-help listserv—that's what it's for.  In addition, we can point people to our meta.CV thread that lists Internet Support for Statistics Software.
Comment: Yes, but still one could argue that this kind of questions are related to statistics ("how to do statistics with" or "what can help me to do statistics") so the description of the off-topic mark does not fit perfectly to this situation. The real reason is that this kind of questions *are about software* and not that they are not about statistics.
Comment: The criterion in the help for determining the topicality of such questions is "requires statistical expertise to understand or answer". I think in at least some cases advice about the appropriate choice *really does* require exactly that, presumably making it on topic. There's a previous question about interpreting the phrase [here](http://meta.stats.stackexchange.com/questions/1514/what-standard-should-be-applied-in-deciding-whether-a-question-requires-sufficie) (not that I'm claiming my comment is related to answers in that question, just pointing out its existence)
Comment: What about the fact that `R` tag is by a large margin the most popular tag on Cross Validated (CV)? If questions of how to use `R` are off-topic at CV, then what could be done? I am not sure how good `r-help listserv` is, but if people are looking for `R` help at CV so often, maybe `R` deserves a separate site on Stack Exchange?..
Comment: That's a reasonable position, @Tim, but I disagree w/ it. Once you are no longer asking about statistics, but about something that may help you to do statistics, where do you draw the line? I use my keyboard & mouse to help me do statistics, after all. My position is questions about statistics / ML / DM / visualization are on-topic here; all others are off-topic.
Comment: This is perhaps the most difficult long-term question on Meta and even higher-reputation members rarely agree exactly where the line should be drawn (although I seem usually close to @gung in voting). I've found myself increasingly noting that many questions don't belong on SO any more than they belong on CV. I'm tempted to suggest that almost no community wants many learner questions about software (is there a package/function/command to do X? why do I get ?) any more than we want to calculate means for people or check their arithmetic.
Comment: I can imagine a Q where the OP asks for a package, but what they really need (although they wouldn't know it) is to have some statistical concepts clarified. However, I don't believe I have actually seen such a Q.
Comment: @Glen_b, I strongly dislike that statement, which I think is ambiguous & leads to problems. My criterion has always been, *what does the OP need explained?*. Note that 'why is my ROCR code not giving me the ROC I wanted?' requires "statistical expertise"--no one w/o stat / ML expertise would know what a ROC is, but the Q is clearly a coding Q. I hold that Qs where the OP needs a statistical issue explained belong here, even if they are asking for code, and Qs where the OP needs code explained go to SO, even if no one w/o stat expertise would know what a ROC is.
Comment: @NickCox, there are 2 issues: (a) the essential nature of the line, & (b) where it lies relative to any given Q. I believe that most users on CV are more or less in agreement on (a) & certainly that you & I are. (b) OTOH is often a difficult judgment call; I'm not sure that you & I actually disagree there so much as some situations are truly ambiguous.
Comment: @RichardHardy, this is a contentious issue. There are many R Qs on CV--in fact I've asked 1 & answered ~200! So Qs w/ an R component are not necessarily off-topic. However, there are many fold more on SO (8k vs 82k), & much much more than that on the r-help listserv. I vote to migrate b/c I believe askers will get better & faster As there. The idea of an R specific SE has been raised several times; it didn't go anywhere (see: [What happened to the idea to start an R-specific StackExchange site?](http://meta.stats.stackexchange.com/q/1616/7290)).
Answer: I think that this would depend on the question being asked. If someone is looking for a data manipulation package like plyr for example, I would think that would be a SO question.
But if the question is more about how to implement a particular model in R, then surely this is straightforwardly a statistics question? R, as with any programming language, can be used for things other than statistics - I presume this is why general programming questions are referred away to SO. But if the question relates to doing statistics IN R, I would think that this fell within the purview of this site.
Whether there is a particular package that implements the model directly or it has to be implemented by hand probably shouldn't be used to discriminate which questions should go where. Equally, I don't think that model implementation questions should be removed from Cross Validated either, because that would reduce its usefulness substantially to practitioners.
The major factor to consider here is probably more around question quality and whether the person has made an effort to do their own research on the subject. If there is no evidence that they have made an effort, then the question probably contravenes other rules around question quality and can be closed on that basis.
Comment: You have, I think, a good point that lack of research effort is a key signal, but that is a criterion for down-voting, not for exclusion from the site. Otherwise a high fraction of learner questions with the flavour "I know nothing much about statistics, but" would not qualify here.  Similarly, the distinction between "data manipulation" (not suitable here, you say) and "model implementation" (suitable here) is in my view a long and smooth gradation. I don't have easy demarcation rules either; in my experience of this site software-related questions raise more difficulties than any others.