Inverse of the sum of matrices

Question: I have two square matrices: $A$ and $B$. $A^{-1}$ is known and I want to calculate $(A+B)^{-1}$. Are there theorems that help with calculating the inverse of the sum of matrices? In general case $B^{-1}$ is not known, but if it is necessary then it can be assumed that $B^{-1}$ is also known.
Comment: This [article](http://www.jstor.org/pss/2690437) may be of help, although I don't have access to it right now.
Comment: @Arturo: I know that they might not be invertible, but let's assume they are.
@Adrian: Unfortunately I don't have direct access to jstor.
Comment: Related : https://math.stackexchange.com/q/2977195/2987
Answer: In general, $A+B$ need not be invertible, even when $A$ and $B$ are. But one might ask whether you can have a formula under the additional assumption that $A+B$ is invertible.
As noted by Adrián Barquero, there is a paper by Ken Miller published in the Mathematics Magazine in 1981 that addresses this.
He proves the following:
Lemma. If $A$ and $A+B$ are invertible, and $B$ has rank $1$, then let $g=\operatorname{trace}(BA^{-1})$. Then $g\neq -1$ and
$$(A+B)^{-1} = A^{-1} - \frac{1}{1+g}A^{-1}BA^{-1}.$$
From this lemma, we can take a general $A+B$ that is invertible and write it as $A+B = A + B_1+B_2+\cdots+B_r$, where $B_i$ each have rank $1$ and such that each $A+B_1+\cdots+B_k$ is invertible (such a decomposition always exists if $A+B$ is invertible and $\mathrm{rank}(B)=r$). Then you get:
Theorem. Let $A$ and $A+B$ be nonsingular matrices, and let $B$ have rank $r\gt 0$. Let $B=B_1+\cdots+B_r$, where each $B_i$ has rank $1$, and each $C_{k+1} = A+B_1+\cdots+B_k$ is nonsingular. Setting $C_1 = A$, then
$$C_{k+1}^{-1} = C_{k}^{-1} - g_kC_k^{-1}B_kC_k^{-1}$$
where $g_k = \frac{1}{1 + \operatorname{trace}(C_k^{-1}B_k)}$. In particular,
$$(A+B)^{-1} = C_r^{-1} - g_rC_r^{-1}B_rC_r^{-1}.$$
(If the rank of $B$ is $0$, then $B=0$, so $(A+B)^{-1}=A^{-1}$).
Comment: The lemma is the [Sherman-Morrison formula](https://en.wikipedia.org/wiki/Sherman%E2%80%93Morrison_formula), isn't it?
Comment: What about the case of $ \left( A + \lambda I \right)^{-1} $? Let's assume $ A $ is PSD.
Comment: I am also interested in the case $(\mathbf{A}+\mathbf{I})^{-1}$. Please see https://math.stackexchange.com/questions/2680914/inverse-of-symmetric-matrix-plus-identity-matrix?noredirect=1#comment5539327_2680914
Comment: Can this theorem be used in finding the inverse of $${\large[}g_{\mu\nu}+\chi \frac{k_\mu k_\nu}{k^2}{\large]}$$ where $g$ is the Minkowski metric tensor and the $k$'s are four-vectors? Please see this question in Physics.SE: http://physics.stackexchange.com/q/141613/31965 Thanks.
Comment: @bob, every rank one matrix has that form (i.e. is outer product of two vectors).
Comment: Related : https://math.stackexchange.com/q/2977195/2987
Comment: It may be useful to note that the rank of the outer product, $\mathbf{u}\mathbf{v^T}$, of nonzero vectors $\mathbf{u}$ and $\mathbf{v}$, is 1. So the lemma can be used in cases where $B=\mathbf{u}\mathbf{v^T}$, which may come up in linear regression settings when $B = \mathbf{x_i}\mathbf{x_i^T}$
Comment: That's a nice lemma. Used it to solve "inverse of a variance in random effects ANOVA" in 3 lines!
Answer: It is shown in On Deriving the Inverse of a Sum of Matrices that
$(A+B)^{-1}=A^{-1}-A^{-1}B(A+B)^{-1}$.
This equation cannot be used to calculate $(A+B)^{-1}$, but it is useful for perturbation analysis where $B$ is a perturbation of $A$. There are several other variations of the above form (see equations (22)-(26) in this paper).
This result is good because it only requires $A$ and $A+B$ to be nonsingular. As a comparison, the SMW identity or Ken Miller's paper (as mentioned in the other answers) requires some nonsingualrity  or rank conditions of $B$.
Comment: What about the case of $ \left( A + \lambda I \right)^{-1} $? Let's assume $ A $ is PSD.
Comment: This follows directly from Woodbury Matrix Identity.  Let C=I, V=I.  https://en.m.wikipedia.org/wiki/Woodbury_matrix_identity
Comment: Related : https://math.stackexchange.com/q/2977195/2987
Answer: $(A+B)^{-1} = A^{-1} - A^{-1}BA^{-1} + A^{-1}BA^{-1}BA^{-1} - A^{-1}BA^{-1}BA^{-1}BA^{-1} + \cdots$
provided $\|A^{-1}B\|<1$ or $\|BA^{-1}\| < 1$ (here $\|\cdot\|$ means norm).  This is just the Taylor expansion of the inversion function together with basic information on convergence.
(posted essentially at the same time as mjqxxx)
Answer: This I found accidentally.
Suppose given $A$, and $B$, where $A$ and $A+B$ are invertible. Now we want to know the expression of $(A+B)^{-1}$ without imposing the all inverse. Now we follow the intuition like this. Suppose that we can express $(A+B)^{-1} = A^{-1} + X$, next we will present simple straight forward method to compute $X$
\begin{equation}
(A+B)^{-1} = A^{-1} + X
\end{equation}
\begin{equation}
(A^{-1} + X) (A + B) = I
\end{equation}
\begin{equation}
A^{-1} A + X A + A^{-1} B + X B = I
\end{equation}
\begin{equation}
X(A + B)  = - A^{-1} B
\end{equation}
\begin{equation}
X  = - A^{-1} B ( A + B)^{-1}
\end{equation}
\begin{equation}
X  = - A^{-1} B (A^{-1} + X)
\end{equation}
\begin{equation}
(I + A^{-1}B) X  = - A^{-1} B A^{-1}
\end{equation}
\begin{equation}
X  = - (I + A^{-1}B)^{-1} A^{-1} B A^{-1}
\end{equation}
This lemma is simplification of lemma presented by Ken Miller, 1981
Comment: In order to conclude last line,we must have (I+A^-1B) invertible. So how are we sure about that, It might be easy but (I am not getting. Can you please explain @ Muhammad Fuday.
Comment: Where did you find this? Can you give a citation?
Comment: How is this a simplification of the lemma shown in Ken Miller 1981? Are we talking about "On the Inverse of the Sum of Matrices" or any other work? (In any case, I find this property quite useful, just need to cite it properly).
Comment: Interesting to notice that line 3 is a Sylvester equation.
Comment: @Sry: I'm not certain how this formula helps.  For example, the deduction $(I+A^{-1}B)^{-1} = (A+B)^{-1} A$ is direct, so the above formula is basically just the statement $(A+B)^{-1})(A+B)=I$.   Among other things $I+A^{-1}B$ is invertible if and only if $A+B$ is invertible.  i.e. you have to check invertibility of two equivalent matrices.
Answer: I'm surprising that no one realize it's a special case of the well-known matrix inverse lemma or [Woodbury matrix identity], it says,
$ \left(A+UCV \right)^{-1} = A^{-1} - A^{-1}U \left(C^{-1}+VA^{-1}U \right)^{-1} VA^{-1}$ ,
just set U=V=I, it immediately gets
$ \left(A+C \right)^{-1} = A^{-1} - A^{-1} \left(C^{-1}+A^{-1} \right)^{-1} A^{-1}$ .
Answer: A formal power series expansion is possible:
$$
\begin{eqnarray}
(A + \epsilon B)^{-1}
&=& \left(A \left(I + \epsilon A^{-1}B\right)\right)^{-1} \\
&=& \left(I + \epsilon A^{-1}B\right)^{-1} A^{-1} \\
&=& \left(I - \epsilon A^{-1}B + \epsilon^2 A^{-1}BA^{-1}B - ...\right) A^{-1} \\
&=& A^{-1} - \epsilon A^{-1} B A^{-1} + \epsilon^2 A^{-1} B A^{-1} B A^{-1} - ...
\end{eqnarray}
$$
Under appropriate conditions on the eigenvalues of $A$ and $B$ (such that $A$ is sufficiently "large" compared to $B$), this will converge to the correct result at $\epsilon=1$.
Comment: The point about eigenvalues is apt, because this works even if $\|A^{-1}B\|\geq1$ and $\|BA{^-1}\|\geq1$ as long as the spectral radius of $A^{-1}B$ or $BA^{-1}$ is less than $1$.
Comment: What about the case of $ \left( A + \lambda I \right)^{-1} $? Let's assume $ A $ is PSD.
Comment: Royi check Neumann series https://en.wikipedia.org/wiki/Neumann_series
Answer: Assuming everything is nicely invertible, you are probably looking for the SMW identity  (which, i think, can also be generalized to pseudoinverses if needed)
Please see caveat in the comments below; in general if $B$ is low-rank, then you'd be happy using SMW.
Comment: @mjqxxxx: yes, actually smw does require that inverse, which actually renders this answer useless, unless one is looking for inverses where $B$ is low-rank, and is written as $B=UCV^T$.
Comment: It also requires $(A^{-1} + B^{-1})^{-1}$ to be known, doesn't it?
Comment: The Sherman-Morrison "update" formula is most efficient if $B$ is of low rank.  So the usual application (rank one or two if symmetry is to be preserved) doesn't require $B^{-1}$ to exist.
Answer: It is possible to come up with pretty simple examples where $A$,$A^{-1}$,$B$, and $B^{-1}$ are all very nice, but applying $(A+B)^{-1}$ is considered very difficult.
The canonical example is where $A = \Delta$ is a finite difference implementation of the Laplacian on a regular grid (with, for example, Dirichlet boundary conditions), and $B=k^2I$ is a multiple of the identity. The finite difference laplacian and it's inverse are very nice and easy to deal with, as is the identity matrix. However, the combination
$$\Delta + k^2 I$$
is the Helmholtz operator, which is widely known as being extremely difficult to solve for large $k$.
Answer: If A and B were numbers, there is no simpler way to write $\frac{1}{A+B}$ in term of $ \frac{1}{A}$ and $B$ so I don't know why you would expect there to be for matrices. It is even possible to have matrices, A and B, so that neither $A^{-1}$ nor $B^{-1}$ exist but $(A+B)^{-1}$ does or, conversely, such that both $A^{-1}$ and $B^{-1}$ exist but $(A+B)^{-1}$ doesn't.
Answer: I know the question has been answered multiple times with great answers, but with my answer you don't need to memorize any lemmas or formulas.
Suppose $(A+B)x=y$, then $x=(A+B)^{-1}y$. This is all we need to get. The steps are:
(1) Start with $(A+B)x=y$.
(2) Then $Ax=y-Bx$, so $x=A^{-1}y -A^{-1}Bx$.
(3) Multiply $x$ in step (2) by $B$ to get
 $$Bx=BA^{-1}y -BA^{-1}Bx$$
 which is equivalent to
 $$(I+BA^{-1})Bx=BA^{-1}y $$
 or,
 $$Bx=(I+BA^{-1})^{-1}BA^{-1}y $$
(3) Substitute this $Bx$ into the $x$ in step (2) to get
 $$x=A^{-1}y -A^{-1}(I+BA^{-1})^{-1}BA^{-1}y $$
(4) Now factorizing the $y$ gives you the required result.
 $$x=(A^{-1} -A^{-1}(I+BA^{-1})^{-1}BA^{-1})y $$
(5)The assumptions we have used are $A$ and $I+BA^{-1}$ are nonsingular.
(6) We can factorize the $A^{-1}$ to get:
$$(A+B)^{-1}=A^{-1}(I -(I+BA^{-1})^{-1}BA^{-1})$$
Answer: Extending Muhammad Fuady's approach:
We have:
\begin{equation}
(A+B)^{-1} = A^{-1} + X
\end{equation}
\begin{equation}
X  = - (I + A^{-1}B)^{-1} A^{-1} B A^{-1}
\end{equation}
So
\begin{equation}
(A+B)^{-1} = A^{-1} - (I + A^{-1}B)^{-1} A^{-1} B A^{-1} \tag{1}\label{eq1}
\end{equation}
This rearranges to:
\begin{equation}
(A+B)^{-1} = (I - (I + A^{-1}B)^{-1} A^{-1} B )A^{-1} \tag{2}\label{eq2}
\end{equation}
If we consider the part
\begin{equation}
(I + A^{-1}B)^{-1}
\end{equation}
Then, this is an inverse of a sum of two matrices, so we can use \eqref{eq2}, setting $A=I$ and $B = A^{-1}B$, this gives:
\begin{equation}
(I + A^{-1}B)^{-1} = (I - (I + A^{-1}B)^{-1}A^{-1}B )
\end{equation}
so we can substitute the LHS of this for the right hand side which appears in \eqref{eq2},  giving:
\begin{equation}
(A+B)^{-1} = (I + A^{-1}B)^{-1}A^{-1} \tag{3}\label{eq3}
\end{equation}
Which is simpler than \eqref{eq1} and is very similar to the scalar identity:
\begin{equation}
\frac{1}{a+b}=\frac{1}{\left(1+\frac{b}{a}\right)a} \tag{4}\label{eq4}
\end{equation}
The technique is useful in computation, because if the values in A and B can be very different in size then calculating  $\frac{1}{A+B}$ according to \eqref{eq3} gives a more accurate floating point result than if the two matrices are summed.
Answer: Actually we can directly from @Shiyu answer about perturbations by subtracting $(A+B)^{-1}$ and factoring arrive at
$$0=A^{-1}-(A^{-1}B+I)(A+B)^{-1}$$ followed by$$(A+B)^{-1}=(A^{-1}B+I)^{-1}A^{-1}$$
And by symmetry of course
$$(A+B)^{-1}=(B^{-1}A+I)^{-1}B^{-1}$$
Now remember, $(I+X)^{-1}$ can be expanded as $I-X+X^2+\cdots$ by geometric series.
So if $X=B^{-1}A$ or $X=A^{-1}B$ and multiplication by $A,B$ and either of $A^{-1}$ or $B^{-1}$ are cheap, then this could work nicer than some other method of finding inverse.
Answer: By means of augmented matrix,
A+B|I
Left times A⁻¹:
I+A⁻¹B|A^-1
abstract the common factor B:
(B^-1+A^-1)B|A^-1
left times (B^-1+A^-1)^-1:
B|(B^-1+A^-1)⁻¹A^-1
left times B^-1:
I|B^-1(B^-1+A^-1)⁻¹A^-1
thus (A+B)⁻¹=B⁻¹(B⁻¹+A⁻¹)⁻¹A⁻¹
Comment: We have a Latex-like typesetting system for mathematical expressions, called MathJax. Information is here: https://math.meta.stackexchange.com/a/10164

Inverse of the sum of matrices


How do you stream data from an input file when writing contracts on EOS?

Question: I emulated the tic.tac.toe tutorial code and made a simple contract that allows me to add and remove car information. However, I can only push action one at a time and this only allows me to add/remove one entry of car data at a time. How do I stream data from an input file using push action (Could I use ifstream etc.?)? Does this exist in the EOS library?
Answer: This is decentralized application so generally you can't push/pull outside data to/from it.
That's also the reason why Oracle service is there to responsible for it.


Why was the 1-1-8 formation popular in 19th Century football?

Question: Today I learned that 1-1-8 is one of the oldest football formations. It was widespread in 19th century. Why this unusual formation was so popular?
Comment: Closely related: [It is true that, during the first years of professional football, teams used to play with only 2 defenders and 5 forwards?](https://sports.stackexchange.com/questions/11985/it-is-true-that-during-the-first-years-of-professional-football-teams-used-to). The game has become more defensive over the years, starting with extreme formations like the 1-1-8 and moving through 2-3-5 to something like today's 4-4-2.
Answer: When you say 19th century, you probably mean after 1863, when association football and rugby football split up, The FA was formed and later ball handling, shin-kicking, tripping and holding an opponent were disallowed.
In FIFA article History of Football - The Global Growth, these extreme formations are explained with the fact that despite splitting up with rugby football and change of rules, the game tactics were still similar.

When Scotland played England in Glasgow on 30 November 1872, [...]
  Both teams employed what might today be considered rather attacking
  formations - Scotland (2-2-6), England (1-1-8) - but back then the
  game still retained many of the mob-football characteristics of
  kicking and rushing and, in tactics at least, probably more closely
  resembled modern-day rugby than football.

The poster from that match. Source: The FA


Host Header Value Not Working Externally

Question: This is a really strange issue. The host header value of myapplication.mywebsite.com works fine within the internal network. But when people from outside the network try accessing it, it routes people to the default web application in IIS. An A ref was definately made, and external pinging does show it is going to the right IP addresss. Any thoughts?
Answer: Since you didn't specifically mention the website in question, I'd recommend using a program such as wfetch.exe to find out what's REALLY going on.
WFETCH.EXE will allow you to see everything from the DNS resolution to the request to the HTTP headers, etc returned.
http://support.microsoft.com/kb/284285
Answer: Is the applicaiton hosted on your network? Do you have a firewall or other device between the internet users and your app that could be stripping, or altering the host headers? Also are you sure that the site in IIS is listening for the host header on the right IP, or is it just listening on the internal IP.
Answer: IIS is probably listening for the host header on the wrong IP.


Apple - AirPort Extreme - VPN Mac OS X

Question: Is there a way to utilize an Airport Extreme in order to VPN in? Not using MobileMe
Answer: The Airport Extreme is just a router - it doesn't provide any support as a VPN endpoint itself.
You can use a computer with the server side of the VPN connection (eg. OpenVPN, VPN Access in Mac OS X Server, etc.) to truly VPN in. You will need to tell the Airport Extreme to forward the necessary ports to that computer.
Of note Mobile Me's Back to My Mac service connects to directly to your Mac and has nothing to do with an Airport Extreme, the reason Apple recommends it is that they "know" that an Airport Extreme plays nice with UPnP and handling IPv6 traffic.
Answer: Short Answer: No.
Longer Answer: AirPort Extreme and Time Capsule products do not have VPN access concentrators.  There are two workarounds: 1) port forward to a separate VPN access concentrator you deploy at a static IPv4 address behind the NAT; and/or 2) sign up with a free IPv6 tunnel service and use IPv6 to reach your local network.  (You can make your local IPv6 network "private" by turning on the the IPv6 simple security feature.  It's called "Block incoming IPv6 connections" in the AirPort Utility.  I don't recommend using it unless you know what it does and doesn't do for you.)
Answer: You can enable remote SSH login under sharing on your Mac and then enable port forwarding of port 22 on the router.  Be sure you have a statically assigned IP on the Mac to avoid forwarding to the wrong machine after a reboot.
Then use SSH tunneling...
Comment: SSH tunneling is not a VPN, so I need to be able to get in the home network, i dont want to open any ports for other to exploit either...

Apple - AirPort Extreme - VPN Mac OS X


How does turbojet thrust change with altitude?

Question: I am studying the rate of climb of turbojets, I don't know how the thrust varies with altitude and in particular which are the differences between necessary thrust and effective thrust.
Hope being clear, I can't translate properly maybe so ask and edit !
Answer: The thrust variation with altitude would be highly engine specific, but the general trend is nicely depicted in the image below:

Read this for further details.
Answer: Thrust is produced by accelerating air. The exhaust air leaves the engine nozzle at a fairly fixed velocity, so the acceleration is mainly controlled by the difference between the exhaust and incoming airspeeds. The faster the aircraft speed, the less acceleration is being created on the intake air. Therefore thrust decreases with increasing airspeed.
In level flight, an aircraft could not be accelerated above the engine exhaust gas speeds because then the incoming air would be faster than the exhaust air - resulting in a decelaration.
Most jets are operated as max speeds much less than their exhaust gas velocity - about half of V-exhaust I think.
Since higher air-speeds are normally used at higher altitudes, thrust generally decreases with an aircraft's altitude. But increasing altitudes can erode thrust because the mass of air being consumed is also decreasing as the air gets increasingly more rarified.
To summarize: At a constant airspeed (ignoring airspeed measurement nuances) thrust decreases as air density decreases with increasing altitude; at a constant altitude, thrust decreases with increasing airspeed.
Note that max thrust is found when stationary, just before take-off, since that's when incoming air is at its slowest. Also, at max thrust, (when airspeed is zero) there is no work being done and hence the power produced is zero right before takeoff.
Comment: To make the answer more complete, you could add that flying faster increases compression in the intake and lets the whole engine operate at a higher pressure level, which offsets the decreasing speed difference effect especially at higher speeds and in low bypass ratio engines.
Comment: `Also, at max thrust, (when airspeed is zero) there is no work being done and hence the power produced is zero right before takeoff.` Are you using `takeoff` as the start of the takeoff roll? Otherwise there is some airspeed because the plane is moving.
Comment: I'm speaking in generalities; if a jet is stationary, the incoming air still has a non-zero velocity. And as Peter points out, there are compression factors, but I think the first-order effect is caused by airspeed.
Answer: As an aircraft increases in altitude, the density of air also decreases. Thrust available = Q(V1 - V2). The important part of this equation is Q. Q = (rho)AV which means that the smaller rho (density ratio) becomes, the less mass airflow there is which results in lesser thrust at high altitudes.
Comment: could be a possible duplicate of this question, http://aviation.stackexchange.com/q/16727/16812.


How one can add quick value from test automation where there are no formal test cases?

Question: As a new QA in a project,how one can add quick value from test automation where there are not even formal test cases? What are the few quick wins in general?
Comment: By Quick Value did you mean - test results or test data?
Comment: By quick value I mean ,aiming at low hanging fruits which will help to "sell" automation to team/management in general.
Comment: I am not asking this question in context of any specific situation but in general.
Answer: Test Automation is not intended to gain a quick value. It requires significant investments to be done before you start receiving the value from your tests. Especially if you do not even have formal tests since automated tests are always more formal than manual ones. So in your case you will have to overcome the level of formalism that is essential to manual tests that will not be quick.
However if you are trying to "sell" test automation to the stakeholders you can start from automating smoke tests that test engineer would run against the app in semi-automated way against the application under test. The best way to do that depends on what you're trying to automate in particular. Here are few points of what could help:

If this is a GUI app, set up a selenium script that would test, say, a log in form. This will show that the application has been started successfully (including back-end, database, etc)
If this is an API, use GUI tools like SOAP UI so that it will be easier to use by your engineers. Set up one query for each supported method (POST, GET, etc.) or for each supported WS function.
Where it is possible introduce parameterization. That will let you to multiply the number of tests. Use test optimization techniques when prepare test data (equivalence partitioning, pairwise, etc.).
Where it is possible, introduce test reports. This will give the stakeholders the view on more-or-less end-to-end process of test automation
Where it is possible create an example of BDD test.

So the points above would help you to sell test automation to your management or to the business or project owners. If they will like it and fund your activities that will be a real quick win for you.
 -
Answer: As everything, it depends on application you will be testing.
Think about problems which application currently have, for example:

If application is broken after deployment – automate smoke checks to discover broken build as early as possible. It is not that you must run check, it can be scheduler to execute them after new build for example.
Do you need to be sure that some path in application works? Create test for it
Is there some repeated activity for which automated check make sense? Then automate it and save some time for more testing
Is there any time-consuming process which you must do?
Are there problems with performance(delay in loading of pages for web, slow api responses, application consumes a lot of resources)? Some load/performance tests would help to discover limitations

But always think if automatization of test/process make sense, if it adds some value which matter.
Within development of automated check, you will be testing application. So that is by itself some significant value.


Do you think you are smart enough for this?

Question:
You need me to bake
But I'm not in any home
I drown noise when full
But empty, your voice will roam
Comment: oho... any hints? don't say Preheat the oven
Comment: Good riddle! Stumps me!
Comment: Was there a correct answer?
Comment: I like this riddle - so many opportunities to propose clearly false yet still entertaining answers
Answer: I think it is a

flour silo

because

 you need flour to bake, most people don't have flour silos (and if they did it probably wouldn't fit in your house), cant make a noise in one, but would be big and echo-ey if empty.
Comment: Welcome to Puzzling.SE! Please note that answers are usually hidden with ">!" tags ([spoiler notation](https://puzzling.stackexchange.com/editing-help#spoilers)). Why not take the [tour](/tour) for an easy badge?
Answer: Probably not, but maybe:

 Time

You need me to bake

 Takes time to bake

But I'm not in any home

 Time isn't an object

I drown noise when full

 When your time is filled (you are busy) you don't notice other noise

But empty, your voice will roam

 When your time is empty (bored), you are more aware of surrounding noise
Answer: My guess:

 A Beaker

You need me to bake:

 The word sounds like "baker" with an 'e'

But I'm not in any home:

 Most people don't have beakers in their home

I drown noise when full:

 Beaker full of liquid suppresses sound.  Also Beaker's Song is sure to drown out any noise: https://www.youtube.com/watch?v=CDuebLakCqc

But empty, your voice will roam:

 Shout into a glass beaker and your voice will be amplified
Answer: I'd like to suggest a somewhat less serious answer to this riddle:

Marijuana

You need me to bake

Getting high is frequently referred to as 'getting baked'

But I'm not in any home

In areas where weed is illegal, everyone will deny having it in their possession: "It's not in my home."

I drown noise when full

Thanks to a suggestion by gabbo1092, this one could refer to the 'drowning' bubbling noise a bong makes when in use.

But empty, your voice will roam

Once the bag is empty/used up, the intoxicated person will experience normal events in a more psychedelic manner. For instance, when speaking, it might sound like someone's voice is echoing in a large chamber.
Comment: Heck, it fits about as well as (or better than) the answers given so far.
Answer: It makes me think of an

 exhaust pipe.

You need me to bake

 You need some kind of exhaust or ventilation duct (e.g.) to let steam and smoke out while baking. @kanoo's answer suggests that there is an inebriant sense of "bake" that may call for a pipe too.

But I'm not in any home

 It would defeat the purpose if you ventilated the hot air/steam/smoke back into the house, so the pipe responsible for this must be exterior.

I drown noise when full

 The exhaust pipe on a car, with muffler attached (e.g.), muffles the sound moving through it.

But empty, your voice will roam

 An unmuffled exhaust pipe can cause a lot of noise as you roam through the neighborhood and it roams in a large radius all around you.

Title: Do you think you are smart enough for this?

 No, I feel like I'm really missing something crucial, including but not limited to the interpretation of the title.


Multibit Private Key Restore

Question: I backed up my private key and restored it into a new copy of Multibit (difference machine). The import was successful but the public key address has not been updated with my previous address.
I've done "Check Private Keys" which said it was successful as well as forced a resync with the blockchain. None of my old transactions are showing up.
Any thoughts? No doubt I'm doing something wrong.
Thanks!
Edit:
Thanks for the response! I verified through bitaddress.org that the private key I exported only matches the bitcoin address automatically generated when I created the new wallet.
But the old private key that I IMPORTED into this same wallet is nowhere to be found. Multibit says the import was a success. If this is true there should be TWO private keys in the export file; one for the auto-generated bitcoin address and one that matches the old imported private key.
I'd love to take the private key in my original export file and paste it into bitaddress.org to see if it matches my public address but my export file is encrypted. So I have to import into Multibit, enter the password and then export it unencrypted to obtain the private key.
Does anyone know of a way to decrypt an encrypted private key file without using Multibit?
Comment: You mean your bitcoin address is different? Than you must've backed up the wrong private key.
Comment: Thanks for the response! I verified through bitaddress.org that the private key I exported only matches the bitcoin address automatically generated when I created the new wallet. But the old private key that I IMPORTED into this same wallet is nowhere to be found. (see edit)
Answer: For multibit classic, you can install openssl and use it in command lines to decrypt an encrypted private key file:
openssl enc -d -p -aes-256-cbc -md md5 -a -in multibit.key  -out key.txt  -pass 'pass:myPassword'
Answer: You can use an offline copy of bit address.org to check private keys against addresses if you want. It's the wallet tab.
Answer: effectively, with an offline copy, you can compare the private keys with the addresses if you want. It has served me in the past.

Multibit Private Key Restore


When voting an answer down, is it polite to add a comment giving a reason?

Question: When you vote down an answer to a question, do you leave a comment to explain why? Personally I think this is very useful, since if someone has written something that is wrong they can be set straight. Obviously, this may not make sense for highly subjective answers...
Comment: Not only is it polite, it should be downright mandatory if there are not already comments that describe your problem with it (in which case a redundant comment would just be noise).
Answer: Yes absolutely. This site is about working together to get the right answers. If someone is incorrect its a great help to let them know why. I hope to get reasons why people vote me down!
Answer: If I down-vote something, I always leave a comment as to why it's wrong.  Otherwise, people might not learn.  Also, and I feel more importantly, if something is +5 and -3, no one will know it has been down-voted unless there are comments explaining why.
Answer: I think a comment should be the first method to show someone you don't agree.  Maybe they can clarify something that would change your mind.  Then downvote if they still don't satisfy you.  A downvote without a comment is almost as unhelpful as a posting that should be downvoted.
Plus, I think questions like this (about SO) should be community wikis, so the rep earned and burned is based mainly on programming knowledge.
Comment: Much as I like this idea - realistically, most of us will view most questions once and then move on. Definitely comment ... and follow this suggestion when you can (e.g. on question in which you are personally interested)
Answer: Generally I will only make a comment when downvoting if that comment is actionable.
If an answer is inane or appears to be intentionally unhelpful, or just beside the point, I won't bother leaving a comment. At some point I'd just get tired of writing "don't be an ass", "don't be rude", "don't be an idiot" comments.
If an answer appears to be intended to be helpful but has some flaw, I will be more likely to add a comment. The answerer may have misinterpreted the question, or they may have made some error in coding, or they may not be aware of the deficiencies of their design, so a comment is worthwhile because it gives them feedback and it gives others who read the answer useful information (on whether to use that answer, for example) as well.
Answer: Yes please.  I've gotten a couple of downvotes that I'm still a little confused by, and I'd have loved a few words of explanation (I'm not saying the downvote was unjustified, I just didn't know why it happened.)  And both Questions and Answers, please.
Comment: Frankly, some people just like to wreck a good thing.  For example, on http://stackoverflow.com/questions/206154/whats-the-best-soap-client-library-for-python-and-where-is-the-documentation-fo , someone came along and marked every single answer down, even though they were all correct.
Comment: Yeah, I've been hit with one or two of those myself.
Answer: Yes, please comment. Sometimes I see a down vote and I don't understand the reason for it. Is the answer technically wrong? Is it off-topic? Is the voter trying to suppress points of view that they don't agree with?
Answer: The problem with leaving comments explaining downvotes is that the downvoted person may decide to take revenge and use up his allocation downvoting your contributions.
I'm happy with the anonymity factor to be honest.
Sure if I get a down vote I'll leave a comment under my answer or question asking the reason why, but if I don't get one I'm not all that bothered, and nor should I be. After all it's only a website (albeit a fine one), it's not like my credit rating is being affected. :)
Answer: I'd go a step further and suggest that it's polite to comment any vote.  As others have said, the purpose of StackOverflow is to share information.  IMHO, constructive comments—whether or not you agree with them—are always helpful.  Personally, I find I learn most from the folks who disagree with me.
Comment: Thanks for the upvote ... where's the comment!?  :-)
Comment: Totally agree +1
Comment: +1 agreed. "+1 agreed" would be enough but is not accepted as a comment..
Answer: I'd say maybe. If there's a good reason to vote down, like technically wrong, or not answering the question, or flawed, then yes. We all learn from it. If they respond with something like "VB is teh suck!", then I think it goes without saying.
Comment: I do not understand. "VB is teh suck!" is technically correct. ;)
Comment: VB RULEZ!!111!!!1!!!one!!11
Comment: Actually, to be technically correct, it should be "VB is teh suX0rs!"
Answer: I think explanation on downvote of question and answer is always useful, though should not be compulsary.
Without it people often won't see why unaided, for themselves, why the downvote was cast.
Answer: Down votes on questions, not necessarily.  Down votes on answers, usually.
Answer: You should always leave a comment on a downvote, because the person receiving the downvote has the right to know why. If somebody leaves an answer which he or she believes is helpful, then gets a downvote without an explanation, that person will be left wondering why the answer got downvoted. There may be rare exceptions, but it doesn't take any time to leave a comment such as "Not at all helpful" to somebody saying gibberish or something like "VB is teh suck!". I believe that it should be required to leave a (potentially anonymous) comment with a downvote.
Comment: You may want to add that on uservoice. I think however, that the overhead of commenting would keep people from downvoting.
Answer: Yes- I was recently downmodded on an answer which I presume to be absolutely correct.   If it is not, I would gladly delete the comment and learn something from it.  Otherwise I am left doubting my own answer.
I am also afraid that some people may see the highest ranked answer and take that one to be 'correct' while others are 'incorrect'.  My answer was not upmodded so it was not deemed correct or incorrect, but then another answer that had an opposing answer was upmodded.  It clearly made my answer appear incorrect.
If anyone reading this may have been responsible, here is the post I am concerned about:
Singleton Destructors
Answer: certainly not perfect, but just to give an idea on a potential automatic rule that may be "social" friendlysomething like ...
votecount < 0 and Upvote and no existing comment : >>invite user to add a comment
votecount <0 and upvote and (existing two or more comments) or one comment get 2+Up : >>do not invite to add comment
votecount = 0 and Upvote and no existing comment : >>invite user to add a comment
votecount > 0 and Upvote and existing comment : >>do not invite to add a comment

votecount = 0 and downvote and no existing comment : >>Oblige user to add a comment
votecount > 1 and downvote and no existing comment : >>Oblige user to add a comment
votecount > 1 and downvote and with existing comment : >>Invite user to add a comment
votecount > 5 and downvote and with not comment : >>Oblige user to add a comment


How to disable automatic picture upload to Google+

Question: I've got Motorola RAZR (XT910) and I decided to install the Google+ app to stay in touch with it. Whenever I take pictures with my phone it would upload those pictures to my Google+ account even though I have set my Instant Upload settings to OFF. How can I really disable that without uninstalling the Google+ app? I would like to hand pick photos from my phone to be uploaded to my Google+. Thanks
Comment: @ce4 I know how to find the settings and change them. And I did that but the pictures are still being uploaded to my Google+
Comment: You should report a bug to the G+ app developers.
Answer: Open the Google Plus app, go to settings and disable "instant-upload".

Please note if you enabled it:
Each photo you take will be uploaded to Google Plus' staging area but not be shared immediately. It's just for convenience so that you don't have to grab your phone if you want to share some past pictures you took with your mobile. You will be able to to share from any browser you're logged in at any later time you want.
You can also select if you only want to instant-upload when you're on wifi.
Comment: So in other words if I don't want the pictures instantly uploaded I have to remove the Google+ app then.
Comment: I did that, as stated in question, but that does not seem to work and my photos and videos are still being uploaded.
Comment: Eww! That's indeed strange! Reinstalling maybe? You will be prompted on the 'instant-upload' thing at first launch again. There's nothing to loose if you do, just give it a try. Maybe try a reboot first, that won't hurt either.
Comment: I just reinstalled the app and rebooted my phone. It seems to work but I'd like to wait at 12 hrs or so.
Comment: Uninstalling and installing again worked for me.


Contributing to elementary OS team

Question: I've been using elementary OS Freya for almost a year and recently switched to Loki, which is much better in every aspect.
As a daily user of the OS, I see areas where I feel that some features can be added.
Where can I post my ideas so that the team will see or at least answer me?
Answer: You can propose your aditionals features to the dev team going to Blueprints section at elementary OS Launchpad
You can also navigate through the various applications pages at Launchpad and propose new features in its blueprint section. To know all of them,  you can visit the metaproject page at https://launchpad.net/elementary
Answer: To add, you can also contribute with money (the devs will definitely appreciate it):

giving a small amount of money monthly via Patreon.
placing bounties on open issues via BountySource.

Contributing to elementary OS team


Contesting closure of a question

Question: If stack exchange is a democratic web site, is there a way to contest to reopen a closed question, or is it common to get "bulldozed" by the administrator. In other words, is there a way I can contest a decision to close a question?
Answer: Post here on Meta giving us the specific question and why you think it should be reopened, and if enough people agree, it will be reopened.
Answer: If you have the ability to vote to close a question, then you also have the ability to vote to reopen a question.
If the question was closed.  My suggestion is to figure out why the question was closed.  If the question can be improved so that it meets the guidelines for being on-topic, then I would suggest improving the question, voting to reopen, and leaving a comment on the question stating why you think the question should be reopened.
I've seen this happen on Project Management SE where a closed question was quickly cleaned up and reopened.  This actually leads to a more interesting point:  If a question can be improved, it should probably not be closed.

Contesting closure of a question


Is it possible to delete files in SWARM?

Question: If not what are some similar protocols to IPFS and SWARM that allow you to delete files?
Answer: No, you cannot delete files in Swarm. This is one of the pillars of this distributed technology; once the data up there is no way to take it down.
That being said; Swarm is an opportunistic framework; nodes will get paid for serving content, and will tend to keep content they can make more money of. Popular content will be requested more, and since storage space ultimately is finite, less popular content will be lost over time.
There is an insurance scheme in development, called Swap, Swear and Swindle (or sw^3) that will let you pay the network specifically for storing content regardless of popularity (compensating their potential loss of storing that content instead of more profitable content).


How can I make sure my stock apps are connecting through orbot?

Question: How can I make sure my stock apps are connecting through orbot?
I've installed orbot & it's seems to be working as google throws captcha in orfox but stock apps such as youtube still opens page pointing to my location.
I configured orbot to make all apps connect through it.
Orbot doesn't start at boot time.
Thank you.
Answer: "Stock apps" may be getting your location from the local device through GPS, knowledge of visible cell towers or visible wireless networks. There is nothing that network level location anonymity can do if the local application is snitching on you.
As such, you should be careful which apps you use and you should be careful about forcing transproxy across all apps. Since transproxy has no context for what it is transferring over the tor network, different applications may share the same circuit which could end up linking e.g. your youtube usage with your twitter or facebook usage, even if one of these is intended to be unlinkable to your other online identit{y,ies}.
Mike Perry wrote a good summation of what approaches may be taken and what problems still remain: Mission Impossible: Hardening Android for Security and Privacy
Android, especially with GApps, is a privacy nightmare. Cyanogenmod's "Privacy Guard" may help but ultimately maintaining a list of permissions and dealing with the unexpected breakages from them is a daunting and ultimately overwhelming task. You should attempt to use application that respect your privacy, and work with you to help maintain it, from the very beginning rather than trying to force apps to stop actively trying to betray you.


How long did the Pevensies rule in Narnia?

Question: The books imply that the Pevensies were in Narnia for years (or perhaps even decades) in The Lion, the Witch, and the Wardrobe. Is there any indication of exactly how long they were gone?
Comment: [Wikipedia](https://en.wikipedia.org/wiki/Narnia_%28world%29) says Lewis provided a timeline outside the books, which seems to be the only source of Narnian years mentioned elsewhere (for example, the year 1000 as the year when the Pevensies were coronated, and the year 1014, fifteen years later, when they returned and the Golden Age of Narnia ended).
Comment: @muru If you can find that timeline as a direct source, your comment would make a good answer.
Comment: @Randal'Thor Wikipedia also says that it was in a letter Lewis sent to someone, who published it later, which was then included in later books on Lewis's works. I'm not going to buy some obscure book on Narnian commentary to verify that, though, sorry. So I probably won't post an answer.
Comment: @muru here you go for the source http://narnia.wikia.com/wiki/Narnian_timeline
Answer: The original rule of the Pevensies lasted for 14-16 years, starting in year 1000 and they returned to London in either 1014 or 1015 while hunting the White Stag.
This is laid out here in a columnar format (With a date of 1015), and you can see it in an interactive childrens page available on the publisher's website, HarperCollins (With a date of 1014).
The interactive scrollbar lists the time as 1000-1014, while accounts on the web vary between 1014 and 1015 for when they actually returned. So depending on the months, between 14 to 16 years is the time of ruling.
These come from something Lewis created himself, "Outline of Narnian History so far as it is known...", as referenced in "Inside Narnia: A Guide to Exploring the Lion, The Witch and the Wardrobe" (Page 79). This references a couple of other works, one of which is "Past Watchful Dragons" by Hooper, which reprints the timeline (Pages 41-44).
I could not find any direct publications by CS Lewis, just references to this timeline and publications featuring it.
Comment: What's the original source for these dates? Neither website you link to is canonical/primary-source AFAIK. Does this information come from the books themselves, Lewis's letters, ... ?
Comment: @Randal'Thor - Added further sources for you.
Answer: We know, that at the time of The Horse and His Boy, Rabadash had asked for Susan's hand in marriage. We are also told that he was not the only one.
Assuming that the invitations started when she was 18, and that ten people proposed to her, at the rate of five per year, she was 20 years old at the time of THaHB. Since she was 12 at time of entering Narnia, we can assume that the Pevensies were in Narnia for at least 8 years.

Edit
The Narnia Wikia says

This took place in 1000 NT, and she and her siblings shared rule of Narnia for the next fifteen years.

So, 15 years.
This comes from here.
See also Golden Age of Narnia.
Comment: Which page on the Narnia Wikia, and does it cite a source for this claim? You should always use primary sources if possible, and as Mithrandir mentions, Wikia sites are notoriously unreliable. (I suspect the source is Lewis's timeline mentioned in comments - your answer would be improved if you cited that directly.)
Comment: Do you have any sort of source for that rate? Also, people proposing to a twelve year old is... slightly creepy in modern western society. And Wikia is generally not considered to be a reliable source. I'm an admin on two Wikias myself, and I know how often people just make up stuff and add it to the wiki without any support for it.
Comment: @Mithrandir The marriage proposals started at 18. Although, in Game of Thrones, 12 is not too young.


A sphere rolling down a rough wedge which lying on a smooth surface

Question: A sphere of mass $m$ and radius $r$ rolls down from rest on an inclined (making an angle $\phi$ with the horizontal ) and rough surface of a wedge of mass $M$ which stays on a smooth horizontal floor. Find the acceleration of the wedge and the acceleration of the sphere relative to the wedge.
I have written out the equations of motion for the sphere and the wedge and also the equation of motion for the rotational motion of the sphere. But then I get stuck. I don't know how I should relate the angular accleration $\alpha$ of the sphere with the acclerations $a_{\perp},a_{\parallel}$ appearing in its equations of motion. Can anyone please help me out? Thanks!
Comment: Show us what have you done.
Answer: Use Lagrangian mechanics method to answer this problem because it is easier than Newtonian mechanics (IMHO). Let $T$ be the kinetic energy, $V$ be the potential energy then the Lagrangian $L$ is given by
$$
L=T-V
$$
and the Lagrangian equation is
$$
\frac{d}{dt}\left(\frac{dL}{d\dot{q}_k}\right)-\frac{\partial L}{\partial q_k}=0,
$$
where it is assumed that $V$ is not a function of the velocities, i.e. $\dfrac{\partial v}{\partial\dot{q}_k}=0$. The symbol $q$ is a generalized coordinate used to represent an arbitrary coordinate $x, y,\theta$, etc and the 'dot' sign above $q$ means derivative with respect to time, $\;\dot{q}=\dfrac{dq}{dt}$.
Assuming the ball is uniform solid then its moment of inertia is $I=\dfrac{2}{5}mr^2$. Components of the velocity of the ball are:
$$
\begin{align}
v_x&=\dot{x}+\dot{y}\cos\theta,\\
v_y&=\dot{y}\sin\theta,\\
v^2&=v_x^2+v_y^2=\dot{x}^2+\dot{y}^2+2\dot{x}\dot{y}\cos\theta.
\end{align}
$$
The kinetic energies:
$$
\begin{align}
T_{ball}&=\frac{1}{2}mv^2+\frac{1}{2}I\omega^2\\
&=\frac{1}{2}mv^2+\frac{1}{2}\cdot\frac{2}{5}mr^2\omega^2\\
&=\frac{1}{2}mv^2+\frac{1}{5}mv^2\\
&=\frac{7}{10}mv^2.\\
&=\frac{7}{10}m\left(\dot{x}^2+\dot{y}^2+2\dot{x}\dot{y}\cos\theta\right)\\
T_{wedge}&=\frac{1}{2}(M+m)\dot{x}^2.\\
T_{system}&=T_{ball}+T_{wedge}\\
&=\frac{7}{10}m\left(\dot{x}^2+\dot{y}^2+2\dot{x}\dot{y}\cos\theta\right)+\frac{1}{2}(M+m)\dot{x}^2.\\
\end{align}
$$
The potential energy:
$$
V_{system}=V_{ball}=-mgy\sin\theta.
$$
The Lagrangian is
$$
\begin{align}
L&=T_{system}-V_{system}\\
&=\frac{7}{10}m\left(\dot{x}^2+\dot{y}^2+2\dot{x}\dot{y}\cos\theta\right)+\frac{1}{2}(M+m)\dot{x}^2+mgy\sin\theta.
\end{align}
$$
The Lagrange's equations are
$$
\frac{d}{dt}\left(\frac{dL}{d\dot{x}}\right)-\frac{\partial L}{\partial x}=0
$$
and
$$
\frac{d}{dt}\left(\frac{dL}{d\dot{y}}\right)-\frac{\partial L}{\partial y}=0.
$$
After substituting the Lagrangian $L$ to the Lagrange's equations, yield these two equations:
$$
\frac{7m}{5}\ddot{x}+\frac{7m}{5}\ddot{y}\cos\theta+(M+m)\ddot{x}=0\tag1
$$
and
$$
\frac{7m}{5}\ddot{y}+\frac{7m}{5}\ddot{x}\cos\theta-mg\sin\theta=0.\tag2
$$
Solving and simplifying $(1)$ and $(2)$ yield
$$
\ddot{x}=-\frac{5mg\sin\theta\cos\theta}{\left(5M+\left(5+7\sin^2\theta\right)m\right)}
$$
and
$$
\ddot{y}=\frac{5(5M+12m)g\sin\theta}{7\left(5M+\left(5+7\sin^2\theta\right)m\right)},
$$
where $\ddot{x}$ is the acceleration of the wedge and $\ddot{y}$ is the acceleration of the ball relative to the wedge.

$$
\large\color{blue}{\text{# }\mathbb{Q.E.D.}\text{ #}}
$$
Comment: you have taken the translational energy of sphere twice.
Answer: The constraint of motion of the two bodies is that the acceleration of the point of contact  along the normal must be same otherwise the'll loose contact.
Get the acceleration of the point of contact of sphere along the normal equal to the acceleration vector of wedge along the normal.
The acceleration of the point of contact of sphere will include angular as well as linear acceleration and take it's component along common normal.


Seeking shapefile of Indian electricity transmission network?

Question: I need the data for the research I am carrying out for a masters thesis. There are a few maps out there (e.g. http://powermin.nic.in/sites/default/files/uploads/powergrid_map.pdf), but they seem more like schemas and would be difficult and very time-consuming to turn into a shapefile.
Answer: Mapping this would be a nightmare.
In the US the FAA has sectional flight maps for Visual Flight, transmission lines are show as navigation aids. By cross referencing these with aerial photography you can digitize a fairly accurate layer. Most power companies do use schematics as the actual position means less then conductivity. However your PDF is a rough guide and will help you identify them. If your stuck digitizing them it's fairly easy as they tend to run in straight lines for mi/km's.


PhD or master in physics

Question: I am 35 years old and I've just got a bachelor in Science. I will pursue higher education in Physics but I have my doubts if either a PhD or a master is more convenient for me. My areas of interest are Plasma-Fusion Physics, Condensed Physics, and Applied Physics.
If I enter a PhD program, will take me around 6 years to complete it and probably I would be kind of old to take advantage of it...in the other hand If I choose the master (which is shorter in time) probably won't help 'cause Universities and Companies in these areas mostly look for doctors. These are my doubts and concerns. Please help with your expertise.
Comment: This question appears to be off-topic because it is about life choices rather than physics per se. Perhaps [Academia](http://academia.stackexchange.com) would be a better fit, or you can ask informally in our [chat room](http://chat.stackexchange.com/rooms/71/the-h-bar) (with 20 rep).
Comment: Ah good, I also wanted to close this but didn't want to do so unilaterally.
Answer: I am currently a 5th year PhD student (almost done, I hope) and I would recommend going after the Masters degree. I believe this is a very subjective matter so other answers may be completely different and in the end you're going to have to decide on your own. But I will like to give reasons for my opinion below. I am not trying to persuade you one way or the other but just offering my opinion. This is not to say I regret getting my PhD. I am very happy that I have come this far in my degree.
I have recently started my own job search and I have seen that any job that you want to get with a physics PhD you can get with a physics Masters. So what's the big deal with the PhD?  What I've noticed is that your starting salary is higher for PhDs. This is especially true for government positions. A PhD might get you started around 80K where as a masters may be around 70K. The other main difference is that when you take the job with a PhD you can apply for promotions more quickly (perhaps after only 2 yrs on the job), but with a masters it might take longer (4 to 5 yrs). Note these numbers are really for gov't jobs I can't say I have such specific knowledge of the private sector.
Another issue with the PhD is that some private sectors companies will think you are too academic. That you can't think in terms of the real world. They actually prefer the masters degree because this shows you can handle the extra work, and that you're not completely academically minded.
My advice would be to think about what you want to with your PhD. If you think you want to stay in academia then you MUST get the PhD. If you want a private sector job a masters is plenty good. Not to mention, if you start a PhD and find out you don't like doing research you might just want to leave after 3-4yrs with a masters anyway.
I also know that a lot of physics departments will not accept only masters students. So you do have to apply for the PhD program. That is fine. Apply, see how it goes...you might love it, but if its not for you I have know plenty of people that leave with their Masters.
Again, this all really depends on how you want to apply the degree.
Comment: It sounds like PhDs don't really pay off, then.
Answer: This kind of advice is always going to vary from person to person, so obviously you should sample everyone's advice here.
Broadly speaking, I would suggest that if you knew in advance whether you would stay in academia or work in industry it would make the decision more straightforward. In academia, at least in my field of high energy physics, a PhD is 100% expected/necessary in order to progress. In industry a masters is often sufficient, but depending on which industry as a PhD you would be in a position to expect a higher starting salary and also more opportunities. If I were you I wouldn't worry about your age if your opportunities would be vastly improved.

PhD or master in physics


Would it be a good idea to memorize relative interval positions on guitar?

Question: It seems like if I memorized the relative intervals between the notes on each string, it would help a lot with quickly making chords and such. It seems a lot easier than trying to memorize individual notes. Would this be useful, or a waste of time and energy? Also, if I were to switch to an unfamiliar tuning, would I be completely screwed in that regard? I imagine this would also really help my memorization of the notes in relation to each other, i.e. a circle of fiths.
Comment: I accidentally memorized these on guitar and find it very useful.
Comment: Are you talking about whether there's a sharp or flat between notes, or intervals in a scale?
Comment: Intervals in a scale. Like 3rd, 5th, 9th, etc.
Comment: Please explain how you think knowing intervals on each string will help when quickly making chords. Even when one knows them, and knows the intervals of the various notes of particular chords, there's no quick way to form those chords with that knowledge. Yes, it can be done slowly, but that's not what you aspire to. Dyads, maybe.
Comment: @Tim once spotting an interval becomes second nature, spotting 2 or 3 intervals relative to your chord root to build a chord is something that can be done pretty quickly IME. Often you may end up rediscovering a chord shape that you'd seen before anyway, but no problem with that.
Comment: How is *any* kind of investigation, experimentation, or learning a 'waste of time or energy'?
Answer:
It seems like if I memorized the relative intervals between the notes on each string, it would help a lot with quickly making chords and such. It seems a lot easier than trying to memorize individual notes

Yes, of course! The majority of guitarists have a way to think "directly" in relative terms - often using shapes as mnemonic aid.
If you think in terms of numbers of semitones, and have the ability to see shapes on the fretboard in terms of numbers of semitones (and/or intervals like an octave, fifth, etc), then you can easily do all the musical 'operations' you need in your mind without needing to think of note names.
Note that this isn't 'cheating' in any way, or specific to the guitar. It's just as possible on the piano to 'spot' intervals without thinking of the particular note names. It just so happens to be very easy to relate piano keys to note names, due to the octave-repeating pattern of the keys. The guitar doesn't have such a clear pattern (at least, not once you start to move across strings), so it makes less sense to concern yourself with note names when you don't have to.
Of course it is still useful to be able to find named notes on the fretboard, but you don't have to think in terms of them all the time.

if I were to switch to an unfamiliar tuning, would I be completely screwed in that regard?

No more than if you were thinking in terms of note names - those would all move too, if you re-tuned.
One habit to get into is to just work out how a chromatic octave maps to shapes on the fretboard on your particular tuning. Once you've mentally 'mapped' the octave, and once you're thinking in terms of intervals, you should be able to play familiar tunes with only a little extra mental effort compared to standard tuning.
Answer: I find this knowledge extremely useful, and somehow required if you want to go past cowboy chords / most common shapes.
You already make use of it when you tune your guitar, if you use the 5th fret method for instance.
If you are playing richer chords, knowing where to locate the root / 3rd / 7th / nth degrees grants you full control on what you are doing.
Of course you could rely on existing diagrams, but if you interiorise such notion you are able to explore the fretboard further, and to come up with pattern and strategies that are more comfortable to your playing style.
If your melody phrasing involves slides and bends, of course you want to know the horizontal fretboard landscape, not (just) in terms of the notes you are hitting, but also as interval relationships. This way you never get lost, and you can go back to a vertical approach (i.e. playing across different strings) whenever you want.
Simple example:

you play an E (5th string, 7th fret), followed by a G (4th string, 5th fret);
you know those notes to be a minor 3rd apart (i.e. 3 half steps);
then you can also play the G on the same string 3 frets up -> 10th fret. This way you can hammer on / slide if you need it.

Muscle memory will do the rest.
If you change tuning, your perspective changes a bit. But if you know the relationships between adjacent strings, a bit of practice will suffice. Always remember that you change tuning with a purpose (i.e. to play something in a easier/otherwise impossible way), not just for the sake of it!
Comment: Thank you. I think I'll leave the question up for a bit to get some input from others, but it's nice knowing that memorizing the intervals wouldn't be in vain.
Answer: In my experience, it's an essential skill for both soloing and chord building.
Most of the time when I'm soloing, I'm visualizing the current chord on the fretboard, and then using my knowledge of interval shapes to make my note selection (e.g. I always know my 9th is two frets above my roots).
When it comes to chord building, I will say that it isn't great for building voicings larger than three notes from the ground up.  When I'm writing voice leading stuff in three parts, I definitely think in terms interval shapes.  But when you're playing the more standard "guitaristic" voicings (barre chords, 6 string open voicings etc.), it's more efficient just to memorize the shapes.  However, interval shapes are a great way to extend those voicings.  I can easily decorate a standard minor or major chord with a 6, 9, 11 etc. because I know their positions relative to the root.
On the flip side, I also make voicings sparser by deleting notes with the same technique.  It's quite common in jazz to remove the 5th, root, or both from a chord, and I also use interval shapes to figure that out quickly.
And yes, there is an inconsistency due to the B string.  For instance, the sixth is two strings up and and one fret back if your root is on E, A, D, but it's two strings up and on the same fret if your root is on the G string.  However, this will quickly become second nature in my experience.
Answer: Quickly making chords? The way most guitarists do this is to actually learn the shapes - at the very least the basic shapes. Even knowing what the makeup of, say, F♯7♭9 is isn't usually enough, knowing intervals, etc., to finger that chord when it comes along in a song. Unless you're practising.
Yes, it's a good idea to know where certain intervals are found - ane they're always going to be on relative fret positions, which get messed up between G and B strings! So, it's not a bad idea per se, but for being able to instantly make up chords - it won't work. Mainly because chords are made up of more than one interval, and voicings being important, will create a minefield with that mental state.
And, yes, when you switch to another tuning, you'll have to re-learn all the intervals and there locations all over again, just like you'll need to learn new chord shapes, etc.
And, you already have the circle of fourths/fifths. On the bottom four strings at least. So, in a way, that's a given.
Comment: My experience as a guitarist conflicts with this answer.
Comment: My experience, over 50+ yrs as both guitarist and guitar tutor, provides this answer.
Answer: Yes it is a good idea to know the relative intervals between notes - it is actually very normal for development as a player.  Learning the intervals is necessary to know scale patterns and also form chords on the guitar.  You will 'naturally' learn some quickly (e.g. finding thirds or fifths/power chords), but investing time will help you progress faster and further.
The guitar excels as a transposing instrument, and knowing the intervals is a big step in that direction.
Changing tuning will affect this knowledge.  In Drop D, it has a relatively small impact since only 1 string changes.  The impact is larger if you tune further away from standard (assuming you learned in standard tuning).


Food 'fight' in the Talmud

Question: Does the Talmud talk about a food fight (i.e. throwing food at one another)?
In general, what would the Talmud have to say about a food fight in terms of wasting food, or otherwise? Is it okay? Not okay?
Comment: Welcome to MiYodeya Shlom. Since MY is different from other sites you might be used to, see [here](https://judaism.meta.stackexchange.com/a/3887/11501) for a guide which might help understand the site. Great to have you learn with us!
Comment: Related (PTIJ): https://judaism.stackexchange.com/a/89871/9682
Comment: How about gemara where the pelted someone with esrogim
Answer: There is something like you mention in the Talmud Yerushalmi in Demai 7:1:
Rebbi and Rabbi Yossi were invited as guests to eat at the home of a certain man. However, the Rabbis suspected that he did not properly tithe the food being served, and they wanted to attempt to tithe the food secretly. Their suspicion was noticed by another man who told the owner to look at what the Rabbis are doing. Once the Rabbis realized that they were under scrutiny, they started throwing their food at one and other in a playful manner and by doing so they were secretly tithing the food.

דא"ר שמואל בר רב יצחק רבי ורבי יוסי בי רבי יהודה נתארחו אצל בעל הבית אחד אזל לישנא בישא א"ל הב דעתך דאינון מחשדונך יתיב לי מעייני לון והוון עבדין נפשין מזרקין אילין לאילין ומתקנין

As far as wasting food, right before this incident the Talmud dismissed the notion that this is considered wasting food because he can make the tithed portion into tiny pieces less than a כזית and it is not considered wasting food.

רבי ירמיה בעא קומי רבי זעירא ואינו אסור מפני אובדן אוכלים א"ל מפררו כל שהוא

Additionally, you can listen here to a shiur on this given in Yiddish by HaRav Chaim Kanivesky שליט״א. (Starts at 4:40)
Comment: Couldn't they just have told the man that he wasn't preparing the food correctly?
Comment: @BjörnLindqvist Perhaps they did not want to embarrass him; I'd have to research the matter further. That is nonetheless a great question on the Talmud.
Answer: I found one mention of throwing food in the gemara - but in general there is a law not to waste food and thus the whole idea of throwing away and spoiling food goes against the Torah ethic.
The gemara in Shabbat 105b brings a story of Rav Sheshet who threw small fish on his maidservant's head to instill fear in the members of his household by pretending to be angry. The Sefer Hachinuch (#529) comments

Nonetheless their supervision would always be over them, that they not
  throw down something that would be destroyed by this.

This is because there is a general prohibition of bal taschit, not to destroy unnecessarily. This is based on Devarim 20:19

When in your war against a city you have to besiege it a long time in
  order to capture it, you must not destroy its trees, wielding the ax
  against them. You may eat of them, but you must not cut them down.

The Rambam codifies and extends this (MT Melachim 6:10)

And not only regarding trees, but even one who destructively breaks
  vessels or rips up clothing or tears down a building or seals up a
  spring or wastes food violates the Negative Commandment of "Do not
  destroy".

The Talmud in Berakhot 52b mentions the importance of not throwing away bread larger than an olive-size piece

And Beit Hillel say: If the attendant is a Torah scholar, he removes
  the crumbs that are an olive-bulk from the table at the end of the
  meal and leaves only crumbs that are not an olive-bulk, as food that
  is less than an olive-bulk is not considered food and there is no
  prohibition to ruin it.

There is even an opinion in Shabbat 140b that eating bread of higher quality, when not required, is waste, although that opinion is not upheld

And Rav Ḥisda also said: One who is able to eat barley bread and
  nevertheless eats wheat bread violates the prohibition against wanton
  destruction. One who wastes resources is comparable to one who
  destroys items of value.

In light of all these statements it is quite clear that throwing food at each other and spoiling it doesn't go in the spirit of the Torah and doesn't teach the proper attitude. See the Sefer Hachinuch at length on this.
Comment: One more source: [Berachot 50b](https://www.sefaria.org.il/Berakhot.50b.9?lang=bi&with=all&lang2=en), which says explicitly אין זורקין את הפת (the source for one of the other answers)
Answer: See Shulchan Aruch (OC 171:1):

שלא לנהוג בזיון באוכלים
ואין זורקים הפת משום בזיון אוכלים וכשם שאין זורקין את הפת כך אין
  זורקין אוכלי' הנמאסים ע"י זריקה אבל מידי דלא ממאיס כגון אגוזים
  ורימונים וחבושים שרי:
One should not do disrespectful things with food.
One should not throw bread, because it is disrespectful of the food.
  And just as one should not throw bread, so one should not throw any
  food which will become repulsive [spoiled] by throwing it, but
  something which does not become repulsive, such as nuts, or (hard)
  pomegranates or quinces, may be thrown.

Bread requires a higher level of respect, and one should not throw bread even if it will not become spoiled by throwing it.
Comment: Question asked about the Talmud
Answer: An additional source in the Talmud is an incident mentioned in Ta'anit 24b where Rabbi Yehuda saw two people throwing bread, which upset him to the extent that a famine occurred.

Food ‘fight’ in the Talmud


What is the best way to get games for the multiple editions of The Week In Chess?

Question: I am looking for getting all games played in 2013 as quickly and painlessly as possible. A batch file to download many ziped pgn files would be non-ideal, but ok. I prefer the Week in Chess as a source due to their high DB consistency quality, but the ultimate goal is to compile a single high quality DB of all games played in the year 2013.
Comment: Besides a TWIC download?  If you're willing to wait + pay, the megabases that Chessbase releases in 2014 will pretty much cover TWIC for 2013 (as well as every other year before that! :))
Answer: Here is your requested zip:  2013_TWIC.zip
I created a command script for this. See attached. I assumed you are running
Windows, but the script is easily adapted to other OSes.
For downloading, it uses curl. You can get that at http://curl.haxx.se/download.html, and
for Windows, I recommend the msi installer.
For unzipping, I used Java's Jar tool, which is free. But use whatever you
prefer.
When running the script, run dos shell as Administrator in Win8 or Win7.
At the end of the script it puts all PGNs into one large PGN file called 2013_TWIC.pgn
HTH.
Click: Script to get 2013 TWIC PGN files
Answer: An easy solution in C++:
    #include <urlmon.h>

    #pragma comment(lib, "urlmon.lib")

    const int firstnumber = 920, lastnumber = 1104;
    const char * const Spath = "http://www.theweekinchess.com/zips/twic"; // source path
    const char * const Dpath = "C:\\Users\\<username>\\Downloads\\twic\\"; // destination path

    void main()
    {
        int x;

        for (x = firstnumber; x <= lastnumber; ++x)
            URLDownloadToFile(nullptr, (Spath + std::to_string(x) \
    + "g.zip").c_str(), (Dpath + std::to_string(x) + ".zip").c_str(), 0, nullptr);

    }

A powershell unzip script:
$shell = new-object -com shell.application

for ($x = 920; $x -le 1103; $x+=1) {

    $zip = $shell.NameSpace("C:\Users\<username>\Downloads\twic\$x.zip")

    foreach($item in $zip.items())
    {
        $shell.Namespace("C:\Users\<username>\Downloads\twic").copyhere($item)
    }

}

A simple command line pgn file merge: copy *.pgn twic.pgn
Answer: I was trying to solve the same problem but since I am not familiar with C++ I did it in Python instead. My program also unzips and extracts the PGN files from the downloaded zip files.
Code:
  import pycurl
  from io import BytesIO
  import os
  import zipfile
  from pathlib import Path

  c = pycurl.Curl()

  for i in range(start, end + 1):

    url = "http://theweekinchess.com/zips/twic" + str(i) + "g.zip"

    save_location_path = Path("/home/paluchasz/Desktop/chessbase_stuff/downloading_twic/twic" + str(i) + ".zip")
    unzipped_location_path = Path("/home/paluchasz/Desktop/chessbase_stuff/downloading_twic")

    with open(save_location_path, 'wb') as f:

        c.setopt(c.URL, url)
        c.setopt(c.WRITEDATA, f)
        c.perform()

    with zipfile.ZipFile(save_location_path, 'r') as myzip:
        myzip.extractall(unzipped_location_path)

    os.remove(save_location_path)

  c.close()

Notes:

Firstly to find the url I just put my mouse pointer on the download pgn button on the TWIC website. I noticed that the urls have a common structure and the only thing that changes are the numbers. However, that url appeared to be incorrect as I was getting a 301 (moved permanently) error. As it turned out it moved to the same url but without the 'www' at the start.
Adjust the range function depending on what files you want to download, so if you want to download from 1100 to 1250 then set start = 1100 and end = 1250
The unzipped_location_path should be the path to the folder where you want the pgn files to be saved to. The save_location_path will be a path to where the zip files will be downloaded to first (I chose the same folder for this). These also need a file name at the end of the path which needs to be different for each zip. Hence the str(i) + ".zip" ending.
It is not necessary to use Path() - it's use is that this script can now be run on another operating system which perhaps has the same path (Windows for instance uses backslashes instead and this path would not work)
The pycurl library downloads the files. Zipfile then reads these files and extracts them. Finally os.remove(save_location_path) removes the no longer useful zip files.
Finally, I originally downloaded CBV Chessbase files instead. However, I could not see an easy way to combine all those files together and I would have had to append to my database one file at a time. That is why I downloaded PGN instead as now I could use the cat command ($ cat * >twic1100-1250.pgn) to merge all the files into one.

Automating the process

Finally, I thought to myself: would it not be nice if the script was executed weekly and my database would be up to date from now on? To see how I adapted my code have a look on my GitHub: https://github.com/paluchasz/downloading_games_from_TWIC/blob/master/downloading_twic_games.py
I then set up a cron job in the command line to execute the script every Tuesday.
Comment: Thanks for sharing! Does this script work on Windows or Linux or both? Paths look like Linux, but you mention ChessBase:)
Comment: I think it should work on both although I only tried on Linux! The point of Path() is so it works on both but you could just use the windows path with backslashes instead and then it should work. I am using Linux but I have a Windows in Virtual Box - that's why I mentioned ChessBase. I have a shared folder between the two systems and that's where I save the pgn files!
Answer: Write a script that downloads the files, one at the time. The filename structure will allow you to use a loop to capture all the files you wish to get. Then, write a script that unzips the files and concatenates them in a single large PGN file. Then, write a script that finds and discards duplicated games. Other strategies seem to include a Firefox add-on (https://addons.mozilla.org/en-US/firefox/addon/downthemall/) and in general, the topic has been discussed in other places (http://www.chess.com/forum/view/general/13-million-master-games), (http://www.chess.com/forum/view/chess-equipment/quotlost-issuesquot-of-twic), (http://chessdb.sourceforge.net/tutorial/twic-retriveal.php).


Stripped Down But Not Minimal Ubuntu

Question: I'm trying to get CrunchBang to work on a 10.04 base and I was wondering whether there exists a distribution that still has drivers and synaptic perhaps, but not all the other stuff like AbiWord and such.
Answer: have you considered compiling your own livecd? get everything you want, nothing you don't.
https://help.ubuntu.com/community/LiveCDCustomization
Answer: For you own custom Ubuntu, you can install the absolute basics from the alternate or server CD, add the ubuntu-desktop package to install X and other related essentials if you plan to use the machine from the desktop and then just add the bits you want (firefox if you want to use it as the browser, build-essential if you plan to compile anything on that box, and so on - the "recommended packages" list for ubuntu-desktop is a good place to look for obvious things you might otherwise forget at first).
The initial install this way requires more Linux experience as you will be using the Debian text-based installer and not the more automatic and friendly graphical one, but there is no rocket surgery or brain science required. Until you have synaptic installed you'll need to use apt/aptitude to add packages which again is less obvious but not difficult.
Or you could just do a normal install and remove the packages you do not want, followed by running aptitude clean to remove the clutter from your local package cache. This won't be as minimal and may take longer (installing more initially only to take it away again) but may be good enough for your needs.
Answer: That's a very subjective question - what is useless to you might be precious to the next person.  I'm not sure why you want to go not-quite-minimalist, but you can always un-install anything you don't need/want.  Might take a lot of effort to fine-tune, but if you see that much benefit then just do it.
Answer: If you install Synaptic, it's not going to be a very light install because that depends on GTK, which depends on X, which needs a window manager or something, etc. etc. etc.
Also, if you install GNOME at all, it'll install all the default GNOME apps: all 50ish of them.
There are many JeOS (Just enough OS, as they're called) distros out there, for example, OpenSuSe has one, Ubuntu does, and they do pretty much what you described (except, as said above, Synaptic). Problem is, they often don't come with much of any good drivers, so you may want to just stick to the server edition, which should be light enough, but have all the drivers needed.

Stripped Down But Not Minimal Ubuntu


TOKENS transfer

Question: How do I transfer  Dropil tokens from my Ether wallet to another ether wallet. I tried to search the way to transfer the tokens but did not find the way. Only ether transfer facility is there.
Answer: Dropil is an ERC20 Token. You can just transfer it between your ether wallets. For example here, with myetherwallet. Just choose the token you want to transfer and send it to your other address.

TOKENS transfer


Custom Claims Provider in Specific Zone

Question: We have a custom IdP/STS (Identity Provider/Security Token Service) used as a trusted provider in all Internet zones of our applications that fall under our umbrella of SSO enabled applications. Because we built this custom, we had to build a custom claims provider (CCP) to handle display issue in the people picker where you see the same user n amount of times where n is the number of claims exposed by the IdP/STS, http://msdn.microsoft.com/en-us/library/gg251994(v=office.14).aspx
This was built and then we discovered the CCP was breaking the farm (local only ;)) in the sense that we could no longer create site collections. Doing a little digging a la ilSPy, I decompiled the New-SPSite commandlet and discovered that internally SPUtility.ResolvePrincipal(...) was returning null. The exception in the commandlet thrown was "User Not Found".
I was a little confused as the custom claims provider was built only for the custom IdP/STS.
I discovered that all claim providers that are deployed to the farm are always called. The entire collection of them appears to run when EnsureUser is called and when SPUtility.ResolvePrincipal is called. There are probably other methods too that I am unaware of that call all of them as well. This made sense because as soon as I removed the CCP from the farm, everything worked again. I reactivated it to keep digging.
Our custom IdP/STS handles AD users in the Internet Zone. NTLM (claims-based) is used in the Default zone. When our CCP was hit, it would resolve the AD user, since it's one of the user bases in our IdP/STS but it would resolve the picker enitity with the correct claim prefix for our trusted provider. As soon as it came out of our custom claims provider, the SPUtility.ResolvePrincipal would resolve to null for a valid user in the default zone. I discovered when trying to run the New-SPSite commandlet. As I mentioned the error returned was "User not found". I found this confusing as the user was in the UserInfo table in the content database and would resolve properly when calling EnsureUser.
Searching Google was not resulting in much until I came across a post about "User is not found or is not unique" when saving something where a user was selected in a People Picker, like granting permissions or adding a user to a SharePoint group. I decided to go into our Default zone (NTLM). I tried to add my user to a SharePoint group. Boom, "User is not found or is not unique". I double checked the UserInfo table, only one user. Then I realized we're resolving AD users in our custom IdP/STS and the custom claim provider is hit all the time along with the other OOTB (Out of the box) claim providers. It seems that the fact our IdP/STS resolved the AD user caused a conflict with the OOTB claim provider that resolves the AD user in our Default Zone (NTLM).
So how to bypass our custom claims provider when it's not supposed to be used even if it's always called?
protected override void FillResolve(Uri context, string[] entityTypes, SPClaim resolveInput,
                                    List<PickerEntity> resolved)
{
    if (resolveInput.OriginalIssuer != null && resolveInput.OriginalIssuer != customClaimProviderOriginalIssuerName)
    {
        // Need to leave here. You cause issues with SPUtility.ResolvePrincipal with AD OOTB claim providers. It will complain about either a user not being found or
        // a non-unique user.
        return;
    }

    FillResolve(context, entityTypes, resolveInput.Value, resolved);
}

This is all the preamble to my question. OK, so I've handle my scenario now, then what is IsUsedByDefault = false do then? Apparently nothing.
public override void FeatureActivated(SPFeatureReceiverProperties properties)
{
    ExecBaseFeatureActivated(properties);

    var cpm = SPClaimProviderManager.Local;

    foreach (var cp in cpm.ClaimProviders)
    {
        if (cp.ClaimProviderType == typeof(CustomClaim))
        {
            cp.IsUsedByDefault = false; // we don't want to use this claim provider by default.
            cp.IsEnabled = true; // Needs to be enabled if we want to use it in the farm.
            cpm.Update();
            break;
        }
    }
}

As well, you can set the custom claim provider to be used in a specific zone, which I set as well, but it still seems to be called in all zones regardless of the zone I explicitly set it for.
### Functions
function Set-SPClaimProviderSettings {
    param($claimProviderName, $isUsedByDefault = $false, $isEnabled = $true)

    # Ensure that custom claim provider settings are correct.
    $cpm = Get-SPClaimProviderManager
    $customClaimProvider = $cpm.ClaimProviders | WHERE { $_.DisplayName -eq $claimProviderName }
    $customClaimProvider.IsUsedByDefault = $isUsedByDefault
    $customClaimProvider.IsEnabled = $isEnabled
    $cpm.Update()
}

function Set-SPClaimProviderForWebApplicationZones
{
    param($webApplicationUrl, $claimProviderName, [System.Collections.Generic.Dictionary[[Microsoft.SharePoint.Administration.SPUrlZone], Boolean]]$zonesConfiguration)

    if ($zonesConfiguration -eq $null) {
        throw { "Zones configuration cannot be null" }
    }

    $webApplication = Get-SPWebApplication -Identity $webApplicationUrl

    foreach ($currentZoneConfiguration in $zonesConfiguration.GetEnumerator()) {
        $zone = $currentZoneConfiguration.Key
        $isClaimProviderEnabled = $currentZoneConfiguration.Value
        $iisSettings = $webApplication.GetIisSettingsWithFallback($zone)
        $hasRegisteredClaimProvider = $iisSettings.ClaimsProviders.Contains($claimProviderName)

        if ($hasRegisteredClaimProvider -and !$isClaimProviderEnabled) {
                $iisSettings.ClaimsProviders.Remove($claimProviderName)
        }
        else {
            $iisSettings.ClaimsProviders.Add($claimProviderName)
        }

        $claimProvidersForZone = $iisSettings.ClaimsProviders
        Set-SPWebApplication -Identity $webApplicationUrl -Zone $internetZone -AdditionalClaimProvider $claimProvidersForZone
    }
}

# Enable the custom claim provider for the Internet zone only for all applications that fall under the SSO umbrella.
# TODO: Loop all applications in my deployment config XML.
Set-SPClaimProviderSettings -claimProviderName $CustomClaimsProviderName

$zonesConfiguration = New-Object 'System.Collections.Generic.Dictionary[[Microsoft.SharePoint.Administration.SPUrlZone], Boolean]'
$zonesConfiguration.Add([Microsoft.SharePoint.Administration.SPUrlZone]::Default, $false)
$zonesConfiguration.Add([Microsoft.SharePoint.Administration.SPUrlZone]::Internet, $true)

Set-SPClaimProviderForWebApplicationZones -webApplicationUrl http://myInternetZone.com -claimProviderName $CustomClaimsProviderName -zonesConfiguration $zonesConfiguration

I would think that enabling the custom claim provider for a specific zone would be all that is required, but this does not appear to be the case. From what I can tell tell, setting this does nothing.
Comment: Did you ever figure this out, setting on different zones. My code is almost identical to yours and has no effect. I run Peschka's tool against the zone after my code sets it and his tool says it is not there.
Answer: Did you take a look at Steve Peschka's post of the subject?
I personally didn't try to custom code this but relied on his Custom Claim Activation tool, which has worked great so far.
By the way, I have the same "User not found" issue you have with a custom claim provider that resolves the same user as the default "Forms Auth" claim provider. I still haven't found a solution to that (the idea is to override the way the people picker displays results from an FBA datasource).
Hope this helps anyway.
Comment: yes, I read this post and used the tool, but regardless of which zone I set my custom claim provider to, it is always hit in any zone. And as you see in my code above, IsUsedByDefault is set to false. I fixed my issue by checking the issuer in the fill resolve. My question was why does my claim provider get called in any zone even if I only have it enabled in a specific zone.

Custom Claims Provider in Specific Zone


Is it illegal to record a voicemail greeting?

Question: Let's say I wanted to compile voicemail greetings for a fun project which may be put online. The voicemails would be of school district administrators from their office phone numbers. Would the practice of recording the greetings be illegal? What about posting them online?
Comment: The issue is that the recording may be copyright of the person who made it, and using it without permission would be illegal. I would suggest if you want to do this, you get permission from that person first. Most likely you would need to attribute your sources which is identifying information.
Comment: @IñakiViggers To be copyrightable in the US, something needs to have at least a small amount of originality and be in fixed form.  A voice mail greeting is obviously in a fixed form, since it can be reproduced at will.  If there is any creativity in it, it's automatically copyrighted.
Comment: What country are you talking about? But if you are doing it without their consent it is likely illegal (and definitely unethical, but that's a different question).
Comment: In the United States.
Comment: I would not disclose the identity of the individuals speaking.
Comment: In what state? Are you wanting to call them and record the call, then use it? Or are you wanting to copy a recording of the individuals voice-mail greeting and use that?
Comment: If there is any grey area legally or ethically, I'm not interested in pursuing this. It sounds like there might be in the case that someone could figure out whose voice it is.
Comment: I was strictly thinking about their voicemail greeting. I wanted to look at how they vary by region.
Comment: @RonBeyer Not every publication that is intended to achieve to a person's everyday needs (such as a voicemail greeting) is copyrightable.
Answer: A voicemail greeting, like any original sequence of words, will be protected by copyright. Making and publishing a copy without permission would be an infringement of that copyright, and could subject the person who does it to a civil lawsuit.
However, such a greeting normally has no commercial value, and it is hard to see how any actual damages could be assessed. In the US, statutory damages could apply, but since the greeting is unlikely to carry a copyright notice, the person sued might claim to be an "innocent infringer", which could significantly reduce the damages assessed.  (However if such a person had read this answer, and that were brought out in court, s/he would be on notice of the copyright protection, and could not claim to be "innocent".)
Moreover, the defendant could still raise the defense of fair-use (In the US). The would be no harm to the market for the work, since there is no market, which would favor fair use. The whole of the work would probably be used, which would tend against fair use. A greeting is somewhat creative, more so than a work of non-fiction, although usually less so than actual fiction or verse, which leans slightly against fair use. It is hard to say if this kind of reuse would be considered transformative, it would probably depend on what sort of commentary, if any, was provided. In all, a fair use defense seems pretty close to a coin flip, but not as predictable.
In any case, judges often do not favor suits over technical infringements of works with no commercial value where no meaningful damage has occurred, and often award minimal damages within the statutory range, which is wide.
Given all that, the risk of suit seems low. The question mentions "school district administrators" If the person doing this is a student, this might be looked on negatively by the school district, which might be able to frame it as against some district policy or other. Consider possible repercussions carefully.
As always on Law.SE, this is not legal advice. Before acting you may wish to consult an actual lawyer.
Answer: If there's any originality in the greetings, they're copyrightable, and hence copyrighted.  That means that further reproduction without permission is unlawful.
One of the people who made a greeting could conceivably file suit against you in Federal court.  Damages would be minimal, unless whoever registered a copyright, but the court decision could include an injunction against further use.  To me, filing suit seems like an awful lot of time, money, and hassle to achieve that, but not everybody may feel that way.
You speak of putting the project online.  In that case, anyone whose copyrighted work was used can send a DMCA takedown notice, which is likely to get your project removed from its hosting site.  Filing one of those is a lot cheaper than a Federal case.
Answer:
Would the practice of recording the greetings be illegal? What about
  posting them online?

Based on the information and your comments, I see no issues from legal or ethical standpoints.
A voicemail greeting is a message that a person intends to transmit to others (in general, to the public), with full awareness that the timing and recipients of the transmission are uncertain/unpredictable and beyond that person's control.
The possibility of triggering a reproduction of the recording through methods other than the dialing of that person's phone number does not by itself infringe that person's cognizable interests/rights such as privacy or safety. In other words, the use of a telephone system is not a legal prerequisite for each reproduction (or indeed, the broadcasting) of a person's greeting to the unknown public.
From the ethical standpoint, besides the absence of a secrecy or privacy factor, the nature of your initiative does not subject a person to undesirable effects such as a degradation of his relations or of his self-esteem.
Comment: The recording might be sufficiently original to be copyrightable.  In that case, the copyright holder has authorized its reproduction as part of voice mail, and almost certainly not in any other situation.  The fact that you can access something by public means doesn't mean it's open for unlimited use.
Comment: @Iñaki Viggers While "This is Joe Blow, leave a message at the tone" would not be original under the "required scenes" concept, anything less standard than that might well be original enough to get a copyright, the bar is quite low. Market value is only one of the 4 fair-use factors, see detailed comment on all 4 just added to my answer.
Comment: @DavidThornley Only a very small percentage of voicemails has originality. A plaintiff would have a hard time overcoming the [fair use](https://law.stackexchange.com/questions/7683/in-the-us-when-is-fair-use-a-defense-to-copyright-infringement) defense, since the author of a voicemail greeting hardly ever intends it to have market value on its own.Reproducing the greeting elsewhere does not harm the author's market share unless something is wrong with the greeting itself. A plaintiff is unlikely to prove or persuade that *unlimited use* in this  context subjects him to a loss or risk thereof.


This month's focus tag: dust

Question: Welcome to our new series of monthly focus tags! This month's focus tag is dust.
Featured Question: What is the difference between gas and dust in astronomy?
This question is great to start off with because it covers the definition of dust in astronomy, so if you're not sure what this tag is all about you should check it out!
The monthly focus tag is an opportunity for us to learn more about a topic and improve the site by taking a look at a particular area. Please take this opportunity to look at the questions and answers in dust. If you see anything that could be improved, take the opportunity to edit. If you have follow-up questions, go ahead and ask them (with the appropriate tag, of course). If you happen to know the answer to an unanswered question, we'd appreciate your input!
Also, this is a good chance to take a look at the tag excerpt and wiki. If it is empty or could be improved, perhaps you could help us out?
Feel free to use the answer space below to make community wiki lists of posts in need of editing, or to brainstorm ideas of what to add to the tag excerpt and wiki. Not sure about a particular dust question you have? Go ahead and share your concerns below, so we can help guide you to framing the question on the site.
Answer: Definition of dust resulted in the need for the tag dust-storm. Check it out and feel free to revise it as well. If you see any questions which need this tag or other questions under dust that don't fit the new definition, you can discuss here.

This month's focus tag: dust