What was the intent for making Rem sacrifice herself for Misa?

Question: We know Light is clever and smart and almost devilish? But I don't understand why Light wanted Rem out of the way?
What was his motive and what would have happened if it went wrong?
Answer: Because Rem threatened to kill him should anything happen to Misa Misa. If he planned to use Misa Misa as a tool and perhaps sacrifice her eventually. He would have to get Rem out of the way.
Answer: Rem wanted to protect Misa and would kill Light if he let/caused Misa to die. Misa, however, was a good tool for Light and he could not kill her without raising suspicion towards himself.
Light also wanted L to die, but he could not kill him without knowing his real name. Rem could see everyone's name with her shinigami eyes, but would not kill anyone unless Misa was in trouble. So, Light put Misa in trouble and pressured Rem into killing L and Wastabi. As a result, Rem died and Light thought he had no more people in his way.
If Rem didn't kill L and Wastabi, Misa definitely would have been caught again and killed. There would have been a lot of suspicion towards Light, but he may have been able to talk himself out of it. If he did not, he would have died also. It was a gamble.
Answer: Misa Misa  was a useful tool but, with Rem always wanting to protect her and began to really care for her Light couldn't use her in anyway that would put her endanger for Rem would kill him the first chance she got. In order to use Misa and kill L he got Misa taken in and "endanger" putting the blame on L that he had done it. Doing that and edging Rem to kill him in order to save Misa since she was the only creature that could see L's real name doing this was killing to birds with one stone that kept getting in the way of Light's "good work."
Answer: What could've happened if it went wrong:
Rem betrays Light to save Misa:
See this genius answer: Why did Rem kill L?
Rem can talk to L and give L 2 options:

Option 1 (what she partially did): I kill you, Watari and the whole task force and you'll never catch Kira nor Misa, failing in every aspect of your investigation.

Option 2 (what she could have done before going for Option 1): I tell him that I can see who's the first Kira, and that the second Kira is Misa. But that as a Shinigami who's involved with Misa, I will not let anything happen to her, so I can either kill them all, or give them, in exchange for Misa's innocence), the name for the first Kira. If they refuse this deal, then they will have none (and go to Option 1).
Comment: She obviously couldn't do that because that will harm Misa either way lol, telling L Misa is the 2nd kira is the last thing could go wrong. And except for that I cannot see how you answered the question.


My Hard Drive has been Mysteriously Overwritten by Two Bad Partitions

Question: I have a problem - sometime yesterday, my hard drive appears to have been overwritten by something and then re-partitioned multiple times.
Disk 0 is the affected drive; it used to be my Disk E:, and it stored all my personal files, but it was not my boot drive for Windows 10. I have the most important of these backed up, and with TestDisk I can recover the data from the old partition, but I I'd like to get the whole partition back if possible and prevent this from happening in the future.
I have no idea how this could happen, but I can list off recent things I did to the PC, in this order:

Switched to Preview or Insider edition of Windows 10, to get Ubuntu bash running on my system.
Windows 10 did some kind of system-wide upgrade; I think the Anniversary Edition?
I installed Origin and the Battlefield 1 Beta on that drive.

SMART reports the drive is fine. The change happened at some point while the computer was up and running; the E drive just quietly was repartitioned and is now unreadable to Windows.

How can I go about attempting to repair and/or prevent this from happening to another of my drives? Should I attempt to mount the drive in a liveCD environment that can read linux FSes? I can find the old FS using TestDisk and recover files off of the partition, but because the partition type TestDisk autodetected was "none" I can't seem to restore my old (NTFS) partition.
Please help! Let me know if you need to know anything else about my system or the event.
Answer: There is no evidence above that it turned into a LINUX partition.
Ofcourse there is risk involved, but you could always boot a linux distro, getva root shell and use fdisk -cu /dev/xxxx (ie Linux mapping of that drive) and change the partition type for the bad partition  to ntfs (something like typing p(enter)1(enter)87(enter)w(enter) to change partition 1 to type 87 =ntfs and write the change to disk.
Comment: Sorry, you are totally right about that. The initial suspicion was that it was somehow related to the Ubuntu integration, but it turned out to be a false ID by TestDisk based on incorrect use of the program. I have removed that part of the title!
Answer: So I think I found most of the answer. This probably doesn't need a prevention listed, because I think it was kind of a one-off thing. The drive which was overwritten USED to be an old Windows 7 drive, but I reused it as a mass storage device without reformatting it completely; I just deleted all the windows files and such - this was possibly the source of the problem.
Later on, during my Windows 10 initial upgrade, I did notice the installer said I had two windows 7 installs present on my system; this wasn't true - I only had one, which I was replacing, on my SSD. My best guess for the cause of this mishap was that somehow during the upgrade from Windows 10 to Windows 10 Anniversary Edition, Windows 10 began to think that it needed to upgrade the other disk as well, and things got...borked.
TestDisk was actually for the first time not able to resolve the issue. I was stuck, since the correct partition structure was only detected when I searched for a "None" partition table type; TestDisk won't allow you to rewrite the table without a table type (understandably), yet I couldn't find a way to write the correct partition table because when I tried to do that, TestDisk told me the correct partition table was already in place. A battle for another time, I guess.
The solution ended up being MiniTool Partition Wizard Free, because for whatever reason its partition recovery tool was able to restore my old partition with no data loss. Indeed, I even found a highly questionable  Windows10Upgrade folder with some kind of 6gb .esb file in it which hadn't been there before, leading me down the twisted road to blaming the Anniversary Update for these shenanigans.
Now you all know, but really this is more like mysticism than science.


"soup" or "a soup"

Question: I am learning Duolingo English course, one sentence is we make soup with pieces of meat. and the other one is We make a soup with the roots. When should I use a?
Answer: This can be tricky when make is in the present tense. Let's say I regularly make three kinds of soup: taratino soup, squamil soup, and Droverly soup.
Let's also say that I put chicken in all three recipes. In that case, it would be fitting to say:

I make soup with chicken.

Now, let's add one more fact: I use fresh kale when I make my squamil soup, but neither taratino soup nor Droverly soup use kale. In that case, I can say:

I make a soup with fresh kale.

I think it's worth pointing out that, in this context, we are dealing with Definition #6 from Collins:

Now, let's move to the past tense. Suppose I made soup last night, and I used some orzo. I can say either:

I made soup with orzo last night.
  I made a soup with orzo last night.

There's no difference in meaning; they both mean the same thing.
Likewise, there's no difference when we use the present progressive tense:

I am making a soup with leeks.
  I am making soup with leeks.

That's because soup can act as a mass noun (so no article would be required), but it can also take an article, whereby a soup essentially means a batch of soup.
Comment: Isn't there something else going on in case of _the_ roots? It may be me, but "I use the whole plant: I make stew with the leafs, I deep fry the stalks and I make soup with the roots" does not sound as good as a version with "a stew" and "a soup".
Comment: @oerkelens - I agree, but there are other scenarios where omission of the article would be okay. For example: _"When my brother cooks, he only uses the greens, but I like to make soup with the roots."_
Comment: I am starting to realize it was a good idea I did not try to answer this, and also, this question could be interesting on ELU :)

"soup" or "a soup"


In a medieval city how large a market was needed relative to population?

