Oil overfill with residue in exhaust manifold

Question: Can overfilling your oil cause oil residue in your exhaust manifold without you breaking a ring?
Answer: The oil itself won't get there.  However, you could be burning some oil.  Basically, if you overfill your oil, the crankshaft can come in contact with the oil, causing it to bubble and foam.  If this does happen, the crankcase ventilation valve can pull in some of that foam and end up burning it.  This will cause smoke in your tail-pipe, and, yes, residue from burnt oil.
That said, it is not the most serious issue with overfilling your oil tank: the oil does not lubricate properly when it is aerated, and can cause (sometimes drastically) accelerated engine wear.
Answer: If there's residue in the manifold it's most likely to be residue from the exhaust fumes from the piston chamber.  Excessive exhaust residue can indicate a problem with too much fuel entering the combustion chamber on each stroke (has happened where cars have a chip fitted)
However if you're certain it's oil residue, this CAN happen, but definitely SHOULDN'T.  It can indicate a broken or damaged head gasket, or rocker cover / valve cover gasket.  Is there residue around the outside of the manifold??
Again a bad leak could have pistons shoving oil out into the manifold, but that's not good.  A compression test should indicate whether the piston seals are not working correctly.  You would also notice other problems too I guess, and probably getting through a lot of oil if this is the case.
Also possible the exhaust manifold seals could have gone if there's definitely oil residue inside the manifold.
Don't know what your car is like, but does it have a turbo?  If so, there's usually an oil feed line from the head to the turbo that would be worth checking for leaks or build up of residue around this.
Overfilling the oil is very unlikely to cause this kind of residue build up, unless there is a piston seal leak.  If so, overfilling would exacerbate the problem.
Let us know how you get on.
Answer: Oil can be forced out of the crankcase breather which usually vents into the air-box, would then be sucked through the engine and end up in the exhaust so that is a possibility.
It's also possible to get oil in the exhaust past the valve stem seals or the turbo (if fitted) seals.  Neither of these is particularly good.
Best advice is, drain the excess oil and refill to the correct level.
Good luck.


Turning OS X back to the initial setup screens

Question: I just sold my Mac.  I'm currently reinstalling a fresh copy of Lion.  After that, I want to install the copy of Office I'm including with it and install all the updates.  After that, is it possible to turn it back so that my buyer gets the "select a language, create a user" initial setup dialogs?
Answer: You can do this by deleting the user account you created through single-user mode.
Note: subsitute your username in all commands that have the word username.
After you're finished installing the new software and updates restart the computer while holding Command-s.
Once at the prompt enter the command:
 mount -uw /

Remove user preferences:
  rm -R /Library/Preferences/

Remove user account:
rm -R /Users/username/

Remove AppleSetupDone:
rm /var/db/.AppleSetupDone

Next start the directory services by typing:
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist

Note you may have to use com.apple.DirectoryServicesLocal.plist (but try the above first)

Now what find groups your  user belongs to:
 dscl . -list /groups GroupMembership | grep username–

Remove the groups corresponding to your username:
dscl . delete /groups/username

Do this for all of the groups you found from the above command

Remove user database:
rm /var/db/dslocal/nodes/Default/users/username.plist

After it's all removed type reboot to reboot the system or shutdown -h now to turn it off.
Answer: From How to reset Leopard back to the Setup Assistant - Mac OS X Hints

This hint will probably be most useful for folks who configure machines for a living, but if you're selling or giving away your machine, or just troubleshooting login issues, it may come in handy. Here are the Terminal commands to delete a temporary (or lone) account in single-user mode on Leopard (in the following commands, replace username with whatever account short name you've created). Note that this must all be done in single user mode (hold Command-S during boot).
First, the usual stuff:

$ mount -uw /
$ rm -R /Library/Preferences/
$ rm -R /Users/username/

(Note that deleting /Library/Preferences/ is optional and in some cases may cause problems after pre-configuring some third-party software. However, I do this after simple configs or installs, e.g., install an OS, apply Software Updates, and then give it to the end user to create a fresh account.)
Now here's what's new in Leopard:

$ rm /var/db/dslocal/nodes/Default/users/username.plist
$ rm /var/db/.AppleSetupDone

While getting rid of .AppleSetupDone wasn't really necessary for OSes 10.2 thru 10.4, you do have to get rid of the Setup flag file in Leopard, or when you reboot, you'll get a login window and no working account to log in with.
I was hoping that I might be able to just type dscl . -delete /Users/temp to axe the account info (much shorter and easier to remember), but apparently the dscl command doesn't work in single-user mode even when you follow the instructional prompt to start Local Directory Services -- oh well.
BTW, trying to do all this through the GUI is pretty much impossible. Even if you enable Root and log in as that, the Accounts prefpane in Leopard won't let you delete the last or only Admin user account.
I also discovered something interesting: if you give your temporary account (or any Admin account) no password, you'll find that when you boot up and try to run sudo from a shell (bash at least), it won't work -- it just dumps back to the main user prompt. Solve this by giving your temporary account a short password, unless you're sure that you won't have to do any superuser shenanigans from Terminal as part of the config. A good security hedge for end users who don't like passwords, but still a new wrinkle to deal with.


A question on page 65 of Weinberg's QFT volume 1

Question: The equation (2.5.12) on page 65 says that:
$$
\left(\boldsymbol{\Psi}_{k',\sigma'},\boldsymbol{\Psi}_{k,\sigma}\right)=\delta^3\left(\boldsymbol{k}'-\boldsymbol{k}\right)\delta_{\sigma '\sigma}.
$$
I am wondering why it uses $\delta^3\left(\boldsymbol{k}'-\boldsymbol{k}\right)$ of the three-vector momentum rather than $\delta^4\left(k'^{\mu}-k^{\mu}\right)$ of the four-momentum one.
Comment: Could it be this: since $k^\mu k_\mu = m^2$, equality of the spatial components implies equality of the temporal components up to a sign. But $k^0 \ge 0$, so it is in fact equality.
Comment: the k' here is not a standard momentum while k is. Please refer to \url{https://physics.stackexchange.com/questions/24766/questions-concerning-some-parts-of-the-section-on-one-particle-states-in-weinber/61762#61762}
Comment: @RobinEkman Are you saying that we are only considering the states of one particle here?
Comment: Yes, I think in that section Weinberg is considering only one-particle states. If it were multiple-particle states there would have to be several $\delta$:s.
Comment: @RobinEkman Thank you for your reply. However, I checked the page again and I think Weinberg is talking about the normalization of these states with standard momentum $k^\mu$. If we are talking about the states of only one type of particle, $k^\mu$ is just fixed (equals to (0,0,0,M) according to Table 2.1 on page 66). So I think here those states are not states of a particle of a a particular mass m. Am I correct?
Answer: (An answer from a student also studying Weinberg's book)
Basically I'll be repeating what @Robin Ekman has said in his comment,
but with some clarifications.
First of all, here Weinberg is talking about the states of a single massive particle. That is, $\Psi_{k,~\sigma}$ and $\Psi_{k',~\sigma'}$
are two possible momentum eigenstates of this particle, and the former happens to be chosen as the "standard" state. Now as Ekman points out, for such a particle, the 4-momentum $k^\mu$ is constrained on the hyperboloid $k^\mu k_\mu = m$ with $k^0>0$ in the momentum space. Therefore, only $3$ independent parameters are needed to "enumerate" all the momentum eignvalues (that is, to completely parametrize the hyperboloid in mathematical jargon). These $3$ parameters can be conveniently chosen as the 3-momentum $\mathbf{k}$, which are just the spatial components of $k^\mu$. In this sense, we can write (without any ambiguity)
$$\left|{\mathbf{k}',~\sigma'}\right.\rangle := \Psi_{k',~\sigma'},$$
where $\mathbf{k}'$ is the spatial part of $k'$.
Next, considering the labels $k'$ and $\sigma'$ together, we can see that they are meant to form a complete set of quantum numbers. To be more specific, the states
$$\left\{\left.\left|{\mathbf{k}',~\sigma'}\right.\rangle\right|
\mathbf{k}'\in \mathbb{R}^3,\sigma'=\text{all the allowed discrete eigenvalues}\right\}$$
for an orthonormal basis of the single particle's Hilbert space. Here the "allowed discrete eigenvalues" are determined from the representation of the little group. The relation
$$(\Psi_{k',~\sigma'},\Psi_{k,~\sigma})=\delta(\mathbf{k}-\mathbf{k}')\delta_{\sigma~\sigma'}$$
is just (part of) the orthonormality condition in that Hilbert space.
It might be useful here to point out that the "induced volume element" of the hyperboloid, under parametrization $\mathbf{k}$, is
$$d^3\mathbf{k}/\sqrt{\mathbf{k}^2+m^2},$$
as is given by the second equation on Page 67 of Weinberg's book.
Also when Weinberg moves on to massless particles, the hyperboloid in the present discussion changes to the null surface (the "future light cone" $k^\mu k_\mu = 0,~ k^0 > 0$), and the logic is much the same!
Comment: Does this mean that the normalization of 1-particle states is not Lorentz-invariant? (And is this a problem?)


Opening specific email causes Mail to crash

Question: I have set up Microsoft Office Mail on my iPhone 6. The only problem that I cannot get my head round is that it all works fine but I received an email this morning, and when I clicked on it to read it, the screen just went back to the home page. All other emails I have received are fine and can open and be read no problem, but for this one email every time I try to open it the screen continues to go to the home screen.
Comment: Your title should be relevant to the actual problem you are facing. A nondescript title obfuscates the content of the question. I've edited the title to be more specific but feel free to edit further.
Answer: When the screen goes back to the home page, it means that Microsoft Office Mail is crashing because of some problem.
In this case, the email that you're trying to open contains something that causes the app to crash. This is an issue with Microsoft Office Mail, and not with your iPhone. The only solution right now is to either open this email on your computer, or wait for Microsoft to fix this bug in a future update.
Answer: The email probably contains some kind of file that your phone doesn't know how to handle, or it could contain some kind of virus.  If you're sure it isn't, then try opening it on a different device.


Machin3Tools - Modes Pie Issue

Question: When running Machin3Tools the TAB key should bring up the Modes Pie menu. This stopped working very recently so the TAB key just switched between Edit and Object view ie. the default Blender behaviour for this keyboard shortcut. I can go in to Machin3Tools Preferences, disable and re-enable the Modes Pie and everything works OK until I open the file again, after which it reverts back to the default Blender behaviour. After much experimentation I did a complete reinstall of everything. I disabled all addons, uninstalled Blender, deleted the AppData, restarted my machine and did a clean install of Blender 3.2 and Machin3Tools 1.0.2. It all works fine, except for when I open the file I was working on when I first discovered the issue. For this file the TAB shortcut key still doesn't bring up the Modes Pie menu unless I go in and disable, then re-enable it. I have no clue why this issue would be tied to just this one file, especially with a clean install of Blender with no other Addons installed yet. Any ideas gratefully received?
Answer: Check out the default Blender setting:

With pie menu on drag enabled, you will toggle between edit mode and object mode, by pressing Tab, but if you press tab and move cursor while holding tab key pie menu will open.
You can also set Tab for Pie Menu to open pie menu always.
Comment: Thanks for the suggestion. Unfortunately this didn't work for me either. It's like the default TAB key behaviour is saved to file and I can't change it. In the end I just started a new file and copied all my objects, lights and cameras across. It's now working fine. No idea what happened. Earlier iterations of the file (from incremental saves) were fine. Hopefully it doesn't happen again !

Machin3Tools - Modes Pie Issue


Should it be "mid 80s" or "mid-80s"?

Question: When discussing temperatures or decades, should it be hyphenated?
I understood that two-word adjectives need to be hyphenated, but why does MS Word think this should be, too?
Comment: I'm having trouble parsing your MS Word sentence--are you confused why it *does* follow the rule that things should be hyphenated?
Comment: @simchona: I think the confusion is that "mid" is a word and "80s" is not a word (at least I assume it is not, according to the poster, or why post this question) but MS Word hyphenates it as if "mid" and "80s" were two word.
Comment: What sentence is this flagged as an error in? I can't duplicate it with some simple examples in Word, but I'm not sure if I've turned on grammar checking correctly. @simchona, The problem is that this phrase is not necessarily an adjective. You would say "In the mid 80s" for example.
Comment: Examples of sentences: 1) "The temperature yesterday was in the mid 80s." 2) "He was born sometime during the mid 80s." Concerning MS Word, I thought "mid 80s" is correct but it wanted to change it to "mid-80s" and I disagree. Thanks everyone
Comment: Does it just do it with "mid", or also high/low/early/late? Part of the problem may be that "mid" is perceived as somehow not being a real word.
Answer:
Should it be "mid 80s" or "mid-80s"?