Question: In a large medieval city fed by the agricultural product of the area, plus imports such as grains, spices, fish, etc. and also serving as a regional hub for the exchange of trade goods, what determined the placement and number of market locations in the city? How big was a market was needed relative to city population in terms of vendors and space?
Comment: Welcome to History:Stack Exchange. Thank you for your question; please consider revising it to be more in line with our community expectations. Like many other stacks, we expect questions to [provide evidence of prior research](https://interpersonal.meta.stackexchange.com/a/3227/1599). That helps us to understand the question, and avoids our repeating work you've already done. Our [help], and [other stacks](https://interpersonal.meta.stackexchange.com/questions/3224/how-do-i-write-a-good-question) provide additional resources to assist with revisions.
Comment: I'm voting to close this question because it lacks prior research, is too broad and unclear. Which region, period etc needs to be detailed, and prerequisites like [privileges](https://en.wikipedia.org/wiki/Town_privileges) examined, *before* a useful answer can be attempted.
Comment: You might look at [central place theory](https://en.wikipedia.org/wiki/Central_place_theory); I believe the theory has been discredited, but the arguments to support/refute it may be of use in refining your question.
Answer: You can get some information concerning the number of markets relative to population by looking at the Wikipedia page on Market Towns. One specific tidbit there might be of use to you (emphasis mine).

The primary purpose of a market town is the provision of goods and
services to the surrounding locality.1 Although market towns were
known in antiquity, their number increased rapidly from the 12th
century. Market towns across Europe flourished with an improved
economy, a more urbanised society and the widespread introduction of a
cash-based economy.2 The Domesday Book of 1086 lists 50 markets in
England. Some 2,000 new markets were established between 1200 and
1349.3 The burgeoning of market towns occurred across Europe around the same time.

This gives us some specific information on a specific time and location, 50 markets in England at the time of the Doomsday Book.  We can get some numbers on the population at the time of the doomsday book :

The total population of England in 1086 cannot be calculated
accurately from Domesday for several reasons: only the heads of
households are listed; major cities like London and Winchester were
omitted completely; there are no records of nuns, monks, or people in
castles. The population of England at the time of Domesday has been
tentatively estimated at between 1¼ and 2 million. However, these
figures are much lower than the 4 million people there are estimated
to have been in Roman times.

So if we do the math, we can get those 50 markets divided into the population across England in 1086 showing each market covered a population of 25,000 to 30,000 people.  This is oversimplification just to get a numerical 'ball park' figure, but interestingly it seems to match the figures provided in another answer by @Pieter Geerkens, which showed 5 markets in a city of 125,000 for one market covering 25,000 people.
You can look at the first quote and see that the distribution of markets changes quite a bit a little later in the middle ages (12th to 14th centuries):

their number increased rapidly from the 12th
century. Market towns across Europe flourished with an improved
economy, a more urbanised society and the widespread introduction of a
cash-based economy...Some 2,000 new markets were established between 1200 and
1349.

Running numbers on England again, but picking just at the maximum population estimates before the depopulation event of the plague, we find a population estimate of 6,000,000 having access to some 2000 markets, giving us one market per each 3000 residents. A major difference showing that variation in time and conditions, all still within the medieval period.
Answer: It's a bit late in the period, but this 1572 map of Antwerp, with a population that year of about 125,000 lists at least 5 markets in the legend:

Die Grote Marct. - The Big Market.
Centre, just north of the main church

Die Ossemarct. - The Ox Market.
Just inside the East Wall, between the two main gates

Die Peerdemar[ct] - The Horse[?] Market.
One block north of 14

Die Ve[e]marct. - The Cattle Market
Three blocks north of 13.

Die Vischmarct - The Fish Market
South of the main dock

Note that horsemeat is popular in much of France and the Low Countries; and both "Cattle market" and "Horse Market" may both be referring to two styles of butchery rather than to livestock. To my mind, livestock markets are more likely to be locate outside the city walls than inside - the former locations per force catering primarily to the households of the city.

This slightly later map of Amsterdam dates to 1593. It lacks the definitive legend, but there a couple of likely market locations visible upon inspection.

Many thanks to LangLangC for translation and spotting assistance.
Comment: Aiming for Dutch/Flemish, which do form a continuum with (esp low) German: https://www.antwerpen.be/info/5b0fb767a67793f7a36609a6/sociaal-centrum-veemarkt-antwerpen- https://nl.wikipedia.org/wiki/Veemarkt_(handel)
Comment: Last detail: place names most often have historic origin, so that all those markets were really where the live beasts were traded (as well as the meat (compare the reasoning for 18: meat house/butcher's guild hall rebuilding). And in those towns/cities live animals on sale were as much a common sight in the centre back then (certainly in medieval times) as it is now still in Wuhan… ;) 'Mainly just horses in the streets' is 'a bit' later than the map.
Comment: @LаngLаngС: Got it; that makes much sense on reflection. Great find with that Bredael painting of the Ox market!
Comment: The tendency is of course to push away the filthiest trades to the margins or even outside an ever growing city. There are a few books on that town available for free [example](https://lib.ugent.be/en/catalog/rug01:001873615), showing that just below the grote marct the vemarct once was, but got replaced for an 'egg market' (street still existing today "Eiermarkt") (not depicted, as a few others, so consequently, the map only depicts the biggest selling centres?)
Comment: ['Vemarct' is genral livestock](https://en.wiktionary.org/wiki/vee#Dutch) & ['Ossemarct'](https://nds-nl.wikipedia.org/wiki/Ossemart) /  [ox market](https://en.m.wikipedia.org/wiki/File:Peeter_van_Bredael_-_The_Old_Ox_Market_in_Antwerp.jpg)
Comment: @Random: No offense taken.


How is the air traffic managed at a field with many privately owned aircraft?

Question: As example "Spruce Creek". Many residents own private aircraft and can fly anytime they want. Do they have an separate air traffic controller? How is this high amount of air traffic managed?
Comment: While a fairly busy GA airport, Spruce Creek only has around 70 aircraft movements per **day** - that's less than Heathrow has in **an hour**. It's really not that big a deal
Answer:
How is this high amount of air traffic managed?

Air traffic is managed at many levels by many people and is heavily dependent on the airports specifics when it comes to GA. First off not every airplane in the sky is talking to or under control of ATC, for that mater in some airspaces you don't even need a radio on board. The following is pursuant to US FAA regulations, other countries may handle air traffic differently.
The first level of traffic management is the pilot, its the job of every pilot to "see and avoid" other traffic, this goes for both commercial and general aviation traffic. Even if issued a command by ATC you can deviate to avoid an emergency (i.e. hitting another plane).
The next level of traffic management is the various FAA regulations on both ground and air flight operations. These regulations (like traffic rules) are laws and must be followed. They are designed to mitigate traffic in certain areas and will also force you in some areas to at least be on the radio with ATC (e.g. class B airspace). You can read up on the full regs here and you will find most of what you are looking for under "flight rules". Much of the country (below 18,000Ft and above 1200ft generally) is actually class E airspace which does not require ATC communications. This is where most GA traffic lives although small turbo props and the boldest of piston singles can now make it into the levels, most GA planes cant. There are also pre set cruising altitude intervals for VFR and IFR traffic to help keep separation.
Above that you will have ATC who is controlling all IFR traffic, traffic in Class A, B, C, and D airspace and will provide limited radar services to VFR traffic when load permits. When flying under VFR (depending on where you are) you may not need to ever talk to ATC. It is possible to depart an un-towered airport in class G or E airspace, fly around and return with out ever having contacted an ATC facility.
On the ground control depends on the airport. At an uncontrolled field (lots of smaller general aviation airports) the pilots decide. Taxing around is much like driving a car and there are pre determined radio calls to enter the traffic pattern and use the active runway. At a towered airport ground control will monitor and control the flow of traffic on the ramp and the tower will control the traffic from the runway thresholds until the plane departs its airspace.
The only exceptions to the rules here in the US are 5 airports (LaGuardia, Newark,  O'Hare, Ronald Reagan National, and John F. Kennedy) which are subject to the FAA's high density airport rules (specific to the airports) generally speaking the operations are the same in terms of how ATC will handle a given aircraft but departures and arrivals are limited and must be reserved ahead of time.
Another note on IFR operations, ATC will treat all planes the same and will only give priority to a plane in an emergency. Your little Cessna 172 on an IFR flight will receive the same services as a 747 30,000ft above you.

Do they have an separate air traffic controller?

No. See above but for what its worth the big planes contact the same ATC facilities as the little guys.
Spruce Creek
For what its worth Spruce Creek sits under a Class C shelf as you can see on the sectional here.

Departing from RW 5 and staying below 1200 puts you right between the Daytona Class C and New Smyrna Beach Class D so you may find your self contacting ATC on departure depending on your route you are somewhat boxed in there. Even departing from 23 you may find your self contacting Daytona approach to punch into the Class C there. Technically you can get out of there with out contacting ATC but you may find your self needing to depending on the situation.
Answer: At untowered airfields, like Spruce Creek there is no "ATC," the pilots self organize.
Generally speaking, the way this works is that as you approach you announce your arrival on the common frequency used by the airfield, 122.975 in the case of Spruce Creek. This frequency is listed both on aeronautical charts and in the FAA airport directory. So, for example, you might say something like this:
Spruce Creek, November niner seven six five four, Cessna one seven two, three miles out on one eight zero, request runway, Spruce Creek
Other pilots at the airfield will hear you and react appropriately. As you get closer you repeat your announcement and intentions. For example, the pilot might say:
Spruce Creek, November niner seven entering downwind for two three, traffic in sight, Spruce Creek
If the traffic is so heavy that you cannot enter the landing pattern, then you bear off and do a circle or racetrack pattern away from the airfield and try to approach again later. Often registrations will be abbreviated in various ways. For example, instead of saying "November niner seven six five four" every time, if you are the only Cessna, you can just say "Cessna", and the other pilot, say it is an Archer or Cherokee, will just say "Archer" or "Cherokee".
Answer: ATC is responsible for all aircraft, not only commercial IFR, but also general aviation IFR and VFR. Some airports may have restrictions (EDDM - Munich does not accept VFR below 2to MTOM), but in most other cases VFR general aviation is sequenced between IFR commercial.
Enroute VFR traffic may not necessarily be on the same frequencies, some countries offer own Flight Information Services for VFR traffic, where separation is not required, some airspaces that are shared require separation and will have both aircraft on the same frequency.
In the case of Spruce Creeks, there is a listed CTAF frequency, on which aircraft will be in the vicinity of the airfield. Leaving the airfield vicinity, they will join the regular frequencies for the services they require enroute.
Comment: @NitinG It's entirely possible that they are paying a flat fee for that airport services. And flight plans are not required for everything, a local VFR flight might possibly be conducted without filing a flight plan. Depends on the airspace structure and jurisdiction.
Comment: Do they need to get their  flight plans submitted before flying and i think they must pay for the ATC services as well??
Comment: @NitinG ATC services in the US are paid for by general taxation, there are no direct fees (usually called "user fees") like there are in many other countries. But there are often *airport* fees (landing, parking, hangars etc.) to pay, and I assume that in a private community like Spruce Creek the owners would pay for general maintenance too.
Comment: "ATC services in the US are paid for by general taxation"
Partly that, but also in large part by fuel tax on each gallon of fuel purchased.
Small local airports, like mine in Massachusetts, charge monthly rent for a parking spot (tie-down outside) or a higher rent for a lockable hangar. Fuel and airplane maintenance is on top of that of course. No ATC, we self announce and practice See and Avoid. Mandatory ADBS-Out is required for all plane by year 2020 (there might be some small number of exceptions) and planes with ADSB-In will have a display to provide position alerts of the nearby ADSB-Out


Buying extensions

Question: I want to know, we are updating to Magento 2, do we need to pay for the extensions we bought on magento 1 if they are available on magento 2?
Answer: TL;DR: This does not depend on magento. It depends on each extension provider.
Long version:
Magento 1 and 2 are 2 different platforms.
And so are the extensions with the same functionality.
I guess it depends on how the extension providers want to distribute their modules for Magento 2.
Most likely you will have to pay for the new magento 2 modules unless the extension provider has a policy to give you free upgrades to M2 modules.
Also, keep in mind that some of the extension providers might not have a M2 equivalent for an M1 extension.

Buying extensions


When to use exposure lock with spot metering and when to use exposure compensation?

Question: I was taking a snap on a sunny day, and the subject was in front of light source and subject was shadowed out(or blackened) In this case is it better to use partial/spot metering mode (zoom in to face lock exposure zoom out, reframe, click) or increase exposure compensation. Or are both the same ? If not what's the difference between these two approaches?
Comment: possible duplicate of [When best to use Multi-Zone/Matrix, Spot, or Center-Weight?](http://photo.stackexchange.com/questions/4687/when-best-to-use-multi-zone-matrix-spot-or-center-weight)
Comment: Also see [What situations are best suited for spot metering?](http://photo.stackexchange.com/questions/597/what-situations-are-best-suited-for-spot-metering)
Answer: Short answer: what you want to do is to switch to spot metering mode, place the face of your subject in the exact center of the frame (no need to zoom in unless the subject's face is really small in the picture), press exposure lock, reframe and take the shot - now the subject will be properly expose and the background will be over-exposed.
Longer explanation:
Metering modes:

In the "smart" metering mode (Canon calls it evaluative, Nikon calls it matrix) the camera looks at the entire image, apply some magic formula and decides on a setting that work for the entire frame, this is great but if there's something very bright or very dark in the picture it can throw the exposure off since the camera doesn't really know what the impotent area is and what kind of picture you want to take.
In spot metering mode the camera only looks at a tiny area in the center of the frame and decides exposure based on that, this let you decide what is properly exposed (and let the rest of the picture's exposure falls where it is relative to the area you meter on).
The other metering modes are not nearly as useful as those two and I suggest not to use them unless you have a specific need.

Exposure compensation is a different but somewhat related concept, after the camera decides what the "right" exposure is based on the metering mode you can override it and tell it the picture should be brighter or darker - this is useful if whatever you are spot metering on is not medium brightness or if you just want to make the picture brighter or darker (just because you think it makes it look better).
And finally, there's manual mode, in manual mode you set the exposure in absolute terms and not relative to the camera's decision - it sounds a little scary at first but usually in difficult lighting it's just simpler to switch to manual mode and set everything yourself (you can usually see the camera's metering when in manual mode - so you can set your initial values based on the camera's meter and then you don't care if something bright or dark suddenly crosses your frame or if your subject is really in the spot metering area or not and if your exposure lock is on or off)
Comment: @2-Stroker ... same goes for people, people with darker skin tones need negative exposure compensation to look like they are in real life, people with very light skin need positive exposure compensation, the exact value depend on the difference between the skin tone "brightness" and 18% gray
Comment: So even after choosing spot metering if the subject is dark, I should increase the stops on exp compensation right ? But in spot metering since I am zooming in to fill the frame with face shouldnt it adjust shutter speed automatically to get proper brightness ? Reason am asking is I end up taking 4~5 extra trial and error shots while using exposure compensation, I thought by using metering mode I could get the shot in one click.
Comment: @2-Stroker - If you are photographing a white piece of paper, and you spot meter on the paper it will come out gray because the camera always thinks you are metering on medium gray objects, to make it white you have to set exposure compensation to +1.66 or +2 (I blogged about it [here](http://www.usefulphototips.com/2012/01/25/photographing-a-white-subject-on-a-white-background/) and [here](http://www.usefulphototips.com/2012/02/01/photographing-a-dark-subject-on-a-dark-background/) )
Comment: Many thanks for those links, didnt know about that.
Answer: Either of these approaches will work fine. You should use whichever works more naturally for you.
With the spot metering approach, what you're doing is looking for something which has the tone which you would like to make the middle/neutral key for the image. That's what the metering system does. If you want the object you meter from to be brighter or darker than middle-gray, you would combine this with positive or negative exposure compensation.
Your workflow when using exposure compensation in other metering modes will depend slightly on the mode used and your knowledge of it. With center-weighted or full frame average metering, you can fairly easily judge if the scene as a whole is brighter or darker than average, and particularly whether your key subject is brighter or darker than that average. Then, you use exposure compensation to tell the camera what you want.
With matrix metering (also called "evaluative" or "zone" metering), the camera tries to be smart. It will recognize patterns in the scene and automatically decide if a higher or lower exposure is appropriate. A very common one is recognizing a bright strip across the top of the frame as the sky, and effectively ignoring it while exposing for the rest of the frame. Until you become very familiar with what your make and model of camera will do in a particular situation, it's hard to know when compensation will be wanted. Here, you can take test shots and watch the image histogram, eventually learning to "feel" what the camera will do. Usually, one learns to either a) trust one's camera's matrix metering and only apply EV compensation in particular, known circumstances where it gets it wrong (for example, a snowy landscape), or b) not trust it at all, and use center-weighted instead.


Query on the HHL Algorithm in the Qiskit Aqua Library

Question: This is a question regarding the Qiskit Aqua package. I have been studying HHL algorithm from QISKIT textbook and after understanding the math I finally got to the code part, I am having a hard time understanding what is going on. I know how to write code in order to create gates and making a Quantum Circuit, but I can't find good resources for Aqua. If you guys could point me to some examples or something helpful, it will be greatly appreciated. I have also posted a screenshot where I got confused.
Answer: I'd suggest the tutorials, they are always up-to-date and running:
https://github.com/Qiskit/qiskit-tutorials/tree/master/tutorials.
Aqua specific tutorials are e.g. in the chemistry, finance or algorithms subdirectories.
(In fact, this particular example that you posted from the textbook is being refactored, as it is a bit confusing indeed!)
Comment: Thanks, they seem to have a lot of stuff that will be helpful


Why do you have to use copy_to_user()/copy_from_user() to access user space from the kernel?

Question: I'm curious, because I got a kernel panic after trying to access memory directly (then I found these functions).
Answer: These functions do a few things:

They check if the supplied userspace block is entirely within the user portion of the address space (access_ok()) - this prevents userspace applications from asking the kernel to read/write kernel addresses;
They return an error if any of the addresses are inaccessible, allowing the error to be returned to userspace (EFAULT) instead of crashing the kernel (this is implemented by special co-operation with the page fault handler, which specifically can detect when a fault occurs in one of the user memory access functions);
They allow architecture-specific magic, for example to ensure consistency on architectures with virtually-tagged caches, to disable protections like SMAP or to switch address spaces on architectures with separate user/kernel address spaces like S/390.
Comment: @ComtriS: I'm not sure what you mean by "allowed", but if you're getting a kernel panic then either you must not have checked the page permissions or not disabled some architecture-specific protection.  Note that checking the page permissions and then accessing the pages is going to be racy.
Comment: is it only for security check (including checking mmu table entry is valid)? if I use just memcpy instead of copy_from/to_user function, can it just run ok in some cases? I want to know if the copy_from/to_user contains address translation(using software) function.
Comment: @ChanKim: It depends on the architecture (see the third point in the answer).  For example, SMAP is going to stop you on x86-64 with a modern processor.
Comment: yes, I can understand the STAC, CLAC commands to access user space. but isn't  the user address 'value' virtual address handed from user process (different address space)? how can the kernel access the memory area pointed to by the 'user virtual address' with its kernel mmu table? shouldn't there be address 'value' translation using user process's page table? I looked into the kernel source but it's a little complex for me to follow.. :)
Comment: @ChanKim: Some architectures (e.g. S/390) *do* use completely separate address spaces for the kernel and user space.  However, on others like x86-64 and arm the user addresses for the current process are mapped into the kernel page tables (on x86-64, the kernel address space has all the upper bits of the addresses as 1, and the user part has those upper bits as 0). Without the Spectre/Meltdown countermeasures active,  the page table isn't even changed between kernel and user mode - it only changes when switching between processes.
Comment: ah that was the case. It was a very important fact. Thank you so much.
Answer: Those functions check whether the memory is accessible. If the kernel attempts to directly access a non-accessible address, it will panic. But in addition, the kernel and user address spaces may be different ... a valid address in the user address space may not be accessible in the kernel, and if it is it may point to kernel stuff rather than user stuff.
For more details, see  https://developer.ibm.com/articles/l-kernel-memory-access
On a historical note: once upon a time there were operating systems in which the kernel was designed to be part of the user address space, and in those systems the kernel could always access user space directly. There may still be such systems, but modern linux isn't one. The user process's memory being part of the kernel address space is always an option for the implementation, of course, and that can make copy_to_user and copy_from_user a lot faster.
Comment: Actually, on most architectures modern Linux *does* use a unified user/kernel address space - for example x86-64.  There are exceptions, like the 4G/4G configuration option for the x86 architecture, but there is significant overhead.
Comment: the link to ibm.com has changed to : https://developer.ibm.com/articles/l-kernel-memory-access/


What prevents an arbitrarily long or cyclic cell relay in the network?

Question: I'm sure there are mechanisms in place to prevent this, but what stops someone from making a circuit that is extremely long or cyclic, as to cause a DOS in the network?  If possible, this would allow an advisory to amplify their bandwidth significantly and cause a DOS.
Answer: As covered in Proposal 110: Avoiding infinite length circuits that was implemented in July 2008, Tor hinders the creation of arbitrarily long circuits through the use of relay_early cells. Only relay_early cells may contain requests to extend circuits, and no more than eight relay_early cells may be sent over a given circuit. Intermediate relays pass on the same type of cell (relay or relay_early) that they receive, as long as those cells are legitimate. But they tear down circuits when they receive a normal relay cell that contains an extend request, or when they receive more than eight relay_early cells.
While adversaries can still create arbitrarily long circuits, using relay_early cells increases the cost of doing so. They would need to specify a malicious relay at every eighth hop. Given that, adversaries might as well just use each of those malicious relays to create an eight-hop circuit.
However, as discussed in Ticket 1038, using relay_early cells introduced a problem with accessing hidden services. Hidden services were receiving relay_early cells, and then tearing down circuits. To prevent that, an exception was created, which allowed hidden services (and clients) to receive inbound relay_early cells without tearing down circuits.
As discussed in Tor security advisory: "relay early" traffic confirmation attack..., a malicious-relay attack on hidden services began in January 2014 that exploited the relay_early exception. In response, Tor 0.2.4.23 was released, which removed the relay_early exception for hidden services and clients. Both now follow the relay_early policy: they drop circuits when they receive an inbound relay_early cell, and log the errors.
Comment: OK, so my question then is how exactly does the relay early cell prevent infinite circuits?  I've read that blog, but it doesn't answer my question.
Comment: Did you read https://gitweb.torproject.org/torspec.git/blob/HEAD:/proposals/110-avoid-infinite-circuits.txt?
Comment: @fuzion24 Thanks. I've created a real answer. Please comment if I've misstated anything.


html or javascript code injection in sharepoint

Question: How safe is SharePoint with Code injection (HTML,Javsscript, SQL) because for example the Announcements list allows to enter embed Code in the TextBox. Can this be a threat or SharePoint is already protected against Code injection ?.
Does anyone have a sample which we can test for Code injection ?. It is very important for our Client.
Thank you.
Answer: When using the object model you won't have to worry about SQL Injection as SharePoint handles that for you (it uses parameterized stored procedures internally).
If you enter HTML or JavaScript code into a textbox, SharePoint will store the code as text, you don't worry about the security issue.
And you can go to Web.config to set SafeAgainstScript stops XSS attacks via form fields.


mapping naked domain (www.domain.com) to static website which is saved in s3

Question: I am developing an web application, I recently purchased the domain from godaddy.com and the domain is use google apps, for email, calendar docs and other services as well.
Now I just need to show that" my site is under construction" I have a static page which is put on S3 now I need to map "www.mydomain.com" to that static page which is stored on s3. I am kinda of newbie/novice to this so kindly help me.
Answer: The best solution I can think of is point an A record in your DNS to the elastic IP from AWS. This has the advantage that it never actually hits your host - it goes straight from the DNS to AWS, so it should be faster as well.
Answer: Three simple steps for this:

Your S3 bucket must be named the same as your desired subdomain: "www.domain.com".
You need to setup a CNAME record to in your DNS to point your subdomain to the S3 bucket:
       CNAME  www.domain.com  ->  www.domain.com.s3.amazonaws.com
You need to make you splash page the "index document" for the bucket so that it will open by default. (See: http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?IndexDocumentSupport.html)
Answer: Not sure I'm totally following, but you could do one of two things as a hack I think...
1) If you know the correct URL you could redirect from your domain to the other URL (this may be bad for traffic later though when your domain rolls to the correct "live" one)
2) You could set up a page on the new domain with a big iFrame that loads the other URL. The down side here is all the sub pages will not have updated URLs in the browser...
This may be closer to the solution you're looking for though...
https://stackoverflow.com/questions/570890/amazon-s3-url-rewrite


Is converting my Apps to .Net a really good idea?

Question: All my applications are developed in Native Code. I am hesitant to move to .Net because of all the negatives that I hear, such as:

Slow response time
Lock-In into Windows
Dependance on huge .Net run-time that makes installation a pain and slow as well.

etc. etc.
Your advice will be much appreciated.
Comment: If your current applications are native code, surely you're _already_ locked into Windows? Developing for .NET would give you _less_ lockin because of the existence of Mono etc.
Comment: Its can compile for many platforms.
Answer: Don't do that just for the sake of converting.
If you have some other technical reason to convert, then you should consider it, but be aware that it is not a small change, especially for larger projects.
EDIT: I also want to add that it would be better if you start some small project in .NET, just to know what to expect, and later decide is the conversion of existing projects valid option.
Answer: All three of your points are at least slightly true, although '1' is extremely vague - trivial .NET apps do tend to have longer startup time than native ones - perhaps that was what you meant?
In some circumstances Mono is a mitigation for point '2'.
Point '3' has certainly been addressed disgracefully slowly by MS, but I think they're getting there gradually, and the general improvement in Internet speeds mean people care much less about a few 10s of Meg than they did 5 years ago.
For me the biggest problem has been that almost everything about programming in C# is so much nicer than C++ (and I was a hardcore C++ person, with a shelf of Meyers and Alexandrescu books), that when you have to go back to C++ it feels like a cold shower.
Answer: Slow response time is probably misguided.  You are basically locked in to windows (except for Mono, which isn't mature), and you are dependent on the runtime.  That said, the runtime is usually installed on most systems already (though you'll have to make sure and offer a way to install it if this fails).
My question is, why switch?  If you have native code already, the porting effort is going to be a pain.  Your entire development team will need to learn the new .net language as well.  You need some steep advantages for switching in order to overcome the hurdle associated which switching to ANY language, much less .net.
Answer: It depends on several factors.
Does your application NEED to be rewritten?  How long will the advantages of .Net take to offset the cost of rewriting? Is Windows lock-in a problem for you?
.Net is a great platform, but it's not for everyone or every project.  I will say that the run-time issue was a bigger deal when .Net was new, at this point that has become rather trivial IHO.
Answer: Whatever about points 1 and 2, I wouldn't worry much about the .NET runtime - I rarely come across a machine these days that doesn't have it installed.
As for slow response, I have not had this experience. I think you can write a slow unresponsive app in any language. .NET is not the worst by a long shot, and using it has huge benefits for a developer.
As a rule though, I never redevelop something without a really solid reason. It may sound like a great idea to have your app updated to the latest and greatest, but very often results in a big loss of time for very little gain.
Answer: There is probably no compelling reason to re-write your applications.  The performance and smaller memory footprint will be an advantage of the apps on an on-going basis any any productivity gain will probably be far outweighed by the cost of porting.
You may get some mileage from switching to .Net for new applications.  Compared to C++, it will be more productive, at the expense of the runtime dependencies, increased memory footprint and some performance hit.
You also have the option of doing hybrid systems where you put a .Net front-end on a back-end written in C++ for speed or more control over memory consumption.  Memory consumption is probably the biggest one for me.  Having experienced the joys of using large managed-code applications (Oracle Warehouse Builder and BIDS) where the application has nearly half a gigabyte of memory in use, performance of these applications is diabiolical, even on a high-ish spec modern PC.
In this case controlling memory usage (and associated CPU cache thrashing), timing of garbage collection and more parsimonious data structures would have been a performance win.
Answer: The overhead of switching to any different development language or framework is quite high. I wouldn't do it until all of the following are true:

A significant number of your customers ask for it.
You have the development skills to do the switch.
You have good knowledge and documentation of your current product.

So this isn't related to .NET specifically. But assuming that you do decide to switch (and to .NET), I wouldn't worry about slow response times or availability of the .NET runtime. Neither has been a significant problem with my B2B app.
But Windows lock-in would definitely be a big issue if you don't want that.
Answer: If you're satisfied with native code and the decision is yours why move then?
Personally, I don't miss my days of C++ (MFC, COM, etc. really didn't do a lot for productivity imho). I find that .Net and C# offer a nice mix of tools and features. I can easily build Windows apps that actually look and feel like regular Windows apps.
I'm also delighted that C# offers an interesting mix of OO and declarative programming that I like. The framework is not complete, but there's a lot and features are still being added.
Probably the most interesting part of .Net is the increasing number of different language that target the platform. I welcome the addition of IronPython and IronRuby, which as I understand it will become first class .NET languages with the next release of Visual Studio.
Answer: Your application shouldn't be noticeably slower, however if you leave too many objects on the finalizer queue the GC can cause momentary breaks in execution (the .Net GC isn't async). Technically .Net should be as fast as native code, but I have read a few times that it isn't: but at the same time it's only marginally slower (relevant only, as they say, in academic or real time situations).
As for the longer startup time you can ngen your assemblies. This pre-compiles the assemblies into native code so you don't incur the cost of a JIT compilation when a method is accessed for the first time (remember, JIT only compiles the first time a method is invoked and never again while the application is running).
I don't think the .Net runtime should be a problem: especially if you target .Net 2.0. Windows XP SP2 came with .Net 2.0 so any responsible customers shouldn't have any problems.
And once they have the framework on their PC the programs you compile are TINY (it's actually depressing when you write 1000s of lines of code only to get a DLL that is less than a meg). If you use one-click deployment the cost of updating is also pretty small (if you are disciplined and shell functionality out into appropriate assemblies).
Answer: There is a sense in such convertation if you have a great amount of valuable C++ code. Using Microsoft C++/CLI you can make a .Net wrapper-class(es) around your native code and sell this library to other .Net developers ;)


Stationary Process Ergodicity

Question: Can you give me an example of a stationary nonergodic stochastic process that is time continuous?
Answer: Let $X_0$ have a Bernoulli$(p)$ distribution, $0\lt p\lt 1,$ and define $X_t=X_0$ for all $t.$

It is stationary because all finite-dimensional joint distributions of $(X_{t_1}, \ldots, X_{t_k})$ are time-invariant.
It is time continuous because all realizations, being constant, are (obviously) continuous.
It is not ergodic because any realization, being constant, does not display the full statistical properties of the process.  E.g., if you were to estimate $p$ from any realization the estimate would either be $0$ or $1,$ neither of which will equal $p.$

OK, maybe this seems too trivial to be of interest.  But it does capture something essential, as you can see by generalizing it.  For instance, let $(X_t)$ and $(Y_t)$ be independent processes that are "time continuous" in any sense you like, but with different marginal distributions.  Let $U$ be an independent Bernoulli$(p)$ variable.  Use it to select which process is realized by defining
$$Z_t = UX_t + (1-U)Y_t.$$
The same reasoning as before shows this is not ergodic (no realization exhibits the statistical characteristics of the process) but it is stationary when both $(X_t)$ and $(Y_t)$ are and, because its realizations are either realizations of $(X_t)$ or $(Y_t),$ it is as continuous as both of these component processes.
Comment: I don't understand this part about any realization being constant, so it is continuous? Do you mean that any two realizations can be either 0 or 1 and that makes it continuous? Also, about the last part, the estimate would basically be the realization I get, but the expected value is p?

Stationary Process Ergodicity


How can I decrease the brightness of these BA-15 LED bulbs

Question: I'm looking at these LED replacement bulbs for the interior of my sweet conversion van. I'm looking for a more efficient alternative to the BA15 bulbs that are in there already. These bulbs appear to be really bright, and I can't seem to find a lower lumen LED light in warm white. I'm wondering if it is possible to unsolder or intentionally damage some of the LED panels to decrease the brightness of the overall bulb, or if that will disrupt the entire bulb.
Comment: A simpler solution would be getting a different bulb. There are shorter ones with the same base. Or use an led panel with a modular base.
Answer: You could wire a resistor in series with the base. The lamps are claimed to be 2W so they should draw around 170mA from the 12V bus. Try about 10-50 ohms 1W to get the brightness you want.
Of course you will no longer be able to safely install an incandescent bulb, in fact doing that could cause the resistor to get dangerously hot. You could add a small resettable fuse (polyfuse) to prevent that situation.
As a bonus, the lamps should last much longer, especially in a warm climate. They are typically driven to within a millimeter of their lives because that saves the manufacturer money.
Comment: not sure I understand the incandescent bulb comment, you are saying that if I modify the the actual light, correct? also wont that create allot of heat?
Comment: I'm saying if someone later on, perhaps years from now, removes the LED bulb and puts an old-style bulb in there, the resistor will get really, really hot. It's a potential hazard because the socket remains compatible and if someone looks up the bulb type they'll find the incandescent. The resistor will not create any more heat than was there before- it will move some of it from the bulb to the resistor, but the total will be **lower**. This is not the same as putting a parallel resistor in there to fool the computer as is sometimes necessary. The resistor is in series.
Comment: A diode or two would work as well.
Answer: These assemblies have 18 LEDs on them, which I guess are connected in series of 3. All series are in turn connected in parallel. Desoldering 1 LED will disable the whole 3-LED block.
Try desoldering one of the LEDs and test to confirm.
Comment: No! but actually these bulbs are exactly what I was looking for
Comment: So in theory, if I desolder one of blocks of 3, then it should not effect the performance of the bulb, correct? Am I also correct in assuming that because each board is 3 chips in series and it's a 12V system, that each individual chip is 3V
Comment: @user379468 if you desolder the whole block with 3 LEDs on it, you'll compromise the assembly mecanically. Those light are held together with nothing but solder blobs.
Comment: The original bulb was 75 lumens, this bulb is 350, was thinking of just desoldering all three of the side mount LEDs and re soldering the top circular board. This might seem crazy, but I cant find a lower lumen replacement bulb anywere
Comment: @user379468 BTW, have you considered bulbs like [these](https://www.amazon.com/LEDwholesalers-Contact-Bayonet-Water-Resistant-1429WWx6/dp/B003TKI4VU/ref=pd_sim_263_10?ie=UTF8&psc=1&refRID=R5QEP8KQXT0HZE9Y4C81)
Answer: What you likely have here are 6 strings of 3 LEDs connected in parallel.
If you disconnect one set of 3 that should work.
If there were an LED driver then the current would be diverted to the other 5 sets.>
At this price point I am doubting there is a driver.
Each panel is likely independent of the others
Remove one LED from one of the panels.
I'm willing to bet only that one panel goes out and everything else will be fine.
If it dies then dissemble it to see what's under the hood.


Creating a virtual monitor (the display device)

Question: I raised a question here but realized I was going the wrong direction. I need to create a virtual monitor (really just the space in memory) that is large enough to fit a website, that would normally span several screens. Is this possible in any language? I tried Java, but failed miserably so far. I don't expect this to be easy, any pointers would appreciated.
I'd imagine the OS and the video cart would have to told in somehow that there's a third monitor.
Answer: Use any Virtualization tool (VirtualBox, VMWare, etc). Create a Windows (XP/newer) virtual machine, and you can attach any number (well, at least up to 64) virtual monitors. All these virtual monitors will open up as separate windows when you start the VM, and you can drag and drop between these windows.
Answer: For windows, check out: http://virtualmonitor.github.io/  Right now, it only supports windows 2000 - windows 7, but the developer is looking for help with windows 7 - 8.


Using an App to Invite a User to a Private Slack Group Through the API

Question: This is a smaller piece of a larger program, but to zero in on this specific issue, I've been having quite a bit of trouble recently setting up a program in python using the slackclient module that can invite a user to a private channel (called groups in the API). The program has 2 tokens, one for the bot and one for the actual app.
My issue is that while I can invite the bot to the private channel it should be inviting people to, bots can't have the required scopes to do so. If I switch over to the app token which does have those scopes, it can't complete the operation because apps can't be invited to a channel.
The documentations for this API Call can be found here.
This is the invite command I'm using:
<code>SlackClient(slack_token).api_call("groups.invite", channel='GXXXXXXXX', user='UXXXXXXXX')
</code>
While the bot can access the channel information, attempting to invite someone with the bot returns this error:
<code>'error': 'missing_scope', 'provided': 'identify,bot:basic', 'ok': False, 'needed': 'groups:write'
</code>
Switching to the app token returns this error:
<code>'error': 'channel_not_found', 'ok': False
</code>
Am I missing something here? Or is it intentional that apps not be allowed to invite users to private channels at all?
Answer: The reason this does not work is as follows:

Using the bot token you get your first error. groups.invite does not work with the bot token in general. so you need to use the user token for this API method.
When using the user token you get the 2nd error, because the user that installed your Slack app is apparently not a member of that private group. So he can not invite another user to it


Generalization of the Riemann rearrangement Theorem

Question: Let $(X, \| \cdot \|)$ be a Banach space and $(x_n) \subset X$ such that $\sum_{n} \|x_n\| = +\infty$. Is it true that for each $x\in X$ there is a bijection $\phi :\mathbb{N}\to\mathbb{N}$ such that $\sum_{n} x_{\phi(n)} = x$ ? I believe that inductively this can be proven if $X$ is of finite dimension. But what about higher dimensions?
Comment: You (at least) also have to assume $\displaystyle\sum x_n$ to be conditionnally convergent. But still, I don't think it holds : pick $X=\Bbb{R}^2$, pick your favourite conditionnaly convergent not absolutely convergent series $\displaystyle\sum x_n$, and your favourite absolutely convergent series $\displaystyle\sum y_n$. Then the sequence $(x_n, y_n)$ would be a counterexample because no matter how you rearrabge the terms, the sum of the second coordinate will always be $\displaystyle\sum_{n=0}^\infty y_n$ (if the limit makes sense)
Comment: Some references to literature related to some results on rearrangements of series in Banach spaces are mentioned in
[this answer](https://math.stackexchange.com/q/1912711#1912717).
Answer: Your conjecture fails for trivial reasons.
Suppose $X$ is just $\mathbb R^2$ with basis $\{x,y\}$.Take the standard conditionally convergent sequence of real numbers $a_n = (-1)^nn^{-1}$ and consider the sequence $v_n=(a_n,0)$ of vectors. By Riemann's theorem we can for any $r \in \mathbb R$ rearrange the sequence to make any $(r,0)$ the limit. But we cannot for example rearrange to make $(0,1)$ the limit.
Exercise: What condition can be placed on the series of vectors to make the rearrangement theorem hold?
Comment: No coordinate-sequence is absolutely convergent would be my first guess
Comment: @Kps Look at $\frac{(-1)^n}n\, (1,1)$. If you rearrange you will never get anything that does not lie on the diagonal of $\Bbb R\times \Bbb R$.
Comment: Let $S\subset X^*$ countable, such that the span$(S)$ is dense in $X^*$. If
$\sum x^*(x_n)$ converges, while $\sum |x^*(x_n)|=\infty$, for all $x^*\in X^*$, then for every $x\in X$, there is a rearrangement $x_{j_n}$ of $x_n$, such that $\sum x_{j_n}=x$.


Any way to change PDF from Portrait to Landscape without rotating it?

Question: It drives me crazy that all books and papers I have to read are in portrait mode, yet my screen is in landscape mode. Is there a possibility to change the layout of a PDF from portrait to landscape? I don't mean rotating it, since then it would be impossible to read, I mean rearrange the objects on the page or even chop a portrait page into two halves and putting them next to each other?
Comment: I have an external monitor in portrait orientation just for this problem (as well as for editing code and displaying web pages which are often more usable in portrait). On my desktop system I use a Dell rotatable monitor I bought used off eBay and on my laptop I use a Asus portable monitor resting on a plate stand also bought off eBay. A worthwhile setup if you can afford the desk space (and money!).
Answer: No, this is not how PDF files are designed. They are designed to mimick a paper print copy. Thus, flow of the content and layout is static.
Other formats such as epub exist that can adapt layout of the content to changing dimensions of the screen/window.
Comment: That was the current state of PDF about 15 years ago!
Comment: As @MaxWyss mentioned, this situation has not changed in decades. The problem is, it should be some possibility to just cut a page in half, as you'd cut an image, and paste them side-by-side.
Comment: @Qubix Actually, I was referring to the first sentence of the message…
Answer: If the PDF has been created accordingly (as a "structured PDF"), and the PDF viewer is capable to do it, you can switch to the "Reflow view", which does reflow to the size of the viewing window.
It may be that only the Adobe viewers (Acrobat/Reader) do support this feature.


Dirac Delta Function

Question:
In the image above the second faint part is the answer to the question c). The answer starts with the word evidently, and I am confused why it is evident. Also, since we are considering a shell, shouldn't it be a 3D form of Delta Dirac function? Is there anything wrong with the answer?
Comment: It was obviously evident to the person who wrote the answer that a delta function was the way to go. The situation is spherically symmetrical and so $r$, the distance from the origin, is a suitable variable. What do you think the answer should be?
Comment: Hint: How can you describe a constant charge distribution $\sigma$ on the $xy$-plane?
Answer: It is evident because there is no charge anywhere except $r=R$, therefore the charge density will have a $\delta(r-R)$ to capture this.  ... and it is indeed $\delta(r-R)$ because this is spherical distribution which depend on the radial coordinate only, rather than all $3$ coordinates, i.e. you are describing a surface (2d) of fixed radius which does not depend on $\theta$ and $\phi$.

Dirac Delta Function


Does it matter how many flags I retract?

Question: I find myself retracting a lot of flags when they're not approved quickly, because I sometimes am not 100% sure if I flagged them correctly. I'm usually sure the post is off-topic, but I am not sure for example if I should have flagged it as opinion based or too broad. I was just wondering if the number of retracted flags goes against me in any way.
Comment: *...when they're not approved quickly...* Isn't the queue for closure flags in the thousands? In any case, it doesn't count against you if your flag ages away and it takes days for that to happen.
Comment: If you're not sure you've flagged something correctly, why are you flagging at all? On the off-chance the flag slips through without proper scrutiny?
Comment: @ChristopherBottoms Try to flag a post you already flagged. You'll then see an option to retract the flag.
Comment: Close flags just age away most of the time anyway.
Comment: How do you retract flags?
Comment: @VinhVO Declined flags count against you with a certain percentage in a certain amount of time triggering a flagging ban
Comment: Further to what @BSMP said, three are currently [over 42,000 flags in the queue](https://data.stackexchange.com/stackoverflow/query/835822/pending-flags-by-date), averaging **12.4 days old**, but some from as far back as February.  That's just one out of [eight review queues](https://stackoverflow.com/review).
Comment: @BSMP, so any flags other than `ages away flags` might go against the flag caster?
Answer: Flags for closure aren't even seen by moderators, so no, that's not going to be a problem.
About the only real exception I could possibly imagine was if you were abusively casting flags (i.e. with inappropriate content in the flag text) and then trying to retract them a bit later in the hopes of avoiding consequences, or some other form of intentionally malicious behavior.  If you're flagging sincerely, you don't have to be worried about later retracting a flag you feel is no longer merited.
Additionally I wouldn't worry too much about which close reason is used in situations like that.  There is a decent amount of overlap between a lot of close reasons, and often more than one will apply.  It is worth taking a moment to consider which you think applies most, and which will have a message that will best help the OP figure out what they need to fix, but having the question closed with a less applicable-but-still-valid close reason is still far preferable to the question not being closed at all, so I wouldn't retract a flag over something like this.  Save retractions for either situations where the problem has been resolved since you flagged, or it very clearly was an error and doesn't require action.
Comment: In support of your *more than one [close reason] will apply*, see this [query](http://data.stackexchange.com/stackoverflow/query/834282)
Comment: Might it be worth considering making close reason check boxes rather than exclusive radio buttons then?
Comment: @Servy if multiple close reasons apply they can all be ticked, would at the very least help the statistics be more useful
Comment: @JamesHughes What would you get out of doing that?
Comment: @JamesHughes And how would that be helpful?
Comment: It would only be helpful if several close-reasons were shown in that little box on closed questions, there might be several disjunct reasons why a post is off topic and the OP could potentially benefit from being made aware of all of them. Apart from that, I see no benefit, really. I don't think we need checkboxi.
Comment: > About the only real exception I could possibly imagine was if you were abusively casting flags (i.e. with inappropriate content in the flag text) and then trying to retract them a bit later in the hopes of avoiding consequences

Then why even flag them in the first place if you don't want the moderators to see?
Answer: I just want to add a little bit behind Servy's answer, which is a great answer.
As a general rule ...
If:

The UI allows you to do it without reverting to shenanigans like playing with the request / routes

You are honestly acting in good faith (as in, it's not in any way your intent to cause any harm, game the system, harass anyone, etc)

You immediately stop whatever you're doing if you notice that there are unintended consequences to whatever you're doing, or if a moderator asks you to stop

... then you probably don't have to worry about anyone having an unpleasant conversation with you about your use of the site. That goes for pretty much everything, and it needs to — the higher you get on the privilege scale, the more we rely on folks having good judgement to guide them if in doubt.
So in this particular case, no, there's nothing really wrong with it, but you obviously thought it seemed odd enough to warrant asking about it, so that same common sense should be telling you to just be careful. And, well, that's really all you have to do.
So in simpler terms, we're not going to get upset if it was obvious you were acting in good faith; a modicum of common sense goes a long way toward ensuring that's an easy assumption to maintain.
Answer:
Does it matter how many flags I retract?

As far as I am aware there are no set-in-stone rules. "If I retract/flag X posts that will result in an automatic ban", no you do not, but it is possible it does matter in the end, and do not be surprised if you find someone tries to find out why you flagged them in the first place.
The question is why did you flag those posts?

Did they have an MCVE or the "plz code free for me" type questions?
Were they in English/was the question/answer understandable/Did it actually answer the question?
Flagged because you dislike the user because of previous experience with them?
Just trying out some flags?
Not having enough experience to use them effectively?

While 5 is OK, "off topic" questions are sometimes quite hard to distinguish and you are still learning, you should still try and limit the wrong flags you do, that way retracting them will not be necessary, you will be armed with experience and will know what you are doing.   You could also get advice by asking on Meta, some users in chat may also advise you.  If you are seen multiple times on the review queue and you were wrong to flag (they may not notice that you have retracted your flag) someone might comment to try and help.
Eventually if you do keep misusing flags, then you retract them, and they have already been reviewed, you could get a ban and especially in the case of 3 and 4 (and by no means am I accusing you of any wrongdoing, this is just a few situations that may be the cause  of the problem).  You would in any case get at least a warning.
If you were correct in flagging and then retracted you flag, it is possible someone goes behind you and flags it again (or someone with a gold badge closes the post themselves), otherwise the flag just gets left until there are enough votes to accept or reject it.
In the end as long as you were not flagging through spite (or for revenge), other reasons and you are just making mistakes/uncertainty while learning (or you realise your mistake later), then you should not encounter any problems.  Learn how to use them and if in doubt ask or don't flag, someone with more experience is likely to anyway or the down-votes will just get the post deleted.
Not accepted quickly is not a good way to do things.  Many questions are closed through a users personal experience on the subject/how much they have been reviewing, they may not even know about the topic in which case they may skip it completely or take time to decide. There may also be a lack of reviewers. If your flag was unfounded it will get rejected, and if not it will get reopened later.  Ultimately retracting or leaving your flag just wastes the reviewers time (if unfounded) and so you should focus on getting your flags right.


Private link to view closed entry

Question: I need to be able to generate private links for entries that aren't visible on the front-end of the website. I guess I could just setup an alternative template that isn't linked within the website structure. The links don't need to be very secure but this still feels a bit half-baked. Has anyone setup something like this before?
Comment: If they aren't visible on the front-end of the website then there's not much point linking to them(?). The standard approach for this would be to limit access to a particular Member Group and then when the user is logged in on the front-end and authenticated as part of that member group then they'd be able to see the content whereas all other users wouldn't. Is that what you're trying to achieve?
Comment: An example use-case is sending an external contributor a link to the entry for approval before it's published or giving special customers advanced previews before an item is publicly available. I want to avoid user having to login.
Comment: Better Workflow has a feature called "external previews" designed specifically for the purpose you just described, Dylan. http://betterworkflow.electricputty.co.uk/
Answer: If it doesn't need to be particularly secure, create a separate sub-domain, and set up a global variable to show different statuses depending on which sub-domain they're on. If you're using FocusLab Master Config this is simple, otherwise try something like this in your main public index.php file under where it says "CUSTOM CONFIG VALUES":
switch($_SERVER["HTTP_HOST"]) {
  case "previews.domain.com" :
    $assign_to_config['site_url'] = 'http://previews.domain.com/';
    $assign_to_config['global_vars']['gv_entry_statuses'] = 'open|Draft';
    break;
  case "www.domain.com" :
  case "domain.com" :
    $assign_to_config['site_url'] = 'http://www.domain.com/';
    $assign_to_config['global_vars']['gv_entry_statuses'] = 'open';
    break;
}

Then any time you use a channel entries tag, add the parameter status="{gv_entry_statuses}"
You can use this technique to allow editors a quick and simple workflow for creating new content before launching to the live site. Rather than using the 'closed' status you should really create a new custom status for this, such as "draft" or "pending", because it's useful to keep "closed" for stuff that really should never appear anywhere ever (but for some reason needs to be kept in the system).
You can also use this technique for quick and dirty forking into separate templates, e.g. you could specify a different folder for tmpl_file_basepath using $assign_to_config['tmpl_file_basepath'] so that the sub-domain displays a completely different version of the site. (Much better to use a proper version-controlled environment with Git deployments, but that can take a while to set up and is not necessary for really small sites.)
Comment: Very clever technique! I like it.
Comment: Thanks, this looks like a nice approach and I'm already setup with the FocusLab Master config and git so it should be pretty simple to implement.

Private link to view closed entry


Sitecore graphql gui does not work over https

Question: The sitecore graphql gui uses websockets to communicate with the server. We have a site that is running under https, but it seems that the gui frontend always uses ws instead of switching to it's secure counterpart wss. And that of course does not work. I have been going through the sitecore graphql code and there seems to be now way to force wss, or is there? Or could we also turn off websockets completely?
Comment: Try and add a include file with following content presented here
http://www.stockpick.nl/english/caveats-with-jss-graphql-endpoint/
Answer: Sitecore GraphQL uses Web socket communication to enable "Subscriptions" in GraphQL. As you mentioned, with https hosting it tries to connect to websocket WS protocol which is non secure instead of the WSS secure one.
To bypass Web socket in jss, change the property enableSubscriptions from true to false in the custom config JSS app creates. Image below for reference.
This will bypass web socket while establishing the connection with GraphQL.


Should I share course notes from my previous university with my students?

Question: I have recently been a TA and I realised I have a large collection of comprehensive notes from my alma mater dating back to my Bachelor degree courses. I wonder if this is an acceptable practice to share them without my professor's consent (since this is purely for education purpose)? My student is asking for these notes, and I told them I should ask my professor first.
Answer: If these were my notes, and you asked if you could share them with your students you would get permission in a heartbeat. In fact, if I had continued teaching the course, and thus continued to develop them, I would probably sent you the most up to date version of those notes. I am not alone in that, I remember that several associations have been trying to set up a repository of such teaching notes, which struck me as a good idea, but I don't know what came of that. However, I have come across people who take a more restrictive view on their notes.
So, I think the best thing you can do is ask. Best case is you get the most up to date notes and a potential reference writer gets reminded of you in a positive way. Worst case (s)he says "thank you for asking, but I don't want you to release those notes". If you don't ask, release the notes, and (s)he finds out, things could get a lot more ugly.
Comment: Plus 1, it's much nicer to ask and then you can add the attribute « based on X's lecture summer of YY » etc
Answer: I would share my own course notes from when I was a student. It is common to exchange them with other students while you're still a student, why shouldn't you share them when you have graduated?
Often student bodies collect notes from previous years and allow students to copy them. Give them the notes and be happy that other students can learn from your notes.
You may or may not have a different stance on solutions for exercises, as they are often (almost) the same in the same course. This is up to you, but in the end everyone is an adult and needs to learn responsibly himself.


How do I break a large XAML file into sub-XAML files and maintain communication between the parent and child objects?

Question: I'm new to WPF. I'm attempting to modify the project VisualStudioLikePanes from the book WPF 4 Unleashed. Because the panes are hidden by default until I run the project, I decided that it would be nice to place the pane I'm working on into a separate xaml file so that I can see the changes I make to the pane without needing to launch the executable.
So, based on some posts I read here on StackOverflow a few days ago, I added a new UserControl to the sample project and plopped the content of the pane in question into that. Here is what the UserControl attributes look like in the 'child' XAML file:
<UserControl x:Class="Sample.SettingsPanel"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
         mc:Ignorable="d">

To include this control into the parent, I added the xmlns:sp namespace to the 'parent' XAML file:
<Window
    Title="MainWindow"
    x:Uid="Window_1" x:Class="Sample.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sp="clr-namespace:Sample"
    x:Name="window">

I then 'included' the control via this:
<sp:SettingsPanel Visibility="Collapsed" x:Name="layer1" x:FieldModifier="private" />

I immediately found that in the code-behind file for the 'parent' XAML file, all of the code which made reference to any of the elements now contained in the 'child' XAML file were now unrecognized. So, I then removed (or commented out) all references to names and objects which were now contained within the 'child' XAML file and ever since then have been jumping through hoops to wire things back up.
For example, I want one TextBox in the 'child' XAML file to reflect what is in a TextBox in the 'parent' XAML file. I believe that the following binding would work, but, of course, I can't place this into the 'child' XAML, because it doesn't 'know' about the parent's 'test' element any longer.
<TextBox Text="{Binding ElementName=test, Path=Text}" />

I'm sure I've broken up the 'parent' XAML file incorrectly. I can't imagine that everytime somebody wants to break some segment of XAML out to another file they must rework all of their code behind and set up special communication hacks to let elements continue to communicate.
I did look at a variety of posts (e.g. Binding two UserControls to the same DataContext, or ViewModel? and What is the easiest way to break up large XAML files in my application?), but they didn't address my particular question.
Thanks,
Matt
Comment: If you want XML (XAML is a type of XML) to do what it does (e.g. references) then you need to leave it in tact.  It is one thing to break out pieces that are not coupled but parent child is a pretty tight coupling.
Answer: When you split out your elements to a UserControl you can still access them by x:Name field value you provided.  However, since you are new to WPF I would start looking into the MVVM pattern before you develop any "bad habits".  It specifically addresses your concerns.


Resistive Screen Zooming Option for PDF files

Question: I'm looking to buy a resistive screen android tablet for reading PDFs. Is there an app that lets resistive tablets to zoom into the text for a PDF file? Or is their a specific resistive screen for it I heard there was a 2 point and 5 point but not entirely sure or are all resistive screens the same.Thanks.
Answer: Resistive touch and Capacitive touch will operate the apps the same way, the same way a laser and a mechanical mouse are two different technologies designed to do the same thing for the user. Both have their advantages and disadvantages, for instance try using your capacitive iphone screen with gloves or finger nails, it wont work. A capacitive screens are known to be more accurate in general, although some nokia n900 users would argue that point. If you are buying a cheap tablet, I would not expect a resistive screen to be as accurate or responsive as a capacitive screen used on most mainstream models out there.
You should be able to pan zoom even if the screen only supported "2 points" multitouch I wouldn't stress about that. All PDF viewers will be compatible its a matter of trying a few out for yourself one by one, probably start with the official Adobe PDF Reader and go from there, everyone will have different tastes in what they want from a pdf viewer app.
Keep reading if you are still interested, http://en.wikipedia.org/wiki/Touchscreen#Technologies
Comment: Thanks, that was my main question if a resistive screen would be able to pan zoom into a PDF file. Since I find no reason to pay $700 for just using a tablet for reading PDFs thats why I was looking at a cheap 10.2" resistive tablet. If I would use it for something else ofcourse wouldn't mind paying for Mot. Xoom put I have no use for it other than for my PDF files to read to replace my Mac Air for convenience.
Comment: No probs, but I would rather go for something like a nook color with a warranty than some other cheap tablet made to be nothing but well, cheap. A nook should be around the same price point just a slightly smaller screen http://www.barnesandnoble.com/p/nook-color-barnes-noble/1100437663 These things are also designed to make them money through the book stores etc as well as being cheap, which is an ok compromise ;)


Can the discharge of the water powered backup sump pump be connected to the discharge of the primary sump pump?

Question: When installing a water powered back-up sump pump can the discharge of the water-powered back-up sump pump be connected by a Y to the discharge of the primary sump pump? I read that it shouldn't according to the Uniform Plumbing Codes and IAPMO PS119. Also what is the proper distance  between the back up sump pump float and the primary?
Comment: You "can" do anything, but the entire point of a backup system is in the event the primary fails. What would happen if the primary discharge tube gets clogged or otherwise prevents discharge? Codes/guidelines are usually there for a reason, even if they can be annoying.
Answer: Put check valves on both discharge lines upstream of any "Y" connection to prevent back feeding through the unused pump.


How do I get a single URL removed from Google Search results?

Question: I keep running into URLs that no longer exist, but which Google Search still returns and end up giving me a 404 error. I know it'll get re-scanned eventually, but how do I prompt Google to re-scan it sooner?
Answer: You can request removal of a single search result by using the "Remove outdated content" tool.
They note:

Instructions:

This request works only for pages/images that have already been modified, or removed from the web.
If you need to remove personal information or content with legal issues, you should submit this request instead.
Enter the URL copied from Google Search Results.
If successful, cached result and snippet will be removed from Google Search results.
If unsuccessful, learn why.

They don't mention how long it will take, but it certainly should be shorter than waiting for Googlebot to come around again.
More details about the Remove outdated content tool from Google Support.


Is it possible to put Windows 10 onto an external SSD and boot it through VirtualBox/VMware?

Question: I am getting a 13-inch Macbook Pro (possibly the 2019 model) on my birthday. I am wondering if I can put Windows 10 onto an External SSD and boot it with virtual machine software on my Mac (ex. VMware, VirtualBox)
Answer: In a word, yes. you can place the VM storage (EG the HD file) anywhere you want it.
Note that both programs have default locations to place the VM files so you will likely have to specify advanced setup and specify the location manually.


Passing Client-Side user information into Server-Side TFS Plugin

Question: I am working on creating a TFS Server-Side plugin for code review policies. The issue I am facing is trying to get the workspace of where the checkin is coming from. Ultimately it is to get the local filepath on the users machine of each of the pending changes to confirm the files last modified date/time.
Currently I am using the
<code>string machineName = Environment.MachineName;
string currentUserName = Environment.UserName;
var versioncontrols = tfsTeamProjectCollection.GetService<VersionControlServer>();
var workspace = versioncontrols.GetWorkspace(machineName, currentUserName);
</code>
I use these values to try to get the workspace of where the pending changes are but these just return the computer and user that is hosting the instance of TFS. Not the user or computername of the client side where the check in is actually happening.
if anyone could help find out how to get the client side MachineName and Username that would be a great help...
Or even better if someone could assist in getting the local filepaths on the developers machine from the pending changes, that would solve my end goal issue.
Answer: I think you can have a look here, then I believe you just need to inspect dll to verify workspaces.


Rode NTG3 vs Sennheiser MKH 416

Question: I am pretty torn between the Rode NTG3 and the Sennheiser MKH 416.
The Sennheiser MKH 416 is considered to be the industry standard and is considered by many as probably one of the best in the market. However, I also read a lot online from users who've had and used both and say they would surprisingly recommend the Rode NTG3. A lot of opinions online seem to say that the NTG is practically just as good as the MKH while being significantly cheaper (at almost half the price).
So my question is, is it worth it to get the MKH 416 and spend big dollars for the "industry standard" or to save some money and just go with the NTG3.
Opinions and preferences aside, objectively, what are the differences between the two mics such as the specs etc.
Comment: you should be looking at the NTG5
Answer: Which one did you end up getting?  I ended up picking up the NTG3 and NTG5 because I couldn't afford the MKH 416.  What I realized is that unless you have the perfect recording environment and the ideal listening environment (high quality headphones, etc), it is hard to tell the difference even between the NTG2 ($269 shotgun mic) and the NTG3 ($699 shotgun mic).
Check out this video:

Rode NTG3 vs Sennheiser MKH 416


Will adding content to my site regularly improve SEO performance?

Question: Does putting up content on a daily basis have a positive effect on Google rankings? Will my site appear higher in SERPs?
Comment: See also: [Are more pages in one site better for SEO?](https://webmasters.stackexchange.com/questions/22732/are-more-pages-in-one-site-better-for-seo)
Answer: Count of articles in a website doesn't have any direct impact on the rankings for target keywords.
In case you want to rank for more keywords, you should create more pages for them but also be aware of cannibalization.
You should try to cover synonyms on the same page.
Having more articles also helps the users in case they are looking for any related articles, they will find them on your own website and they won't need to search for similar topics which may be a relevancy factor helping Google rankings.
Answer: Fresh content helps you rank better, so the answer is yes. But it is just one of dozens of factors. So while you are at putting up content, pay attention to this: Make sure your whole site and each of the pages ale well structured. Each page should be about a specific topic, each paragraph on page should, too, be clearly about a sub-topic. To see if you are doing it right, check that your headings make sense - they should define what the pages and separate paragraphs are about. H2 headings should fit well under your H1, just as H3 go into depth within the scope of H2, and so on. Good internal linking helps too.


How can I upload my .cpp file online while logged into schools Linux server through SSH?

Question: I am currently in a basic programming class, and I finished my first project and it is a .cpp file. I am logged into the Linux server but I do not know how to upload a .cpp file online when I can only find the file while in SSH. Professor didn't show us anything so I have no idea where to start.
Comment: You can do Session multiplexing, but if you only need to upload a single file, just do an `scp` of the file from a different terminal.
Comment: As it's your first project it's probably not a huge .ccp file.  So just copy it to clipboard on your own home PC and paste it into a vim session within PuTTY on your school's server.
Comment: That's not very descriptive.  Are you wanting to move the file from the linux server to your machine, from your machine to the linux server, or from the linux server to somewhere else online?  In the first two cases, use `scp` or `sftp`, in the last case it depends on where you're putting it.
Answer: I believe you wrote the .cpp file on the Linux server, and now you want to get the file from the Linux server to your home computer, and then from your home computer so that you can submit it to your class's website.
To get the file from the Linux server, first find out where the file "lives". So, whilst SSH'd into the Linux server, do this:
$ readlink -f path/to/your/*cpp
/home/rschulj/homework/foo.cpp

The resulting path points to the file.
Now on your home computer, secure copy (scp) the file from the server:
$ scp /home/rschulj/homework/foo.cpp ~/foo.cpp

Now foo.cpp is in your home directory. Upload it to your school homework site.


target=_blank for links in view

Question: I've got a view and one of the fields is displayed as a link. (Output this field as a link is cheked). But now i want those links to have target=_blank attribute.
How can i achieve this?
Answer: When you check Output this field as a link there is a Target input box available (Further down). In that input box you can write _blank. (D7)
Answer: edit: I just saw the answer whitefleaCH gave you - I never use the output settings as i prefer to style my views using templates to clean up the code - so i didn't know that option existed, though I presumed it did..

You can either use the themeing part of view and create your own template for the row style and simply hardcode the link attribute into it there (click the 'theme: information' part in the advanced settings of your view to see how to name your theme template).
Or which is probably easier - depending on how much themeing you'll be doing to your view - is to use jquery by doing the following:
Create a .js file and paste the following in into it (create a new textfile and save as yourfile.js):
(function($) {

$(document).ready(function() {

      $('.CLASS a[href]').attr({
          target: "_blank",
          title: "Opens in a new window"
        })

});

}(jQuery));

Change the CLASS bit with the class surrounding your link and save the file.
Upload your YOURFILE.js to your theme directory (eg: sites/all/themes/YOURTHEME/)
Open YOURTHEME/template.php file and tell it to load your .js file by adding the following line
drupal_add_js(drupal_get_path('theme', 'YOURTHEME').'/assets/js/YOURFILE.js');

Clear your cache and all links surrounded by

Link

will automatically open in a new window.
Of course you can do a lot more with the above script, like add a special class to the links so you can use .css to style them differently, or append some symbol or image etc etc ...
I hope this helps.
Comment: "CLASS"? What an "imaginative" name! :D Btw. target="_blank" causes XHTML Strict-validation problems, so maybe your method is the right one instead of "burning" it into the HTML-output.
Comment: haha, yes, I was trying to be clear as there is a dot before it ;-)
Comment: don't think JS is ever a good option for this
Answer: Linked Field module with Tokens.
Just brilliant!

After that in your View you may select Show:Content | Teaser
(Teaser or any other preferable display)
The same but kinda verbose way give us the Image Link Formatter module, but only for images.
@whitefleaCH gives good solution too! (only for Views module)

target=_blank for links in view


How to get copies of default Linux etc files

Question: Only sometimes, I forget to make a backup of a given linux file such as /etc/rc.local, /etc/rsyslog.conf, /etc/dhcpcd.conf, etc, and later wish I did.  Distribution agnostic, is there a good approach to later getting a copy of an unf'd up copy?
Comment: For Ubuntu: https://askubuntu.com/q/627017/158442
Answer: While the topic of configuration files backup/versioning might seem simple on the surface, it is one of the hot topics of system/infrastructure administration.
Distribution agnostic, to keep automatic backups of /etc as a simple solution you can  install etckeeper.
By default it commits /etc to a repository/version control system installed on the same system.
The commits/backups are by default daily and/or each time there are package updates.
The etckeeper package is pretty much present in all Linux distributions.
see: https://help.ubuntu.com/lts/serverguide/etckeeper.html
or https://wiki.archlinux.org/index.php/Etckeeper
It could be argued it is a good standard of the industry to have this package installed.
If you have not etckeeper installed, and need a particular etc file, there are several ways;
you might copy it from a similar system of yours,
you can ask your package manager to download the installation file or download it by hand, and extract the etc file from there; one of the easiest ways is using mc (midnight commander) to navigate inside packages as if they were directories.
You can also use the distribution repositories to get packages, in the case of debian is http://packages.debian.org
Ultimately if the etc/configurations are mangled beyond recognition you always have the option to reinstall the particular package. move the etc files to a backup name/directory, and for instance in Debian:
apt-get install --reinstall package_name

You can also configure and install the source repos for your particular distribution/version, install the source package, and get the etc files from there.
https://wiki.debian.org/apt-src (again a Debian example)
In some packages, you might also have samples of the configurations files at /usr/share/doc/package_name, which might be fit or not for use.
As a last resort, you may also find etc files in the repositories/github addresses if the corresponding open source projects, just bear in mind that often distributions change default settings and things around.
Obviously, none of these alternatives exempt you from having a sound backup policy in place, and retrieve your lost /etc files from there.
Times also move fast, and if following a devops philosophy, you might also choose to discard certains systems altogether and redeploy them in case some files get corrupted; you might also use CI and reploy the files for instance, from jenkins.
Comment: `apt-get install --reinstall` generally speaking won't restore the default files in `/etc`. Extracting configuration from packages is generally straightforward, but there are a few gotchas: some packages build the configuration from other sources during installation (or are capable of merging settings from `debconf` or `ucf`). Installing `etckeeper` before anything else is definitely the easiest option ;-).
Comment: Thanks Rui.  Not bad formatted considering it was on your phone!  I will look into etckeeper.  If you didn't have it installed and wanted a copy of the original, any recommended steps?
Comment: Travelling today, wont be able to edit this on a notebook so soon, if some feels like editing it, be my guest
Comment: If it came from a package, extract it from the package `.deb` (or RPM, etc).  If not, that's tougher.
Comment: @StephenKitt I said moving the etc files out of way before doing reinstall
Comment: @Rui ah yes, sorry, I misread that!
Answer: If your distribution has a live ISO, or you don't mind doing a virtual install to a Virtual Machine (VirtualBox, VMWare, etc) then you could see it's default files without digging through package files manually.
And installing / re-installing / re-configuring any packages in the VM wouldn't change your "real" system files.


How to craft transfer pipes/node skyfactory

Question: I've dived head-first into the brick wall that is skyfactory 2 (First time I've used a minecraft mod). I'm trying to make an automatic cobblestone generator. The recipe for transfer nodes and transfer pipes don't seem to work. What I mean by this is that they literally don't produce anything when put into a crafting table in the right order. I'm really struggling to figure out what's going on with this. Any help/advice/suggestions welcome. I'm using ATLauncher to play skyfactory.
Comment: [Tim lost his keys.  Again](http://meta.stackexchange.com/questions/215379/should-drive-by-downvoting-be-more-effectively-caught/215397#215397)
Comment: Downvote but no comment on how to improve. -_-
Answer: Try using a mod called NEI (It's already in Sky Factory 2)
Open up your inventory. At the bottom of your screen, there should be a black bar. Click that and search for "Transfer node" or "Transfer pipe". On the right should appear items matching that search. Hover your mouse over them and press R for the recipe (You may need to press R a few times occasionally as another mod, Inventory Tweaks, also uses the key R and conflicts).
If you have all the components of the crafting recipe in your inventory, open up a crafting table, use NEI to find it, press R on it and Shift Click the ? next to the recipe to automatically fill it in
Answer: I am having the same problem, and I figured out that the NEI recipe is incorrect. Instead of using smooth stone as it suggests, use tin.