Yes.
My American Heritage Dictionary has entries for the adjective 'mid' and the prefix 'mid-'.
Modifying the noun 80s with the adjective mid would be written as mid 80s.
But creating word by appending the noun 80s to the prefix mid would be written as mid-80s.
So, it depends on which form of mid you use.
Please note that if there is a standard dictionary for the project you are working on, you must ensure that there is an entry for the adjective mid, not just the prefix. If no such entry exists, you're stuck with the prefix mid, which means you're also stuck with the hyphen.
Comment: Yes, as I just posted above, I am using "mid" as an adjective to modify "80s." Thus it makes the most sense to me to have it without the hyphen. But now I understand that MS Word thinks I was creating a two-word adjective like "mid-80s music" or "mid-80s temperature." Thanks for everyone's comments.
Comment: This has just resurfaced. Could you please highlight the section verbatim, link and attribute?
Answer: This is really a kind of corner case where there's probably no consensually accepted solution used and preferred by the majority of speakers.
Just either:

if you have no editor, use whichever you think looks clearest to read and don't worry about it too much;
if you have an editor, use whichever your editor tells you to use (or let them worry about it).
Answer: I would normally go for the non-hyphenated case.
NB "mid '80s" is more correct for decades because it is a contraction of "mid 1980s" (presumably).
Comment: Mmmm OK, why exactly do you consider it "more correct", then? Unless you think that (a) God stipulates this kind of thing, or (b) the use of the apostrophe in a particular place is intrinsically tied to some phenomenon of nature, then really what you're left with is a matter of preference. Maybe in some cases it's a collective preference, but it's still a preference!
Comment: I would've thought the use of apostrophes in contractions was pretty clear, and I would agree that there certainly should be one in **'80s**. The example **'phone** is different - you're talking about the usage and spelling of a single word that changes over time, such as **Halloween**. Indicating a contraction such as **'80s** is a different kettle of fish.
Comment: Yeah, but that also just depends on your preference for how you use apostrophes. Would you write 'phone, for example?
Comment: "More correct" does not mean I'd always (or even prefer to) use it. But, yes, 'phone is still a contraction of telephone.
Comment: I suppose my "more correct" means "more formal": if you're writing in a context where you'd expect to have nits picked, using __'phone__ (or probably the full word __telephone__) is less likely to be questioned than just __phone__. (In fact I see both the same as @Snubian, but __'80s__ is not as "changed" as __'phone__.)

Should it be "mid 80s" or "mid-80s"?


Moka vs. pour-over oil extraction efficiency

Question: What are the differences in the coffee made from a moka pot vs. a pour-over? Does one extract more of the beans' oil than another?
Answer: Pourover methods tend to use a paper filter which prevents oils from flowing into the coffee. Pourover is also brewed at a low pressure and a higher coffee to water ratio, giving the coffee a gentler, tealike taste. Moka pots are closer to espresso in terms of intensity and pressure, and does have more body and a richer flavour. I personally prefer pourover coffee but everyone has their own tastes.
Answer: Mokas extract oils (fatty acids) better than pour-over or filter coffee methods, which are the poorest. French presses do the best at fatty acid, presumably due to the grains being submersed so water-oil separation has more time to occur.
According to

Alexia N. Gloess et al., "Comparison of Nine Common Coffee Extraction Methods: Instrumental and Sensory Analysis," European Food Research and Technology 236, no. 4 (April 1, 2013): 607–27, DOI: 10.1007/s00217-013-1917-x, §9 Extraction Efficiency, p. 618,

a French press (Bo) by far has the best "Fatty Acids per g R&G" extraction efficiency, with the Bialetti moka pot coming in a distant second place {plot (b) below}:
Fatty acid content per gram of roasted and ground coffee (R&G) prepared according to the different extraction methods:

Key:

Espresso from semi-automatic machine—(DE)
Lungo from semi-automatic machine—(DL)
Espresso from fully automatic machine—(SE)
Lungo from fully automatic machine—(SL)
Espresso—Nespresso (NE)
Espresso—Bialetti (Bia)
Lungo—French Press (Bo)
Lungo—Karlsbader Kanne (KK)
Lungo—Filter Coffee (F)
Comment: Answers should be written in your own words, text from other sources should *support* your answer, not make up the majority of the answer. Copied text must be both attributed *and marked* as such. Linking to your own space without denoting it as such is undisclosed affiliation and not permitted either (and frankly totally unnecessary in this case).
Comment: See [How to reference material written by others](https://coffee.stackexchange.com/help/referencing) ("Do not copy the complete text of external sources; instead, use their words and ideas to support your own.") and [this Meta Q/A](https://meta.stackexchange.com/a/160078/310311) ("Remember, you still have to write an actual answer, in your own words. A post that consists only of copied text, even when attributed, is not your work either. Use quotes sparingly, to support your own words.")
Comment: How do fatty acids relate to oil? Are fatty acids the same as oil? Are all fatty acids in the bean oily? Are all oils in coffee beans fatty acids? And how does the pour over figure into this? It seems filter coffee has no fatty oil extraction. Is that because they only used a paper filter? Though this source seems to be relevant, I'd reiterate Stephie's comment that you have to actually answer the question.
Comment: I understand that the source you're citing only published the figures in bulk, but in your answer it's quite confusing as it seems you're only using that one plot. Perhaps removing the picture and citing the relevant numbers in a table would be easier?


Is there a Canadian credit card which shows holds?

Question: It is really frustrating not being able to run a tight ship with my money. Neither CIBC nor TD shows them immediately. It is certainly possible because I ran across a Visa gift card which showed them. So is there a proper credit card that shows the holds immediately?
Answer: PC MasterCard recently added this as a new feature to their online system. It lets you see "Pending Authorizations" for your card when you log in. Their email said:

Along with your purchases, you'll see a list of every transaction that's been approved, but not yet applied to your balance. You'll be able to identify these with the word "Pending" in the date column.

Here's a link with more information: http://pcfinancial.ca/pendingauthorization/
Answer: It's not so much a credit card, but a financial institution's online platform that either provides this functionality or not.
The following Canadian financial institutions show an itemized list of pre-authorized transactions (not an exhaustive list):

RBC Online Banking (both personal and business).
PC Financial.

The following institutions show a total value of pre-authorized transactions:

MBNA.ca (which is now owned by TD)
HBC Financial (The Hudson's Bay)

Most other institutions show the available credit (e.g. Chase Financial used by Amazon Rewards), which give an indication of how much you have to spend. By subtracting the current balance and the available balance from the total credit limit, you can get an indication of the total amount of pre-authorized transactions.
Example:
<code>Credit Limit: $1000
Current Balance: $500
Available Credit: $400
</code>
$1000 - $500 - $400 = $100 is the amount of pre-authorized transactions.
From TD's EasyWeb demo (http://tdeasywebdemo.com/v2/#/en/PFS/accounts/activity/chq), it appears that they don't include pre-authorized transactions in the Available Credit.
You can verify for yourself by logging in to online banking after you make a purchase and comparing the Available Credit to [Credit Limit - Current Balance]. If it is equal, then they don't include, if it is different (most likely for the value of the transaction), then they do.
Comment: I can confirm that TD subtracts pending charges from "Available Credit".
Answer: As for PC Mastercard like stated by @nullability, VISA Desjardins list the "Pending Authorizations" almost instantly (the time it's take to get back home) in AccesD (Their Web portal for managing accounts).


Windows 10 hangs on startup and taskbar on wrong monitor

Question: Since I have my new hardware in my PC, I have a problem starting my computer. When it is off for several hours and I boot my pc windows hangs up at the login screen and shows me a black picture on my monitors. When I then reset the PC it loads windows normally and sometimes it is so that the primary taskbar is displayed on the secondary monitor.
I have already tried a few things.

primary monitor is stored as primary monitor in the windows display settings.
i updated all system devices in the device manager and also updated
my graphics card.
i completely reinstalled windows (reinstalled windows and kept private data)
check the monitors in the BIOS. I could not detect any abnormalities.

My setup:

Monitors: 1x 4k monitor (primary/display port/extended), 2x HD monitors (secondary/HDMI/extended) The 4k monitor and one  HDMI monitor are cloned.
Graphics card: NVIDIA GTX 970
Motherboard: Asus Prime B350 plus
CPU: AMD Ryzen 5 2600X Six-Core
Hard disks: 1x SSD (Windows), 1x HDD (Data) The Windows folders Desktop, Documents, Downloads, Pictures are on the HDD

I hope someone still has some ideas how I can solve the problem, because resetting your computer at every start is not only time consuming but also not too good for the computer.
If you need any more information, I will be pleased to provide it.
Answer: Apparently, I solved the problem. I burned a Windows 10 Iso onto a DVD and started the Windows 10 installation from the DVD. During the installation I completely deleted all partitions, including the private data, and reinstalled Windows 10. Now my system boots normally again since 2 days.


How to open Calc from terminal and insert files?

Question: How to write a command to terminal in Linux that open LibreOffince Calc and inserts files in it? All files consist of one column.
Answer: It is not clear what do you mean by "insert files in it"... May be you can give some examples.
You can open calc from commandline by
libreoffice --calc

Comment: Thank you. I mean I have file1 that consists of one column, file2 that consists of one column... and I want to insert file1, file2 to calc in a way that in column A will be file1, in column B file2...
Comment: @LukášAltman Clarifications to the question should be edits to the question itself, not left as comments to answers.
Answer: It is not clear what is the format of your original files and format of the expected output (e.g. odf, sxw, xls, xlsx, csv, etc.)
Simplest case: all csv
Then you can use bash's paste command:
paste <(cat file1.csv) <(cat file2.csv) > out.csv

And then open out.csv in libreoffice:
libreoffice --calc out.csv

Complicated case: xls or odf or other:
In such cases, I would recommend converting them to csv and use the trick as above.
libreoffice --convert-to csv file1.xls
libreoffice --convert-to csv file2.xls
paste <(cat file1.csv) <(cat file2.csv) > out.csv
libreoffice --calc out.csv

If you want your output to preserve the formatting and other properties, then you will have use other tools. Another similar tool you can try is oooPy, though I must admit, I have never used it! Also not sure if it works with latest version of libreoffice.
Comment: Thank you very much. And what is wrong with this? `paste <(cat vypis.csv) <(cat sums.csv) <(cat L1R.csv) <(cat L2R.csv) <(cat L3R.csv) > out.csv` it gives error: `cs: 17: cs: Syntax error: "(" unexpected` ?
Comment: It works when I write it in terminal but is it possible to write it in file that is used like sh file in terminal?
Comment: @LukášAltman, you have be more specific and precise... give more details of exactly what you want!!! I dont know which shell you are using, but if I put this **exact** line in a script with `#!/bin/bash` as the first line, it works!
Comment: `paste column1.csv column2.csv > table.csv` works as well


Main panel grounding

Question: I have installed a 200 Amp meter upgraded from the old 60 amp and then installed a 200 disconnect with a breaker type switch inside then feeding 200 amp main panel.  My question is do I bond neutral and ground together in the disconnect then run a separate ground to the panel and keep neutrals separate in that panel box and treat it like a sub panel or leave them unbonded in the disconnect and bond them in the panel?
Comment: @AndrewBrown -- does this "disconnect" have an *interlock* on it to prevent it from being turned on at the same time as the generator breaker is turned on?
Comment: @AndrewBrown -- mostly getting you to a way of hooking up the generator that can't accidentally backfeed the grid at 2AM in the dark and rain
Comment: This question should have the generator details edited into it otherwise the answer is nonsensical if the comments get trimmed
Comment: Is your 200A panel a *main breaker* panel or a *main lug* panel? Are you correct in saying the 200A disconnect is inside, in addition to the 200A panel being inside?
Comment: @ThreePhaseEel  Does that make a difference?   I believe once you are downstream from a disconnect of any sort, everything needs to be treated as a sub-panel with the neutral and ground isolated.   I recently helped my son on the wiring on his house which included a 200 amp generator transfer switch between the meter and his main panel. We treated the main panel as a sub-panel and it passed inspection just fine.  So I'm curious about main-lug vs. main breaker that you mentioned.
Comment: @GeorgeAnderson -- there are some provisions in current Codes that allow for a not-a-service disconnect to be placed between the meter base and the service disconnect
Comment: the disconnect is directly under the meter so I could turn off for a generator and the what was originally a main panel is inside the home located in the basement we are going to move it to outside the stair well for better access but it will still be inside the home.  I hope this helps
Comment: no just a 200 amp breaker that is manual
Comment: @AndrewBrown -- what make and model is your generator? Also, what all are you interested in running off of it? There are a couple things that need to be fixed here...
Comment: @ThreePhaseEel well as of now i dont have one since my ex wife took it when she cleaned out the house but i had a 7500 which i used and it would power about everything in the house as long as the well was not running or the hot water heater and what needs to be fixed?
Comment: @ThreePhaseEel that is not an issue as when that did happen it just trips out the genny however it was just a portable so on my way out to start it I would just throw the breaker and start it.  I just wanted to make sure that when I wire my new breaker box that I would be within code by separating the grounds and neutrals
Comment: @AndrewBrown -- what all do you want to run off your generator? That's the biggest question here -- are you OK with just backing up the well pump and some outlets/lights that are determined when you put things in, or are there other things that you want/need backed up as well?
Answer: You need a proper transfer switch in order to legally and safely use that generator
Your first order of business here is to throw away the suicide cord (after chopping it into pieces that is) and get a proper inlet box, generator cord, and most importantly, a proper transfer switch for your application, so that you don't get blamed for a fried linesman, or written up for a blatant Code violation for that matter.
In your situation, especially considering that you are going to be going generator shopping, you will also have to deal with the other point many people who put generator setups in get snagged on; namely, neutral/ground bonding.  You see, most portable generators come from the factory with neutral and ground bonded together, so they can be safely and legally used for portable power applications, such as those found on jobsites.  However, the service disconnect sitting on the outside of your house also has a neutral-ground bond inside it, and putting the two bonds in parallel causes current to flow places it's not supposed to go.
As a result, most residential (portable generator) transfer applications require a transfer switch/panel with a switched neutral, so that the generator's bond and the house's bond are kept separate.  Fortunately, there are a few transfer panels out there that can provide a switched neutral alongside the other conveniences one comes to expect from a transfer switch.  Most notable among them would be the Reliance Controls XRK models from their Panel/Link X series, as they can legally take most (GE THQL being the only exception) 1" breakers, and can be ordered through a variety of dealers (including online sellers) for a reasonable price.  If your existing 200A subpanel uses 3/4" breakers (CH or QO), then you may wish to look at other options, though.  Eaton makes a switching-neutral CH transfer panel (the CH10GEN50xxSN parts) that matches existing CH panels, and while Square-D doesn't make a single product that's directly suitable, they do make the requisite parts needed to field-fabricate such a transfer panel from a suitable QO loadcenter.
Once you get that transfer switch in...
Once you get a suitable transfer switch in, we can then move onto grounding and bonding considerations as part of the installation of both your subpanel and the transfer switch, which in all likelihood will be treated as a subpanel of your indoor subpanel (which is fine).  In both cases, you'll be running 4 wires (hot, hot, neutral, ground) from the power source (disconnect to subpanel, subpanel to transfer switch) to the destination, and leaving the bonding means (bonding screw or bonding strap) out when you reach said destination.  Furthermore, you'll also need to run a 4-wire feed from the inlet box over to the transfer switch, just like you were running a feeder to a subpanel as described above.

Main panel grounding


How does authorship and copyright work in translation?

Question: I am a freelance translator, and once received a request from a client saying that they were supposed to translate a chapter of a book, but had to outsource this task as it was difficult.
I declined this request, but assuming that the client was to translate the chapter so it could be published, how would authorship and copyright work? Can I expect to receive credit and royalties from the publication? If not, does the client take all of the credit and the royalties?
Answer: Copyright works somewhat differently depending on jurisdiction, and we can't give legal advice here, but this is a rough summary of how it tends to work:
If someone translates a copyrighted work, the translation has its own copyright which belongs to the translator. However, because the translation is a derivative work of the original, the copyright holder has the right to control (as in forbid or license) the publication and other exploitation of the translation. They do not automatically own the rights to the translation, but the translator cannot exploit their work unless the copyright holder of the original grants license.
If a translation is exploited, it is possible to receive royalties as a translator, but the details would have to be part of either the license agreement or the translator's contract with the publisher. In most cases translators do not receive royalties but a fixed remuneration for their translation service, because...
...It is also possible for a translator to create a translation as a work for hire. In this case the contract for the translation stipulates that the copyright for the translation belongs to its commissioner in return for the agreed upon remuneration. This tends to be the more common case.
Answer: The answer by Pahlavan is basically correct, but there are a few nuances.
In most countries, even making an unpublished translation without permission is copyright infringement, although of course the owner cannot sue unless s/he learns that it has happened. The owner can impose whatever conditions s/he pleases in return for permission, including a share of any royalties.
It is usual to credit a translator even if no royalties are paid, but not invariable.
Translations of entire works are usually not covered by exceptions to copyright such as fair use or fair dealing. However, in some places a translation made purely for personal use might be an exception and not require permission.
If a translator is commissioned, royalties are less likely, and credit is somewhat less likely.


Implementation problem of an interface in Kotlin

Question: I have a question about dealing with interfaces.
I get an error when I try to use an interface in this way.
When I try to implement the interface this way, I get the error that the setter cannot be marked as "private".
How can you implement that a variable is in an interface, can be changed with methods and the variable itself cannot be changed from the outside when implemented in a class?
It would be possible to declare the variable with "val" in the interface and then adopt it as "var" in the class, but then no standard implementation of the methods in the interface is possible.
If this is not possible in principle, what is a correct solution approach that is OOP compliant?
Many thanks for your help!
interface Product{
    var count: Int

    fun add(i: Int) {
        count += 1
    }

    fun remove(i: Int) {
        count -= i
    }
}

class Salami(count: Int) : Produkt {
    override var count: Int = count
        private set // Error
}

Answer: Good question! In principle, the visibility modifier you're looking for is called protected.
// NOTE: Non-working code; see below for explanation
interface Product {
    var count: Int
        protected set

    fun add(i: Int) {
        count += i
    }

    fun remove(i: Int) {
        count -= i
    }
}

class Salami(count: Int) : Product {
    override var count: Int = count
        protected set // Error
}

If this worked, it would say "count can be read publicly but can only be assigned from Product and its subclasses", which sounds like what you want.
Unfortunately, the JVM (and Kotlin by extension) doesn't allow the protected modifier inside of interfaces. The reasons for this have been discussed in other places, but regardless of the reasons, it won't work right now, which makes life difficult for the exact design pattern you're trying to write.
So we're left resorting to older Java-style patterns. You could always make your interface an abstract class (with all of the limitations that come with that).
abstract class Product(count: Int) {
    var count: Int = count
      private set

    fun add(i: Int) {
        count += i
    }

    fun remove(i: Int) {
        count -= i
    }
}

class Salami(count: Int) : Product(count) {}

But now callers have to extend a class rather than implement an interface, which restricts them to single-inheritance.
You could instead use the abstract implementation pattern, which was used by standard Java libraries like Swing before we had default implementations in interfaces. With this pattern, your interface Product is completely abstract and has no default implementations. But then you provide an abstract class AbstractProduct which implements all of the methods neatly. Callers are still free to implement the methods themselves if they need to extend another class, but most callers will just extend AbstractProduct. In your case, that would look like this.
interface Product {
    val count: Int
    fun add(i: Int): Unit
    fun remove(i: Int): Unit
}

abstract class AbstractProduct(count: Int) : Product {
    // Note: final modifier is required here since we have a private
    // setter, which cannot be open.
    final override var count: Int = count
      private set

    override fun add(i: Int) {
      count += i
    }

    override fun remove(i: Int): Unit {
      count -= i
    }

}

Now most applications would look like this.
class Salami(count: Int) : AbstractProduct(count) {}

But if Salami needed to extend Meat or some other class, it could instead do the work itself like so.
class Salami(count: Int) : Meat(), Product {
    final override var count: Int = count
      private set

    override fun add(i: Int) {
      count += i
    }

    override fun remove(i: Int): Unit {
      count -= i
    }
}

So users can still get the full generality if needed, but in the simple case, everything will just work. It's not perfect, but it gets close to what you want. Just remember that functions taking a product should always take Product, not AbstractProduct, as the latter is an implementation detail.
Composition over Inheritance
Finally, you could always favor composition over inheritance. This count setup you've got is sort of its own encapsulated subsystem, so we could make that explicit.

class ProductCount(initialValue: Int) {

    var value: Int = initialValue
        private set

    fun add(i: Int): Unit {
      value += i
    }

    fun remove(i: Int): Unit {
      value -= i
    }

}

interface Product {
  val productCount: ProductCount
}

class Salami(count: Int) : Product {
  override val productCount = ProductCount(count)
}

Now only ProductCount can ever modify the count. Not even Product can do it, aside from the add and remove methods provided to it. We've decoupled a product's count from the product itself. And, if you want, you can even provide delegator methods on product which call the same methods on ProductCount, to make the API look even more like your original one.
interface Product {
  val productCount: ProductCount

  fun add(i: Int): Unit = productCount.add(i)
  fun remove(i: Int): Unit = productCount.remove(i)
  val count: Int
      get = productCount.value
}

Now your public API is exactly what you wanted it to be. You've got a count integer variable which cannot be modified from the outside, and you've got add and remove methods that do modify it. The fact that all of this is encapsulated inside a ProductCount class is fairly well hidden from the users of your API.
Comment: Great explanation :-D


Consulting potential postdoc positions: Good idea to avoid the email being ignored

Question: I'm planning to consult a potential future advisor for a postdoc position. However, they do not put up any advertisement for postdocs, thus there is a large possibility that they cannot afford a postdoc. However, even if they cannot afford any postdocs, I still prefer them to read my email, as our work are close in some degree and I do not wanna lose the opportunity for them to point me to someone else. For this reason, is it a good idea to not mentioning postdoc position upfront in the subject and only mention it much later in the body of the email?
Comment: " much later in the body of the email" What's much later? It shouldn't be more than 2-3 sentences anyways.
Comment: @DSVA If I were a professor, I won't read such an email unless I know this version. In my view, applicants are supposed to show the connections between their expertise and the position, which cannot be done in 2-3 sentences. Professors are just too busy to figure out the connections for each applicant.
Comment: That's why you add a CV, research overview and maybe another cover letter. The email itself needs to be extremely short, otherwise the chances are high that the Prof. decides to read it later and forgets, while short emails are more likely to be read right away.
Answer: Professors are often very busy. Sometimes they receive more than 100 emails per day, not including automatic messages. An email from a stranger without essential information in the subject field / first line is not likely to be answered.
Answer: Consider a title such as: Postdoc on [subject]
Body:
[Greetings]
I am PhD student / postdoc working with/at/on institute/advisor/subject (whichever you judge would interest the advisor). I am interested in your work on [subject] and maybe mention a particularly interesting article. Would you happen to have open postdoc positions or other funding options I could pursue?
I attached my CV and here is a link to a related publication of mine that I am proud of, or my homepage etc.
Maybe mention a concrete research idea here, if you have one.
[End matter]

I would not expect the potential advisor to work as a recruitment service, but if they answer positively but do not have positions open, you might ask if they know someone working on related subjects who could hire you.
Also, if you are willing to co-operate even without, or before, getting the position, you might want to mention that and maybe even add it to the subject.


Asymptotic null distribution of the LR statistic with point null and point alternative

Question: I have a large sample (a vector) $\mathbf{x}$ from a random variable $X\sim N(\mu,\sigma^2)$. The variance $\sigma^2$ is known, but the expectation $\mu$ is unknown. I would like to test the null hypothesis $H_0\colon \ \mu=\mu_0$ against the alternative $H_1\colon \ \mu=\mu_1$ using a likelihood ratio (LR) test. The test statistic is
$$
\text{LR}(\mu_0,\mu_1)=-2\ln\frac{L(\mathbf{x}\mid\mu_0,\sigma^2)}{\max\{\ L(\mathbf{x}\mid\mu_0,\sigma^2), \ L(\mathbf{x}\mid\mu_1,\sigma^2)\ \}}.
$$
Question: What is its asymptotic distribution under the null?
Comment: Related question: ["What are the regularity conditions for Likelihood Ratio test"](https://stats.stackexchange.com/questions/101520).
Comment: Related question: ["Failing to obtain $\chi^2(1)$ asymptotic distribution under $H_0$ in a likelihood ratio test"](https://stats.stackexchange.com/questions/506763).
Comment: Related question: ["Testing a nonstandard hypothesis: constructing test statistic, finding rejection region and obtaining p-value"](https://stats.stackexchange.com/questions/506560).
Answer: As you increase the sample size under the null, you'll simply keep pushing all the probability mass on to a log likelihood ratio of zero as the probability of $L(\mathbf{x}\mid\mu_1,\sigma^2)$ relative to $L(\mathbf{x}\mid\mu_0,\sigma^2)$ continues to fall. So for a given sample size $n$, tests of size greater than $\Pr_n\left(\bar X=\frac{1}{2}\right)=1 - \Phi\left(\frac{\sqrt n}{2}\right)$ won't exist, & the p-value distribution will be non-uniform.
The usual LR statistic for point hypotheses would be
$$
\text{LR}(\mu_0,\mu_1)=-2\ln\frac{L(\mathbf{x}\mid\mu_0,\sigma^2)}{L(\mathbf{x}\mid\mu_1,\sigma^2)}.
$$
allowing the construction of tests of any size, & providing a uniformly distributed p-value. It doesn't have an asymptotic distribution under the null, becoming stochastically smaller as sample size increases; which is to be expected—as Cox &  Hinkley (1979) put it, this reflects the fact that "for separate hypotheses consistent discrimination is possible". You don't need asymptotics here anyway: you can always calculate or simulate the exact distribution  of a test statistic under a point null for any sample size—& of course in this case it's a monotonic function of the sample mean, which has a familiar distribution.

Cox & Hinkley (1979), Theoretical Statistics, Ch. 9, "Asymptotic Theory"
Comment: Thank you for your answer! Could you explain what you mean by *the probability of $L(\mathbf{x}\mid\mu_1,\sigma^2)$ relative to $L(\mathbf{x}\mid\mu_1,\sigma^2)$*? Could you also explain why the LR statistic is not the one I wrote? I based mine on some general textbook material on LR testing. It has a familiar expression of a constrained maximum in the numerator and an unconstrained maximum in the denominator (and reminds e.g. of an $F$-test that I know from regression context).
Comment: Also, why is there a problem with the asymptotic distribution in this case? When talking about asymptotic distributions, we typically scale the statistic by $\sqrt{n}$ so that it converges to a random variable rather than a constant. Is this case fundamentally different?
Comment: (1) Sorry - fixed a typo. (2) The constrained over unconstrained likelihood formulation of the LR test arises from its equivalence to the null over alternative likelihood formulation when the null is of a lower dimension than the  alternative - a point on a line, a line in a plane, &c. (3) That depends: people do talk loosely about, say, the asymptotic distribution of the sample mean, but I read you literally here - after all, the (unscaled) log likelihood ratio famously does have an asymptotic distribution under some conditions (including in particular that the unconstrained ...
Comment: ... maximum-likelihood estimator can get arbitrarily close to the true parameter values, which it can't in this example.)
Comment: Could you perhaps recommend a treatment of LR testing that is relatively nontechnical but has good intuition?
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/120800/discussion-between-scortchi-reinstate-monica-and-richard-hardy).
Answer: I have simulated it below in R for a single value of $\sigma^2$ but am still lacking insight. For the particular value of $\sigma^2$, the shape reminds me a bit of $\chi^2(1)$ distribution. However, this varies with $\sigma^2$.
<code>n=3e3            # sample size
sigma=10*sqrt(n) # standard deviation of X
m=3e3            # number of simulation runs

logL0s=logL1s=logLRs=rep(NA,m)
for(i in 1:m){ # Runs some
 set.seed(i); x=rnorm(n,mean=0,sd=sigma)
 logL0=sum(log( dnorm(x,mean=0,sd=sigma) ))
 logL1=sum(log( dnorm(x,mean=1,sd=sigma) ))
 logLR =-2*(logL0-max(logL0,logL1)) # the -2*ln(LR) statistic from this simulation run
 logL0s[i]=logL0; logL1s[i]=logL1; logLRs[i]=logLR
}

# Plots illustrating the sampling distribution of -2*log(LR) statistics for a particular value of sigma
par(mfrow=c(2,2),mar=c(2,2,2,1))
 plot(logLRs,main="Scatterplot of -2ln(LR) across simulation runs")
 plot(NA)
 plot(density(logLRs),main="Density of -2ln(LR)")
  chisq.quantiles=qchisq(p=seq(from=0.001,to=0.999,by=0.001),df=1)
  chisq.density=dchisq(x=chisq.quantiles,df=1)
  lines(y=chisq.density,x=chisq.quantiles,col="blue",lty="dashed")      # Chi^2(1) overlay
 br=24
 hist(logLRs,breaks=br,main="Histogram of -2ln(LR)")
  lines(y=chisq.density*m/br,x=chisq.quantiles,col="blue",lty="dashed") # Chi^2(1) overlay
par(mfrow=c(1,1))
</code>
Comment: You've set the sample size to `m`, not `n`.  And I'd say a plot of the empirical distribution function would be more informative than the ones shown: `plot(ecdf(logLRs), verticals = TRUE)`.


How does one creates Jupyter a notebook from the command line without using the browser?

Question: I am trying to use ob-ipython in a pure terminal setup, but I don't know any way of creating or starting a notebook engine. It must have the http interface for ob-ipython to work.
Answer: You can request jupyter to not open a browser by passing the argument --no-browser.


Green's Theorem special application

Question: If I want to evaluate the flux  of a vector field over an unfinished square (basically over three sides of a square), instead of parametrezing the 3 sides and computing the flux 3 times, can I use Green's theorem over the full square and subtract from it the flux over the line integral of the side that was not available before?
Answer: After re-reading I think you seem to suggest
\begin{align}
\int\limits_\sqsubset A \cdot dr
&=
\int\limits_{\square = \partial S} A \cdot dr -
\int\limits_{.\vert} A \cdot dr \\
&=
\int\limits_S\text{curl } A  \cdot dS -
\int\limits_{.\vert} A \cdot dr \\
&=
\int\limits_S (\partial_1 A_2 - \partial_2 A_1)
\lVert dS \rVert-
\int\limits_{.\vert} A \cdot dr \\
\end{align}
where we extended to three dimensions in between by giving the square surface a unit normal in positive 3-direction: $S = \lVert S \rVert  e_3$
and using Kelvin-Stokes instead of Green.
Comment: I don't really understand your answer. Why do I need to find a vector potential A?
Comment: Let me rephrase maybe I didn't explain myself very well:

Imagine A(1,-1), B(1,1), C(-1,1), D(-1,-1) 4 vertices of the square ABCD. Now I want the flux over the curve that goes from A to B, B to C and C to D.

Can I use Green's Theorem over ABCD and subtract from that the flux over CD?
Comment: For the flux-divergence or normal form Green's Theorem, it relates the partial derivative of M with respect to x (i component of vector field) with partial derivative of N with respect to y (j component of vector field) which we add and take the integral over the region formed by the curves.
Comment: Ok it seems we have a mismatch of dimensions. I gave the 3D version.
Comment: So is this technique of application correct?

Edit: Oh I see. For now we are only using it in 2 dimensions.

Green's Theorem special application


"Fingerprinting" and human error

Question: Pretend for a moment I am investigating an attack.  I find errors in the attack method (mistakes made by the human attacking my network/computer).  I compile a database of these "mistakes" treating them like a fingerprint.  I then look through sites like security.stackexchange.com comparing the mistakes to questions asked/answered.  How many positives would you feel I need before I have a strong lead on a suspect?  Keep in mind I can cross reference to other sites.  How many cross referenced sites would I be expected to use before I have sufficient cause to call someone a suspect?  This is an opinion, so the question might be closed.  However, this is also a viable though inexact technique.  I'm also considering that many "attacks" are cookbook techniques.  In being used over and over, the first person to figure out the technique made the mistake, and everyone else is just reproducing it at some level.
Answer: Essentially you want to apply a Bayesian analysis to a corpus of work, to state something about the likelihood that you would believe an exemplar to be a member of the set constructed by your suspect. That analysis is well-known (and there's a whole statistics stackexchange site, too). You need about as big a corpus of suspect and non-suspect material as a decent spam filter uses.
Answer: I don't think this technique can hold much water, since it is likely that the attacker simply copypasted his way into your network.
Even if you keep searching for more references, your "suspect" could simply have found those sites too and copied from them. Note this may be the truth, or simply his alibi which you cannot disprove.
Comment: At this point I'm only looking for suspects.  I'm not convicting them of anything, only considering them or not considering them.  Does this help sway your opinion in anyway?
Comment: If I found, say 100 mistakes, and every one of them had the same persons ID attached as a question/answer, you feel that I haven't found anything statistically significant?  How about a thousand?
Comment: @Everett, not really, unless you have some other information. E.g. this was done on internal servers with no outside access, and your suspect HAPPENS to be an employee at your org, AND the timestamps match up to just shortly before the attack... then yeah, maybe this is additional "proof". But not by itself.
Comment: I have worked with people that SWORE by Shifflet, for example, even though there was a substantial mistake IN EVERY SINGLE POST. If he has reason to "follow" this person, he could have trusted him blindly and taken ALL the mistakes. However, it MIGHT be a little more suspicious... But all you can really "know" (statistically speaking) is that he read the same posts as you. And that he's not smart enough to recognize that its a mistake.

"Fingerprinting" and human error


Querying DashBoard Data

Question: I'd like to query the data of dashboard particularly the stored 'ID'. Is it possible to get the stored dashboard data ID through SOQL query?
Answer: You can query the Dashboard object to get the dashboard's ID, and the DashboardComponent elements for that dashboard. Take a look at the SOAP API Developer's Guide.
Comment: `Dashboard.Id` is the ID of the dashboard, `Dashboard.FolderId` is the ID of the folder the dashboard resides in, and `Dashboard.RunningUserId` is the running user for the dashboard. That's about it. Not sure what you're looking to access...
Comment: FolderId - Returns the ID of the Folder that contains the dashboard. Is this is the only id object?
Comment: I can find the Dashboard Id and Running UserId but could you guide me where i can find the rsid(Dashboard chart id)?
Comment: There's no way to get "rsid"; it's on a table that isn't supported in SOQL (internal use only). You can only use the metadata API to get or set the configuration.

Querying DashBoard Data


Changing up gamma with -lavfi and ffmpeg

Question: This is my first time posting on this forum, so don't be too rough on me, haha.
I have recently started taking up FFmpeg as a side project for my media class, and I am facing some problems when it comes to changing up some aspects of gamma/contrast.
Whenever I use a command like this:
ffmpeg -i input.mp4 -lavfi colorcontrast=gm=-1:gmw=1 -y -c:a copy output.mp4
the problem I have is of playing the specific output video (the video is only available when it is played by QuickTime Player, yet when I try to open it on other video players or video editing programs a message appears that the video is unavailable).
I have already been using other FFmpeg commands for cropping, removing audio track etc., however this is my first time trying and/or having a problem of this kind for more complex changes of video track.
Thank you and have a great day!
Answer: The following video codec settings should be the most common for all devices
-c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p

H.264 baseline profile and level 3.0 settings require less resources.


Can a creature in a maze spell do anything besides try to escape?

Question: I have been looking over a lot of different Pathfinder spells to see how I could use them cleverly and found the spell maze, which banishes a target for 10 minutes. Can a creature (like the spell's caster) that's the subject of this spell, instead of trying to escape, use this maze time to, for example, apply buffs or summon an army?
Answer: A creature can do what it wants while affected by the spell maze, including trying to escape
A creature doesn't have to, but it may try to escape the maze effect:

Each round on its turn, it may attempt a DC 20 Intelligence check to escape the labyrinth as a full-round action.

That is, the option to make an escape attempt is available in addition to whatever the creature could normally do. This is further supported later in the spell's description:

Spells and abilities that move a creature within a plane, such as teleport and dimension door, do not help a creature escape a maze spell, although a plane shift spell allows it to exit to whatever plane is designated in that spell.

This strongly suggests that, instead of trying to escape by making an Intelligence check, a creature can do other things like, for example, cast spells (including the spell plane shift to escape). Note that, while affected by the spell maze, the creature is in an extradimensional space, and this may limit the creature's options.
Summoning while in the labyrinth
Through Dungeons and Dragons, Third Edition, the spell maze actually created the extradimensional space and the labyrinth of force then banished the subject creature there.
Dungeons and Dragons 3.5 (and, subsequently, Pathfinder) has the maze spell, instead, only banish the subject to an extradimensional labyrinth dimension (rather than creating the labyrinth for the subject). It's likely, then, that, for example, creatures summoned by a banished subject remain in the labyrinth dimension until they can escape on their own.

Previous versions of the spell maze were more... confining
In case there's some lingering confusion due to prevision versions, some older versions of the spell maze from Pathfinder's antecedent Dungeons and Dragons did, in fact, restrict a creature affected by the spell maze from doing anything but experiencing the labyrinth or trying to escape. For example:

The Player's Handbook (1978) for Advanced Dungeons and Dragons has this as part of the description of the spell maze:

The recipient will wander in the shifting labyrinth of force planes for a period of time which is totally dependent upon its intelligence. (90)

Emphasis mine. (It should be known that I have always interpreted this as the affected creature being restricted to just wandering, but another DM may interpret this differently.)
The Player's Handbook (1995) for Advanced Dungeons and Dragons, 2nd Edition subtly changed the AD&D spell's description:

The subject vanishes into the shifting labyrinth of force planes for a period of time which is dependent upon its Intelligence. (241)

Emphasis mine. Yet, in the Dragon #170 Sage Advice column, the Sage addresses this issue head-on:

The spirit of the spell description suggests that the nature of the labyrinth created by the maze spell prompts the victim to escape as soon as possible, and that no actions other than escape are possible while a victim is within.  The victim can try a spell to get out, but he cannot do anything that does not contribute directly to escape.

It wasn't until the maze spell appeared in the Player's Handbook (2000) for Dungeons and Dragons, Third Edition that a creature could—absolutely and without risking violating the spell's letter or spirit—do something other than try to escape the effect of the spell maze, that version of the spell having much the same text as the Pathfinder spell does now.
Comment: Thank you for this detailed description. Now if you excuse me, I have a NPC encounter to design with a witch that has 22 casts of **Summon Monster** of varying degrees.
Comment: @Theik From a gamist standpoint, summoned monsters are on the summoner's clock and something he's spent resources on, so letting them eventually escape somewhere near the summoner seems only fair. I'd probably allow the summoned creatures (those that can, anyway) to escape adjacent to the summoner, given enough room, the summoner, after all, having been subject to the spell in the first place.
Comment: @Areadbhair You're running a campaign wherein there's *at least* a 15th-level caster. You're already outside the realm of developer-playtested *D&D 3E* and at the end of *Pathfinder* adventure paths, so, yeah, house rules will be necessary. Have fun, and give the PCs the same opportunities.
Comment: @Areadbhair Update includes why that probably won't work as well as expected.
Comment: One has to wonder where a summoned creature would even escape to if it makes its save. It never entered the labyrinth from anywhere, it was summoned inside. I guess the most reasonable solution would for it to be return to wherever it was before it was summoned, as if it had been banished to the maze by the act of summoning it there?
Comment: @Theik Curses, I was banking on whatever creatures I summoned following me to my plane of existance
Comment: @HeyICanChan TY
Comment: @Areadbhair You could still summon 8 creatures and then *plane shift* them out. More if any of the creatures you summon can cast *plane shift*. (Although it does introduce the bizarre requirement of only summoning creatures that have hands.)
Answer: Yes.  On the creature's turn it may make an intelligence check to escape the labyrinth, but it does not have to.  It still gets a turn and can cast whatever it would like during that time, barring any extra-dimensional limitations that may be placed on the creature.  The question is, why would you want to use the spell in this way?  The duration is 10 minutes if you don't attempt the check, making it not very useful for a safe-haven to buff yourself within, especially when there are lower level spells that can perform that same function.  Then again, if you can cast this spell on yourself you probably have no problem hitting the DC 20 to escape the maze.  I hope you don't roll a one.
Comment: It seems to me that the summoned monsters won't be able to necessarily follow you if you escape the maze. There can be a DM's ruling that they will stay behind unless they can beat the DC themselves.
Comment: That will raise a question of what to do with 'On escaping or leaving the maze, the subject reappears where it had been when the maze spell was cast.' regarding the summoned creature that escapes the maze on it's own. Sorry, it's just a state of mind I'm in at the moment...
Comment: Well then it's a good thing that your run-of-the-mill **Summon Monster** spells are Summoning sub-school and not Calling sub-school.
Comment: @LegendaryDude The first ruling _might_ be a bit off, due to the fact that the creatures from _summon monster lvl I-IX_ are specifically attracted to you within a round (as per Summoning Sub School) and not pulled from another plane (as per Calling Sub School). However I might be willing to accept the DM negation out of the fact that _Maze_ specifically negates the Calling Sub School when most of the other schools of Conjuration also bring creatures t your aid.


Regression's population parameters

Question: Suppose I've specified a linear regression model:
$$
Y = \beta_0 + \beta_1 X + \epsilon
$$
where $\beta_0$, $\beta_1$ are the population parameters. My question is: why are these parameters populational? My intuition is that they are calculated based on all the possible realizations of the random variables $X$ and $Y$. The coefficient $\beta_1$ is $E(XX')^1E(XY)$ where the expected values are calculated based on all the possible realizations of both variables and their probabilities.
Answer: The linear regression model that you specified can be view as a linear approximation of expected value of $Y$  on $X$. In many presentation about regression this fact is not clearly affirmed but it seem me very relevant. So, as usual in mathematical statistics, you have some parameters $\theta$s that characterize the joint distribution $(Y,X)$. These are population parameters or, equivalently, the exact/true parameters. You can see $\beta$s as transformations of $\theta$s, so you can see the $\beta$s as population parameters also.
Changing point of view we can think about statistical inference. So, very briefly, we can collect data from $Y$ and $X$ and estimate a regression in order to analyze some associations of interest (note: estimated approximation of expected value of $Y$  given $X$). Here you achieve the estimated parameters $\beta_{est}$ that seem me what you have in mind (est stand for estimator). Moreover you can interested in many features of $\beta_{est}$, for instance efficiency. In fact $\beta_{est}$ have its variance while $\beta$ is a constant. This happen precisely because $\beta$ collect population parameters and $\beta_{est}$ their estimators.
Answer: As I understand it, a main point of this question concerns the relevance of the term "population."  In much of statistics, and particularly in regression, that term either needs to be dropped altogether, or at the very least, placed in quotes. It leads to silliness and  misunderstanding, and is often is just plain wrong.
For regression, the problem with the "population" term lies in the definition of $E(Y | X = x)$, which is what the regression model is supposed to aim at. In the classic finite population model, there is simply not enough data (sometimes no data at all) in cohorts defined by $X=x$ for the population average in the cohort to have any useful meaning. Instead, it is at best a noisy estimate of some true quantity. The problem is greatly exacerbated in the case where $X$ is vector, i.e., in multiple regression, because the cohorts defined by multiple fixed values of $X$ greatly dwindle in sample size.
An example:  Let $Y$ be a person's height, and let $X$ be the numerical (ordinal) value of one of their 16-digit cards. (Credit card, etc.).  In the population of everyone on the planet at this instant who own such a card, there will be a certain number of people (very small) whose number is 3422337799818871. In the population setting, the value $E(Y | X=3422337799818871)$ refers to the average height of these people.  This number may be an average of just one or two person's heights, clearly a very noisy estimate.  The true regression function, in the "population" sense, is then these $E(Y | X=x)$ as a function of $x=0,1,2,\dots,9999999999999999$. It is a very noisy, wobbly function.
This "population regression function" is clearly very different from what we understand as the true regression function in this case, which is correctly given by $E(Y | X = x) = \beta_0 + \beta_1 x$, where $\beta_1 = 0$.  (Although I'd like to hear an argument for why $\beta_1$ might be different from 0!)
So, rather than refer to populations, the regression model should instead refer to potentially observable data, which applies equally to the population as well as any sample. (The population itself is comprised of particular realizations of potentially observable data.)  This definition of the regression model in terms of potentially observable data seems to be implicit in the OP's correct understanding that the regression model should refer to "possible realizations" rather than "populations."

Regression's population parameters


where infopath file attachment are stored

Question: I use infopath form,nearly i using 20 file uploaded in infopath form by each view(stages).where the uploaded file are stored?.when check in SQL library database and sharepoint library,there only textfield and datepicker are showing but file attachment not show in database and library.please can show where 20 uploaded file are store?
Answer: If you are using InfoPath with an associated list, the file should save directly to that list item.  But to make sure, go to Advanced Settings and in the middle of the page is Attachments - select "enabled".
Comment: But we use 20 attachment file...how it store on the list item?Because in sharepoint list, we store only one document as a list item on sharepoint list .
Answer: Normally, the files attached into an InfoPath form are saved into the same form as a string base64.
Greetings


Gronwall estimate with a Fourier transform

Question: Suppose I have the following equality
$$\hat{u}_\epsilon(t,k) = \alpha(t,k) + \int_0^t\int_{\mathbb{R}^n} e^{ik\cdot(x +\epsilon \phi(s,x))}u_\epsilon(s,x)dxds$$
Where $\alpha(t,k) \geq 0$ and $\alpha(t,\cdot)\in L^1( \mathbb{R}^n)$. Moreover $\phi \in C^\infty\cap L^\infty(\mathbb{R}\times\mathbb{R}^n)$ and $\epsilon \in (0,1]$. Furthermore, $\hat{u}_\epsilon$ denotes the Fourier transform of $u_\epsilon$. I would like to deduce a uniform estimate for $\|\hat{u}_\epsilon(t,\cdot)\|_{L^1}$ with respect to $\epsilon$ (as $\epsilon\rightarrow 0^+$) using Gronwall's inequality. I am wondering if it's possible in general due to the non-linear exponent $e^{ik\cdot(x+\epsilon\phi(s,x))}$. The relevant theorem is the Beurling-Helson theorem which makes me think I cannot get such an estimate unless $\phi$ is linear in $x$. But the fact that the map $x\mapsto x + \epsilon\phi(t,x)$ is nearly the identity makes me think otherwise. Any ideas would be appreciated.
Answer: I will more comfortable with the notation $v_\epsilon=\hat{u_\epsilon}$; you have then
$$
v_\epsilon(t,x)=\alpha(t,x)+\int_0^t\int e^{2πix(\xi+\epsilon\phi(s,\xi))} \hat{v_\epsilon}(s,\xi) d\xi ds=\alpha(t,x)+\int_0^t \bigl(\textrm{Op}(e^{2πix\epsilon\phi(s,\xi)})
v(s,\cdot)\bigr) (x) ds
$$
where $\textrm{Op}(e^{2πix\epsilon\phi(s,\xi)})=A_{\epsilon, s}$ is the
operator with symbol
$e^{2πix\epsilon\phi(s,\xi)}$. Let me now assume that $A_{\epsilon, s}$ is bounded on $L^2(\mathbb R^n)$ and that $\alpha$ is in $L^2$: you get with $L^2$ norms
(the triple norm is the operator-norm)
$$
\Vert v_\epsilon(t)\Vert\le\Vert\alpha(t)\Vert+\int_0^t\vert\!\Vert A_{\epsilon, s}\Vert\!\vert
\Vert v_\epsilon(s)\Vert ds,
$$
and if $\vert\!\Vert A_{\epsilon, s}\Vert\!\vert$ as a function of $s$ is in $L^1$, you can use Gronwall. The real problem is to get an estimate for the triple norm (by the way $\phi$ is certainly real-valued): that operator is likely to be a Fourier Integral Operator and not a pseudo-differential operator, so to get the sought bound you should consider
$$
 A_{\epsilon, s}^* A_{\epsilon, s},
$$
which will be a pseudo-differential operator under some assumptions on $\phi$.


How to achieve custom calendar in ipad app which looks like outlook calendar and has events(can be multiple events at the same duration) for the day

Question: I am developing an iPad application in which data of calendar events for the day comes from the webservice and i have to display the data in a calendar UI which looks like outlook calendar. Multiple evens can be there for a specific time for that day. So that multiple columns should be there in the events side. Please help me how can I get it.
Answer: I think you can use and try out by having multiple UITableviews in one single nib file. May be you can use two table views for each day/time as per your requirement
Here's are links which i found -  iphone app with two UITableViewControllers side by side
http://www.iphonedevsdk.com/forum/iphone-sdk-development/50502-creating-view-two-table-views.html
Hope this helps...
Answer: This example can help you a bit for creating UI and Event arrangements.
https://github.com/muhku/calendar-ui
Please update the Graphics and Color Schemes according to your requirement.
Enjoy Coding :)


.net framework working version for windows 7 pro build 7600

Question: What version of .net framework work on windows 7 pro build 7600 ?
And must be offline installer.
Answer: Build 7600 means that it's the final version of Windows 7, thus it should be compatible with anything supporting Windows 7 SP1.
The "Professional" edition aspect of your OS won't affect compatibility as it just refers to extra software that was bundled with that release; so again, for compatibility purposes this is just Windows 7 SP1.
Microsoft .NET Framework 4.6.2 supports Windows 7 SP1 and has an offline installer.

The Microsoft .NET Framework 4.6.2 is a highly compatible, in-place
  update to the Microsoft .NET Framework 4/4.5/4.5.1/4.5.2/4.6/4.6.1.
  The offline package can be used in situations where the web installer
  cannot be used due to lack of internet connectivity.

You can download the offline installer and review the installation instructions here:
https://www.microsoft.com/en-us/download/details.aspx?id=53344
Comment: @Swapnil Thanks. If you have a chance, could you award the bounty? :)
Comment: @Swapnil  could you please attach a screen shot of the message and the System Info for your computer? Something funny is going on here. Did you get the matching architecture? 32bit / 64 bit?
Comment: And you downloaded the 64 bit installer? Screenshots?
Comment: Ok thanks. I am on my way to work but will follow up as soon as I can. I am willing to help you live over Skype or TeamViewer later if you want me to
Answer: As I understand it, Windows 7 Build 7600 comes with framework 3.5 but you can download and install Framework 4 from
https://www.microsoft.com/download/details.aspx?id=17718
The next version up Framework 4.5 requires Windows 7 SP1.


Doubt in homeomorphism

Question: A mapping is a homeomorphism if it is a continuous, bijective map such that it's inverse is also continuous. This is the definition of homeomorphism which was taught to me.
What does the following statement mean:"A point P is homeomorphic to an open disc in $\mathbb{R}^2$".
Comment: It's a false assertion. Do you have more context?
Comment: In that definition you were taught, a *homeomorphism* is a kind of mapping. The concept of *homeomorphic* is closely related, but not exactly the same. It is a relation amongst topological spaces: given two topological spaces $X$ and $Y$, to say that $X$ and $Y$ are *homeomorphic* means that **there exists** a homeomorphism $f : X \to Y$. As the answer of @AlekosRobotis explains, that statement in your post is false because no homeomorphism exists between those two spaces.
Answer: The statement says that there exists a continuous bijection from $\{p\}\to D\subseteq \Bbb{R}^2$ where $D$ is an open disk in $\Bbb{R}^2$ with continuous inverse. That is, there exists a homeomorphism $\phi:\{p\}\to D$. This is, of course, false. There is not even a bijection between $\{p\}$ and $D$. One of them has cardinality $1$, while the other has uncountable cardinality.
Answer: More generally, let $(X,\mathscr{T}_X)$ and $(Y,\mathscr{T}_Y)$ be topological spaces. We say that $(X,\mathscr{T}_X)$ and $(Y,\mathscr{T}_Y)$ are homeomorphic if there exists a homeomorphism $X\to Y$; that is, a bijection $\phi:X\to Y$ which is continuous (with respect to the topologies $\mathscr{T}_1$ and $\mathscr{T}_2$) and which has a continuous inverse $\phi^{-1}$. We often shorten this and say that $X$ and $Y$ are homeomorphic if the topologies are clear, and we often write $X\cong Y$ (or similar notations).
In your case, we are abbreviating the statement that $\big(\{x\},\mathscr{T}^\text{ind}_{\mathbb{R}^2}\big)\cong\big(\mathbb{R}^2,\mathscr{T}_{\mathbb{R}^2}\big)$ (already demonstrated by other answers to be false) as $\{x\}\cong\mathbb{R}^2$, where $\mathscr{T}_{\mathbb{R}^2}$ is the Euclidean topology on $\mathbb{R}^2$ and $\mathscr{T}^\text{ind}_{\mathbb{R}^2}$ is the induced topology on the point set $\{x\}\subseteq\mathbb{R}^2$.

Doubt in homeomorphism


Thinning large LiDAR point cloud?

Question: I have a large point cloud (LAS file) and I am trying to thin this using a complex technique. I know it is possible to thin a point cloud using simple techniques such as extracting every nth point. However the point cloud I am working with is more dense in some areas and less dense in other areas. I would like to be able to thin the cloud so that the denser areas are thinned more heavily than the less dense areas. To do this manually one could create a grid and select certain number of points within each cell. (ie one at each corner and one in the center) However this point cloud is much too large for this task. I am trying to figure out if there are any existing solutions to this problem such as a complex selection query, other automated process, or existing software application that could be used.
Comment: +1. One option to try is the command line `ThinData` from Fusion. In [this answer](http://gis.stackexchange.com/questions/156759/lidar-intensity-image-from-multiple-flight-lines/156814#156814) I explain how it works. Howard's answer seems promising too. Let us know if they work for your situation. Tks.
Comment: Found this question on the hot network questions, joined up here just to post this comment. Not knowing anything about the data set or field this still seem to be crying out for 'PCA' dimension reduction techniques (principle component analysis). Perhaps some solutions use this ?
Comment: Using a tool like MeshLab [http://meshlab.sourceforge.net/](http://meshlab.sourceforge.net/) would allow you to easily compare the suggestions by Andre Silva. It sounds like your data set is small enough to be interactive in this context.
Answer: It sounds like you want either a voxel-based thinning or maybe a Poisson-based one. PDAL can do either. See PDAL's tutorial on the topic at https://pdal.io/tutorial/sampling/index.html
.
As far as the size of the file, please define "large". Just about any technique except simple rank decimation (remove n-th points) is going to want to have access to the entire file in memory. Other options would require a more sophisticated two-stage index+sampling technique to avoid that requirement.
Comment: Thank you, this looks very useful, I haven't come across this and will take a look right now. As far as size I'm looking at about 3 million points.
Comment: 3 million points == smallish end of LiDAR datasets. Large enough to start causing trouble with memory and such might be a 100 million or so.
Comment: Good to know, I'm relatively inexperienced with LiDAR but I have a feeling that PDAL is exactly what I was looking for, I was previously searching for answers in global mapper, GRASS, SAGA, and laspy etc...
Comment: The PDAL pipelines make it easy to keep track of your processing parameters and reproduce or batch process your work.
Answer: You can give lasthin or lasduplicate from LAStools a try. With lasthin you can keep the '-lowest', '-highest', '-random', or most '-central' point on a 2D grid in the x/y plane with user-defined '-step 0.5' size. With lasduplicate you can specify to remove all points that are '-nearby 0.005' in 3D from all previously appearing points. See the linked README file for more details.
Comment: By the way, why do you have [two accounts](http://gis.stackexchange.com/users/5916/martin-isenburg)? You should probably [merge them](http://gis.stackexchange.com/help/merging-accounts).
Comment: I have found those tools useful, but neither of them would help accomplish thinning that retains more points where the data is densest, as OP seeks.
Answer: You can use FUSION's ThinData command for this (Documentation p.130). ThinData is really handy because it allows you to thin point cloud data to a desired pulse density per square unit. From FUSION's documentation:
ThinData [switches] OutputFile Density CellSize DataFile

ThinData allows you to thin LIDAR data to specific pulse densities.
  This capability is useful when comparing analysis results from several
  LIDAR acquisitions that were collected using different pulse
  densities. ThinData is also useful when the density within a single
  LIDAR data set is not uniform. This is often the case with data
  collected from a slow-flying helicopter or when flightline overlap was
  not closely monitored. ThinData has also been used in simulation
  experiments to assess the effect of LIDAR pulse density on the
  accuracy of estimated forest inventory metrics such as overall tree
  height.
Answer: You can use LiDAR360, download the 30 days free trial version from GreenValley International website. LiDAR360 offers three methods for subsampling: minimum point spacing, sampling rate, and octree. Minimum point spacing method needs to set a minimum point spacing between two points so that the minimum three-dimensional distance between any two points in the sampled point cloud will not be less than this value. Sampling rate method needs to set the percentage of reserved points. In this mode, LiDAR360 will randomly retain the specified number of points. Reserved Points = Total Number of Points * Sample Rate. Octree method allows users to select an "octree" subdivision level and build 3D voxels for the input point cloud. Only the point closest to each voxel center will be retained.

Thinning large LiDAR point cloud?


Drupal 7 views_embed_view node.tpl.php fields

Question: With Drupal 7 and Views 3, I'm trying to get the result of a call to views_embed_view with contextual filter arguments in hook_preprocess_node, for embedding into a node template.
The view is using the Fields display setting, including "Content: Title" and some custom fields. When I preview the view with contextual filter arguments from the Views UI, everything works as expected, but when I embed the view none of the node's fields from the Fields API are loaded (only the built-in attributes like title and node ID are loading).
Any idea what's going on here?
sites/all/themes/XXX/template.php
function XXX_preprocess_node(&$vars, $hook) {
  $node = $vars['node'];
  $vars['views__deals__single'] = views_embed_view('deals_single', 'page_1', $node->nid);
}

sites/all/themes/XXX/templates/node--deal.php
// ...
echo 'THE VIEW SHOULD BE HERE:';
echo $views__deals__single;
// ...

The result of the echo is the node title, and the HTML wrappers for the other view fields including labels but their content is empty, unlike in the view preview.
Help!
Answer: You can just put it directly in the node.tpl.php template:
<?php print views_embed_view('deals_single', 'page_1', $node->nid); ?>


Left mouse button stops working

Question: The left mouse button stops working after 5 or 10 minutes of running Ubuntu 10.10.
It is a Logitech MX 1000 wireless USB mouse.
Also is there a way to emulate the left mouse click on the keyboard?
Mouse pointer move fine, right button works, wheel works.
Comment: Here's [How to bind mouse buttons to keys](http://askubuntu.com/questions/9048/how-to-bind-mouse-buttons-to-keys).
Answer: I had exactly the same problem.  Here's how to solve it. Open a terminal and type:
<code>sudo add-apt-repository ppa:raof/aubergine
sudo apt-get update
sudo apt-get upgrade
</code>
...and when the update/upgrade is complete, reboot your system and VOILA! The mouse (including left-click) works.
Answer: I had this problem.  In the end, I tried another mouse, and it worked - decided it was a hardware issue... mice do break!

Left mouse button stops working


Failed to create the host-only adapter - windows 10, docker, virtualbox

Question: I've recently run into this problem after having used docker toolbox without a problem for a while.
Started happening after windows update?
Windows 10 Home - 64
Uninstalled and reinstalled Docker toolbox
Uninstalled and reinstalled various versions of VirtualBox
Still get the same error
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\me\.docker\machine\cache\boot2docker.iso to C:\Users\me\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to create a network adapter. Sometimes, such confirmation window is minimized in the taskbar.
(default) Creating a new host-only adapter produced an error: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe hostonlyif create failed:
(default) 0%...
(default) Progress state: E_FAIL
(default) VBoxManage.exe: error: Failed to create the host-only adapter
(default) VBoxManage.exe: error: Querying NetCfgInstanceId failed (0x00000002)
(default) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
(default) VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreate(struct HandlerArg *)" at line 71 of file VBoxManageHostonly.cpp
(default)
(default) This is a known VirtualBox bug. Let's try to recover anyway...
Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue
Looks like something went wrong in step ´Checking if machine default exists´... Press any key to continue...

Answer: This answer is not specifically related to Docker, but seeing as this is one of the more recent top Stack Overflow search results (together with this question) on Google when searching for the "Failed to create the host-only adapter" error message from VirtualBox, I'm leaving this here in the hope that it will help someone else.
As a side note, if you can, I recommend you use Docker For Windows instead of Docker Toolbox to run Docker on Windows (requires Windows 10 Professional or Enterprise 64-bit).

My scenario:

Windows 10 Pro Version 1709
I use Hyper-V to run virtual machines whenever possible, but had a need to run an old VirtualBox VM with Windows XP as the guest OS
VirtualBox 5.2.4-119785 (Windows only supports a single hypervisor - I can recommend this approach if you need to switch between Hyper-V and VirtualBox)
VirtualBox did not (or failed to) create a host-only adapter on installation

When trying to create a host-only adapter using the Host Network Manager GUI, I got the dreaded "Failed to create the host-only adapter" error message, with a detail of: "Querying NetCfgInstanceId failed (0x00000002)".
Because I use Hyper-V, I had a number of Hyper-V Virtual Ethernet Adapters in addition to the actual physical adapter.

Looking at the properties of the physical adapter, it appears to be normal for Hyper-V to turn off all of the protocol drivers except for "Hyper-V Extensible Virtual Switch". Windows then gets its network connectivity through one of the virtual adapters, in my case it's called "External Virtual Switch", and the usual set of protocol drivers (TCP/IPv4 etc.) is enabled there.

I then noticed that VirtualBox appears to (want to) work in a similar fashion, because it had managed to install and enable a new protocol driver called "VirtualBox NDIS6 Bridged Networking Driver".

When I checked the properties of the other, virtual, adapters I noticed that the "VirtualBox NDIS6 Bridged Networking Driver" was enabled on all of them, but the "Hyper-V Extensible Virtual Switch" was not. It seemed odd that the VirtualBox driver was enabled on the Hyper-V virtual adapters, so I disabled it on all of them but left it enabled on the physical adapter.
I think at this stage I threw in a good old reboot for good luck, though I doubt whether that was actually necessary. When I subsequently tried to create the VirtualBox host-only adapter again, it worked! (I actually got an error message from VirtualBox, in a modal that I had to find on the taskbar, about the adapter name already being used. However a new "VirtualBox Host-Only Ethernet Adapter" showed up under the Windows Network Connections and when I closed and re-opened the VirtualBox Host Network Manager window, the adapter showed up there too.)
TL;DR;
My theory is that VirtualBox is for some reason unable to determine which adapter is the actual physical network adapter, and in a rather gung-ho manner goes ahead and enables its "VirtualBox NDIS6 Bridged Networking Driver" on every adapter that it finds.
Furthermore it then appears to be unable to determine which adapter it needs to create its virtual "wrapper adapter" for and fails.
Even if you don't use/have Hyper-V, you might have multiple adapters including virtual ones (lots of VPN software installs virtual adapters too, for example).
You can try disabling the "VirtualBox NDIS6 Bridged Networking Driver" on all but your actual physical network adapter(s) before attempting to create the VirtualBox host-only adapter again.

This is certainly not a new issue for VirtualBox judging by the large number of related tickets on their public bugtracker and in other places, some more than 2 years old. I have a feeling that for a lot of people the problem might be related to what I have described above, so hopefully this helps them.

Edit 01/15
Hmm, in retrospect I'm not sure how normal it is for Windows to use the Hyper-V "External Virtual Switch" for network connectivity. If I remember correctly the "Default" switch that Hyper-V creates and which provides connectivity to guests via NAT is a relatively new thing and before it was necessary to add and use the "External" switch... On my home PC, without an "External" switch, the normal (TCP/IPv4 etc.) protocol drivers stay enabled on the physical network adapter and the "Hyper-V Extensible Virtual Switch" is disabled both on the physical and on the virtual adapters. I haven't had a chance to test what happens if I add a new "External Virtual Switch" under those circumstances.
Comment: I'm not using Docker, and I'm on Windows 7 x64, and have never had this problem before. But I just upgraded VirtualBox from 5.2.4 to 5.2.6 and began receiving `Failed to create the host-only adapter` upon `vagrant up`, whether with a new or existing VM. Uninstall/reinstalling/repairing VirtualBox had no effect, but thanks to your post, I thought to peek in `Control Panel\Network and Internet\Network Connections`, in Windows 7, and the two host-only adapters that VirtualBox had been using were greyed-out (disabled)! I simply right-clicked on them, re-enabled them, and was off to the races!
Comment: @BenJohnson Well I'm glad my (extremely long) post was helpful to you in that way :) I've come across your particular scenario a few times in my readings. Another common one seems to be that the "VirtualBox NDIS6 Bridged Networking Driver" is simply not enabled on the adapter.
Comment: In my case, it's also quite possible that the reboot actually solved the problem. Too many variables...
Answer: tl;dr  If you are using Trend Micro or Symantec antivirus solutions, try uninstalling Virtualbox, then re-install it with the antivirus disabled.
It may work with others as well.
I am adding this answer for the record.
My coworkers and I started having a similar issue just after updating from Windows 10 Pro version 1703 to version 1709.
I tried rolling back to version 1703, and it worked, but of course this is not an acceptable solution.
For some reason, this had to do with the antivirus, which in our case is Trend Micro Office Scan. After doing a clean re-install with the antivirus disabled, the host-only adapter was available again.
The issue has been reported in the Virtualbox forum and issue tracker:
https://forums.virtualbox.org/viewtopic.php?f=6&t=86179#p413876
https://www.virtualbox.org/ticket/17354#comment:22
Unfortunately, this error is quite frequent, and it has been reported dozens of times with different causes.
In our case, the settings shown in bszom's answer were already correct.
Comment: Seems to be the case with any antivirus, I had to disable `Kaspersky`. I uninstalled virtualbox then reinstalled and everything worked. Thanks
Answer: I was able to get this working by disabling all of the network adapters, besides the physical one, during installation. Once installation is complete you can re-enable them.  To disable the adaptors, do the following steps:

Open Control Panel
Network Connections
Select each adaptor and then select 'Disable this network device' from the top
Answer: I have the same error as you.
In my case when I open VirtualBox after got error, it alerts that the VirtualBox is needed to update. So I install the newest one and open the "Docker Quickstart Terminal" shortcut again eventually, it worked.
So I think that install the virtual box again or install before installing Docker ToolBox may solve this problem.
( i know there is someone install it first ).
good luck.
Answer: I was able to resolve the problem with the latest Virtualbox version 6.0.14
Answer: Unfortunately I also had the Issue (Win10, 1709,virtualbox 5.1). While Using vagrant to pull linux images from the web.
This fixed it

Get your network drivers to the latest stand
Uninstall Virtualbox
Reinstall Virtualbox
Check if you have the "host only" virtual adapter in your network adapters config.
If yes than you're good to go. If not. Try to install it from vboxmanage.

C:\Program Files\Oracle\VirtualBox\VBoxManage.exe hostonlyif create

And uninstall HyperV Virtual ethernet Adapter from the device manager  if you see it (this blocks usually creation of virtualbox virtual network (Host-Only Ethernet adapter))

I had this issue on one type of computer of my company but not on others types. So this must be related to the type of network adapter itself. so sometimes you are lucky sometimes not. But I was more lucky having hardware to the latest stand.
Answer: I got the same error.
Checking Window's device manager, revealed a Virtualbox network adapter device with an exclamation mark.
The device's status stated that there was a signature problem for some reason.
I'm not encouraging anyone to ignore the warning, but I chose to do that :)
I turned off Window's signature verification using the method described in this link and I could finally use Virtualbox with a host-only adapter.
Note: this answer was duplicate. I've removed the other ones
Answer: I got to the same error.
But I don't have "VirtualBox NDIS6 Bridged Networking Driver" in properties of physical connection. A have same driver "NPCAP ..." from wireshark installation. If look at description you can see this is NDIS6 driver.
Then I remove all wireshark packages: NPCAP, WinPCAP, Wireshark and remove VirtualBox.
Restart.
Reinstall Virtual Box. Install Docker ToolBox(Uncheck install NDIS5). And Create default VM for docker.
docker-machine create -d "virtualbox" default

Host-only interface created normally
docker-machine status
Running

That works for me.
Answer: I uninstalled wireshark, docker tooltip and VirtualBox.I also deactivate the antivirus temporary.
Then, i installed docker tooltip without selecting install NDIS5 and it worked for me.
Answer: I first installed Docker Toolbox yesterday since I have Windows 10 Home which does not support Docker Desktop.
Rebooting or installing Java did not solved it for me. What did was to delete Oracle's VM that was installed with the Toolbox (5.2.12 or something), and reinstall the new 6.1.8. Checking their website, this makes sense:
Answer: Above solutions do not work for me, so I have installed the Virtual Box separately from here.
When installing Docker, uncheck the Virtual Box checkbox.
Answer: I got the same error:
(default) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
but in my case I was trying to install Docker Toolbox on Windows 8.1 64-bit.
Windows-8.1-6.3.9600-SP0 : AMD64
Previously, I had virtualbox version 6.0 installed on my system, so I unchecked the docker toolbox installer option, install virtualbox.
For my scenario it worked to uninstall virtualbox 6.0 reboot the system and install VirtualBox-6.1.12-139181

Note: As uninstaller use this tool.

And ready docker in windows 8.1 running.


"have to" or "must"

Question: I am trying to teach the difference between the use have to or must. But my students do not understand anything. Could you help me?
Comment: Alice, thank you for your salutations, but you might be interested in our new proposal designed specifically for those who want to learn the English language: English Language Learners (ell.stackexchange.com). On EL&U this kind of questions are considered at best too basic and this might explain the reason why you have already got two downvotes, but on ELL they are welcome. Please, take a look now or, however, be aware that that proposal exists. Thank you again.
Answer: Must and have to are synonymous, though some may prefer one or the other for certain purposes; this always happens with periphrastic modals, but these are merely individual preferences, not usage guides -- there is no consensus.
Must, as everyone knows, is a modal auxiliary verb.
One of the many peculiarities of such modals is that they only have one uninflected form, with
 - no past tense form (so you can't say **Yesterday I musted do that*)
 - no infinitive form (so you can't say **Yesterday I didn't must do that*, either)
 - no gerund form (so you can't say **He hates musting do that*)
So, when one needs to say things like these -- these are ungrammatical, but not unmeaningful, after all -- one uses a periphrastic modal construction. Most modals have standard paraphrases that can be used in past and participial forms (be able to for alethic can, be allowed to for deontic may, ought to for should, etc).
The standard paraphrase for must turns out to be have to. Not only that, but there's a special pronunciation. This modal sense of the present tense phrases have to and has to
are not pronounced /hæv tu/ and /hæz tu/
but rather /'hæftu/ and /'hæstu/
or, most likely, /'hæftə/ and /'hæstə/.
Always with a voiceless /ft/ or /st/ cluster, never with a /v/ or a /z/.
Quite irregular, like a modal.
Furthermore, any form of have to has to be followed by an infinitive phrase, just like a real modal.
So what you can say instead of the starred sentences above is
 - Yesterday I had to do that (/'hædtə/, past tense)
 - Yesterday I didn't have to do that (/'hæftə/, infinitive)
 - He hates having to do that (/'hævɪŋtə/, gerund)
But there's no meaning difference between them.
  There are idioms, however, and that is sometimes enough.
Comment: Don't forget *I'll have to do that tomorrow* for **I'll must do that tomorrow*.
Comment: Something has to be left as an exercise for the student, nu?

"have to" or "must"