Why shutter is not closed by-default on mirrorless cameras as it's closed on film ones?

Question: As I change lenses often I get a few specs of dust from time to time on my sensor and then it just struck me that if you just close shutter when camera is turned off then you could overcame this problem and this is exactly how film cameras do. Why not everyone does this in digital cameras?
Answer: The shutter is closed by default on film cameras because if it was open it would have exposed the film while the camera is not in use - it's simply this way because there's no other choice.
In mirrorless cameras, the shutter must be open when the camera is on but not taking pictures because otherwise the camera can't show an image on the screen or digital viewfinder (if there is one).
Now, since the mirrorless camera shutter must be designed to be open most of time when the camera is on it makes engineering sense to keep it open also when the camera is off - this way you design the shutter so it's always open and only closes when it needs to - this is simpler (and so, cheaper) than it is to design a shutter that's open-by-default when the camera is on and closed-by-default when the camera is off.
And the shutter is not a good protector against sensor dust anyway, any dust of the closed shutter will be thrown off violently when the shutter opens (it opens really fast) and bounce around inside the camera until it sticks to something, no camera I know off has a mechanism to safely dispose of shutter-dust
Comment: @BrianFunt - the sensor can't stop recording, light sensitive electronics remain light sensitive even when it's inconvenient, "electronic shutter" is implemented by reading the data while the sensor keeps recording, you either get low resolution (when reading the entire sensor at once) or strange artifacts with fast moving subjects (when reading line-by-line), your typical compact point-and-shoot is both low-res (compared to DSLR/mirrorless) and not typically used for high-speed subjects, high-end point and shoots usually have mechanical shutters
Comment: @BrianFunt - the shutter need to close when you finish taking a picture, when the shutter closes no more light is hitting the sensor so the camera can spend some time reading the data off the sensor without new light changing the data while it is being read
Comment: "...this way you design the shutter so it's always open and only closes when it needs to..."
When would the shutter need to close then, if not when off?
Comment: Can't the sensor just stop recording data? Isn't that what compact cameras do, or do they have a physical shutter as well?
Answer: On a modern SLR camera, it takes battery power to hold the shutter open. The power-free state is with the shutter closed.
However, on a mirrorless camera, the shutter is open out of necessity when the camera is on. It would not make sense to require battery power to keep the shutter open too - enough power is spent on everything else.
This means the shutter's power-free state is in the open position, and it takes power to close the shutter.
Answer: Not sure about film cameras, but the shutter is an extremely fragile and sensitive piece of mechanics, and the consequences of damaging it are far worse than the consequences of getting dust on the protection plate on top of your sensor.


linear section of codimension $k+1$ of a variety of dimension $k$

Question: Let $X$ be a variety of dimension $k$ and degree $d$. If $L$ is a linear subspace of codimension $k+1$ such that $|L\cap X|$ consists of a finite number of points, is there a way to find the maximum number of points for $|L\cap X|$ ? I was thinking the following: if $P \in L\cap X$, then I can find a linear subspace $L'$ of codimension $k$ containing $L$ and a tangent line at $P$, so if $L'\cap X$ consists of a finite number of points, then the intersection multiplicity at $P$ is at least  $2$, hence $|L\cap X|\leq |L'\cap X|\leq d-1$. Of course, if I can construct a $L'$ containing more tangent lines, then I could get a bound lower than $d-1$. But my concern is that $L'$ could intersect $X$ in a curve. How can I rule out this case? Is there another approach to tackle this problem?
Comment: You should at least add the hypothesis that the span of $X$ is not a linear space of codimension $k-1$.  Otherwise your bound is wrong.
Answer: Let $X$ be a degree $d$ curve contained in a fixed plane $H=\mathbb{P}^2\subset\mathbb{P}^3$, take $L$ to be a generic line contained in $H$.


How do Becquerels relate to Grays?

Question: I understand that becquerels are SI units for curies, and that curies are a measurement of radioactive decays per second. I understand that gray is the measure of uncharged ionizing rays in a sample matter. What I need to know is under what conditions are ionizing rays emitted. I need this information to convert becquerels to grays. A little sample of this problem is the statistics on the Fukushima disaster only provide information on the fallout in terms of becquerels, including the radioactive isotopes involved; for the assignment that led up to this question, i need statistics on the grays released during the incident. Really the only common ground these two have is radioactive decay, so, if i can get the conditions under which radioactive decay emits ionizing radiation, i can determine an approximation amount of grays in relation to fukushima.
Comment: Ahhh, the most confusing sets of units on the planet... Wiki has some decent introductions.
Comment: Is there a specific corner of wiki that I can look at? I ask because my attempts at finding said instructions have been in vain,
Comment: The entry for Gray has some pointers...
Comment: One thing to note is that there are a number of different things measured - number of decays per second, energy absorbed per unit mass, and the health effects of that energy absorbed. Hence the difference of rad (radiation absorbed dose) and rem (radiation effects - man). For the latter you need to know the factor that comes from the particle type and energy.
Answer: There is no direct relationship, because they measure two different things: The becquerel is a unit for measuring the rate of radioactive decays occurring within a sample of radioactive material - that is, it is a characteristic of a radioactive source. One becquerel refers to an average of one decay per second. Note here that this rate of decay is the total number of nuclei decaying in that one (averaged) second, and not simply the propensity of any individual nucleus to decay: the bigger the material sample, the more nuclei there are to decay for any given propensity, and hence it will rate with more becquerels, just as much as will considering a sample of material whose nuclei have a higher propensity to decay.
Now obviously, since a rate of 1 Bq is very small when you consider how many atoms, and hence atomic nuclei, there are in a typical macroscopic piece of material (on the order of Avogadro's number), we typically use larger versions of the unit such as megabecquerels (MBq) or gigabecquerels (GBq), this last being an average of one billion decays per second within the whole piece of material under consideration. One "curie" is now defined as exactly 37 GBq, and hence also the curie is likewise a unit of rate of radioactive decay.
The unit gray (Gy) is a unit of ionizing radiation energy absorption into a piece of matter - most typically thought of in the context of biological/medical effects of radiation where that the absorbing matter is living tissue, hence this is typically called "dose". One gray corresponds to absorption of one joule (1 J) of ionizing radiation energy into one kilogram of matter.
The two are quite obviously related, but not directly: a radioactive source that undergoes more radioactive decays will pump out more ionizing radiation energy, and hence you can accumulate more Gy standing in front of it than if you were standing in front of a source whose material was one in which fewer decays were occurring. But that is not the only factor: since what is measured in grays involves energy, another important factor is the energy release per each decay, which combined with the rate of decay to give the radioactive power of the source. This is measured in the perhaps more familiar unit of watts (W), just as any other such source. In particular, the radiation power is
$$P_\mathrm{rad} = A \cdot E_\mathrm{decay}$$
where $A$ is the activity, or rate of decays, measured in becquerels, and $E_\mathrm{decay}$ is the amount of energy released by a single atomic nucleus decaying. Typically, these energies are extremely tiny, on the order of picojoules ($10^{-12}$ joules). As a very simple example, if a source has a decay energy of 1 pJ, and an activity level of 1 GBq, then the radiation power generated by that source is 0.001 W or 1 mW (milliwatt).
To get the actual dose, you'd need to know how much of the source's radioactive power is actually absorbed by a target. The same rules apply here as for any other energy absorption problem, such as, say, dealing with thermal radiation, RF (radio-frequency) EM radiation, or sound (acoustic) radiation: if you can treat the source as a point source, you can find the intensity (power per unit area) by the usual inverse square law, and if you know the cross-section that the target being attacked presents to the source, and of course the exposure time, you can then find how much energy it receives, which combined with knowing the absorption characteristics and the target mass, can be used to estimate how many Gy will it absorb. In a realistic, complicated setup, you'd likely just have to measure.
Answer: Grays is the amount of energy absorbed by something (per mass). Becquerels is a measure of radioactivity - how many decays are there per unit time. When an atom decays it always emits ionizing radiation (It may be $\alpha$ or $\beta$ and most of the time it comes with $\gamma$).
How much energy got absorbed by another material or human being depends on a lot of parameters. For example, how close is the material to the radioactive substance? For how much time did the exposure take place? Geometry considerations and so on and so on...
It isn't direct to tell from one the other, but for specific cases you can take some assumptions and calculate.

How do Becquerels relate to Grays?


Zsh gpg2 autocompletion

Question: I am using zsh with oh-my-zsh on OSX. I installed gnupg2 from homebrew giving me the executable gpg2. Unfortunately zsh auto completion appears to only support gpg (even though that executable is not even installed). Is there a way to enable zsh auto completion for gpg2. Is there some sort of oh-my-zsh plugin for this?
Comment: Have you tried a symlink from `gpg` to `gpg2`?
Comment: Yes that works. But it feels hackish to me. Is there a better way?
Answer: Gpg 2.x has almost the same command line options as gpg 1.x, you're unlikely to encounter the very few options that have changed. So declare gpg2 as having the same completions as gpg. In your .zshrc, after the compinit line, add
compdef gpg2=gpg

If you have no compinit line (it may be somewhere deep in the bowels of oh-my-zsh), put this after the inclusion of oh-my-zsh components.
Comment: Works like a charm. For those using oh-my-zsh I would assume you have to place the line after `source $ZSH/oh-my-zsh.sh`

Zsh gpg2 autocompletion


Maximizing the volume of a box using Lagrange multipliers

Question: We are given a box of surface area $64$. As such, I wish to maximize $f(x,y,z) = xyz$ subject to $g(x,y,z) = 2(xy+xz+yz) - 64$. If I have understood in correctly, I am to find the critical points of the function $L(x,y,z,\lambda) = xyz + \lambda(2xy+2xz+2yz - 64)$. However, I always end up with a contradiction. Can anyone give me a thorough explanation of how one should go about attacking this problem?
We have
$L_1 = yz + \lambda(2y + 2z) = 0\\
L_2 = xz + \lambda(2x + 2z) = 0\\
L_3 = xy + \lambda(2x + 2y) = 0\\
L_4 = 2xy + 2xz + 2yz - 64 = 0$
I have attempted several methods, all leave me with contradictions, and are incredibly long and tedious. The tasks are generally made so that if you are on the right track, you will get somewhat "clean" results.
Comment: The "Subject to $g(x,y,z) = 2(xy+xz+yz) - 64$" is non-sensical, it should be something like "Subject to $2(xy+xz+yz)=64$", in which case you set up the problem correctly. Lagrange multipliers do not seem to work here, there are no absolute extrema.
Comment: I find that, since a specific value of $\lambda$ is not necessary for a solution, it is often best to start by eliminating $\lambda$, perhaps by DIVIDING.  $yz+ \lambda(2y+ 2z)= 0$ can be written $\lambda(2y+2z)= -yz$ and $xz+ \lambda(2x+ 2z)= 0$ can be written $\lambda(2x+ 2z)= -xz$.  Dividing, $\frac{y+ z}{x+ z}= \frac{y}{x}$ or $xy+ xz= xy+ yz$ so $xz= yz$  and, for z not 0, $x= y$.  Do the same with the other equations.
Answer: First, write down the equations you get when differenting $L$. For example, the derivative with respect to $x$ is $$\frac{dL}{dx} = yz + 2\lambda(y+z).$$
Then, you set the derivatives to $0$. This gives you a system of $4$ equations with $4$ variables to solve. Write down that system as an edit to your question so we can see if you made a mistake up to this point.
Edit: As far as I can see, you made no error in calculating the derivatives. Now, I advise you to look at the equations
$$-yz=2\lambda(y+z)\\-xz=2\lambda(x+z)\\-xy=2\lambda(x+y)$$
Try to multiply the first equation by $x$, the second by $y$ and the third by $z$. Play around with what you get, see where that leads you.
Comment: I made an edit according to your instructions.
Comment: @AndrewThompson I edited my answer.
Comment: Alternatively, you can solve all three equations for $ \ \lambda \ $ to write $$ \lambda \ = \ \frac{yz}{2 \ (y+z)} \ = \ \frac{xz}{2 \ (x+z)} \ = \ \frac{xy}{2 \ (x+y)} \ \ . $$  Cross-multiplying the first pair (which is "safe" since none of the variable values will equal zero), we obtain $ \ 2 \ (xyz \ + \ yz^2) \ = \ 2 \ (xyz \ + \ xz^2) \ \Rightarrow \ y \ = \ x \ $ .  Carrying this out for all three pairs will lead to $ \ x  \ = \ y \ = \ z \ $ : perhaps unsurprisingly, this tells us that the maximal volume box is a cube.


"Add to wishlist" without redirecting to wishlist page

Question: When clicking on the add to wishlist button, I want to remain on the same page & perform the add function without redirecting to the wishlist page - is this possible?
Answer: You need to rewrite the method _addItemToWishList from the controller Mage_Wishlist_IndexController and replace the last line.
Instead of
$this->_redirect('*', array('wishlist_id' => $wishlist->getId()));

You have to put:
 $this->_redirectReferer();

[EDIT].
Here is an example on how you can rewrite a controller.
You need to rewrite (like I said) Mage_Wishlist_IndexController. The controller is found in app/code/core/Mage/Wishlist/controllers/IndexController.php.
Comment: @BabyinMagento2 See my edit.
Comment: hi boss, thanks a lot for helping me again , again & again....

please tell me which in which folder and file..?...
Comment: ultimate you are ,as always.....
Comment: i will copy app/code/core/Mage/Wishlist/controllers/IndexController.php.

and do changes here : app/code/Local/Mage/Wishlist/controllers/IndexController.php.
Comment: Not working for me...Any Suggestions?
Comment: Don't forget about the rewrite in config.xml
Answer: What you're looking for is an Ajax solution. There are many extensions available to implement this for you, here are a few examples:

VS Ajax- Add To Cart, Add To Wishlist, Add to Compare, Paging, Toolbar,
AJAX - Add to Cart, Add to Wishlist

Alternately, if you'd like to implement it yourself, here is a guide:
Excellence Magento Blog - Ajax Based Add Product to Wishlist and Compare Products
This includes an extensive walkthrough on implementing this feature - as well as the module attached.
Comment: I don't see why not, although neither extension explicitly states that they support 1.9 . Try it on your staging environment and let us know.
Comment: I have not, no. That's why it's best to always test any extension on a staging environment. Both of the extensions listed though are well reviewed & have a decent user base. Read through the reviews.
Comment: will this extension work for 1.9 vwersion?
Comment: thanks  i will try , did you used any of above extension? any side effects did you faced?


Relationship between carbonated water intake and cavities?

Question: How does the intake of carbonated water with sugar additives correlate with the incidence of cavities? Is carbonated water itself corrosive?
Comment: Are you thinking of plain-ol-carbonated water or soda with sweetener? The carbonate itself has little to none effect on anything, artificial sweetener in carbonated imposes is the same risks as artificial sweetener in non-carbonated water.
Answer: There is no difference between real and added sugar.
Glucose (C6H12O6) as an example can be an additive or a "original" nutrition of any natural product.
Carbonated water with sugar additives therefore has the same increasing chance of caries (and cavities) as the same amount of sugar as what companies might advertise as "Carbonated water with real sugar".
Recent research has found that the amount of time spent consuming sugar has a larger effect on the risk of cavities than the amount.

This previous answer of mine talks about the corrosiveness of carbonated water and comes to the conclusion that

carbonated water might have a slightly larger effect on erosion of teeth than normal water because it is just a little bit acidic.
Answer: About sugar-sweetened beverages (SSB), the ingestion of 1-2 SSB  daily increment the caries incidence at least in 31% (Source)
The use of carbonate drinks without sugar added increase the incidence of dental erosion (source).
Hence, any carbonated liquid is associated with dental erosion. If you add sugar, then is also associated with dental caries.
Comment: Your second source seems behind a paywall and the abstract is beautifully uninformative for the question at hand. Could you expand what you read there and cite a bit more?
Comment: Hm, that paper: I suspect that they used the American definition of "carbonated **soft** drinks" -> including things like coke under that label. It is further unclear how just adding CO2 to H2O could be that influential. Do you agree in reading that table as carbonated drinks being the weakest erosive agent?


Manage Microsoft DNS Records from Linux

Question: Is there a utility that allows remote editing of records on a Microsoft DNS server FROM LINUX? I know you can edit the records using DNSCMD but that is only usable on Window, is there something similar to that?
Answer: Depending on how you setup your authentication/authorization there is the ability to use Dynamic DNS.  For example I have my puppet server calling nsupdate to update a particular DNS zone host on my Windows server.  In another answer I provided example usage of nsupdate.

Manage Microsoft DNS Records from Linux


Aharonov-Bohm Effect and Flux Quantization in superconductors

Question: Why is the magnetic flux not quantized in a standard Aharonov-Bohm (infinite) solenoid setup, whereas in a superconductor setting, flux is quantized?
Answer: According to Wigner, the wave function of a quantum particle can be
multivalued, i.e., can acquire a nontrivial phase around a closed loop.
A phase is nontrivial when it cannot be removed using a gauge
transformation by $e^{i \alpha(\theta)}$, with a true function $\alpha$,
i.e., $\alpha(2\pi) = \alpha(0)$. The wave functions having this property are sections of nontrivial line bundles over the configuration manifold.
The reason that a wave function is not required to be a true function is because its overall phase and magnitude are nonphysical, if one defines quantum expectations as:$$
\left< X \right>~~=~~ \frac{\int \Psi \hat{X} \Psi}{\int \Psi \Psi}
\,.$$
Such wave functions arise when the configuration manifold is not simply
connected with a nontrivial cohomology group $\mathcal{H}^{1}(M,\mathbb{R})$ (This is the case of the circle). In this case, there will exist vector potentials on the manifold which are not the gradients of a true function on the manifold. $A \ne d\alpha(\theta)$. with, $\alpha(2\pi) =\alpha(0)$. However, there is no need for the flux to be quantized as the wave function needs not be a true function on the configuration manifold. On the contrary, if the flux had been quantized, then no Aharonov-Bohm effect would not have observed. A quantization condition occurs when  $\mathcal{H}^{2}(M,\mathbb{R})$ (The Dirac quantization condition), but this is the case of a particle moving on a sphere rather than on a circle.
However, this is not the case in superconductivity. The difference between the two situations lies in the fact that the "macroscopic wave function" of a superconductor is not a "wave function".
i.e., it is not the coordinate representation of a state vector in a Hilbert space. It is a quantum field describing Goldstone bosons (Cooper pair) of the superconducting phase (usually called an order parameter). The modulus of the macroscopic wave function $\left|\Psi \left( \theta \right) \right|^2$ describes the number density operator of the Goldstone bosons. Its two point functions describe the (long range) correlations. This quantum field couples minimally to electromagnetism, and this is the reason why its equation of motion is similar to the Schrodinger equation of a particle coupled to electromagnetism. But the main difference this field is a true scalar field and not a section of a line bundle. This gives us the reason why the phase it acquires in a full loop should vanish because otherwise for example, its correlation functions would depend on how many times the circle was wrapped.
Comment: Yes, this is exactly the definition of multivaluedness. Take for example the "funtion"  $e^{\frac{i\theta}{2}}$ on the circle, it is multiple valued since it takes two different values at  $\theta = 2\pi$  and  $\theta = 4\pi$
which are the same physical point. Its modulus is a true function on the circle. Of course, the modulous operation cancels only a single global phase and if the wave function is a superposition, the relative phases will still exist. This is the reason why the wave function "feels" the topology in the Aharonov-Bohm effect.
Comment: Hi, do you know where Wigner talks about the multivaluedness of the wavefunction?
Comment: @jinawee Wigner worked on the representations of the Galilean group together with Inönü in their article "Representations of the Galilei Group". Please see the article on page 359 of Wigner's collected work: http://books.google.co.il/books?id=Sc3PRTALFpkC&pg=PA459&lpg=PA459&dq=%22Representations+of+the+Galilei+Group%22&source=bl&ots=5ZQNIW8Vva&sig=xOJKknZbObQ61ToMQ702kWLw-DY&hl=en&sa=X&ei=EQhSVOK2E8PiaO_5gSA&ved=0CC8Q6AEwBQ#v=onepage&q=%22Representations%20of%20the%20Galilei%20Group%22&f=false.
Comment: They showed that the Shrödinger wave function of a single particle acquires a phase under a translation and a boost and this is alright, but, under a sequence of transformations: translation, boost, reverse translation, reverse boost, the overall phase does not vanish even though we returned to the initial frame of reference. This is a multivalued function related to the nontrivial central extension of the Galilean group.
Comment: Clarifying question: is it safe to say that mod-squared of the wavefunction must be single-valued?  since, as you say, the phase is unphysical?
Answer: Just adding to @Xcheckr's answer, which I think is the most correct: quantum fields are always single-valued. In a superconductor, it is energetically favorable to minimize the kinetic term $|D_A\psi|^2$, where $\psi$ is the superconducting order parameter. $D_A\psi=0$ implies that the phase of $\psi$ is determined through parallel transport by exponentiating $iq\int A$, and this together with the single-valuedness of $\psi$ enforces flux quantization.
In an AB effect setup by contrast, there is no energetic reason to set $D_A\psi=0$, and so the phase of $\psi(x)$ will not be determined by $\exp(iq\int A)$. This means that for some generic value of the flux, the magnitude $|\psi|$ will not be constant (e.g. it will pass through zero at some point), which is where the interference in the AB effect comes from. In a superconductor $|\psi|$ must be constant for energetic reasons, and this is why the flux is quantized in a SC.
Comment: This is the best and clearest answer by far; I wish I could upvote it twice!
Answer: While both the answers given in some sense are correct, the true reason has to do with energetic considerations. It is a matter of what is stronger and can be phrased as the following question: Will the wavefunction alter itself to accommodate the flux, or will the flux quantize itself because the wavefunction is trying to remain single valued?
As an example of what I mean: flux is quantized in the superconducting case up to a point. One can ramp up the flux inside the superconducting ring until superconductivity is destroyed (even though the magnetic field itself is not in contact with the superconductor). This will occur purely because the superconducting condensate will not have enough energy to keep the flux quantized at large values of the flux.
It is because the superconductor in some sense can be thought of as a macroscopic wavefunction with a lot of energy that the flux is quantized in the superconducting case. In the Aharonov-Bohm case, we have a single electron (or a beam of incoherent electrons), which does not have enough energy to alter the flux.
Answer: The whole Aharonov-Bohm effect – a nontrivial phase – is actually due to nothing else than a deviation from the flux quantization rule. The angle we may measure as the shift of the interference pattern in the Aharonov-Bohm effect is
$$ \Delta\phi = \frac{q\Phi_B}{\hbar}, \quad \Phi_B \equiv\int d\vec S\cdot \vec B $$
So the conventional flux quantization rule is $\Delta \phi = 2\pi k$ for $k\in{\mathbb Z}$ which means nothing else than "the solenoid behaves as exactly as if there were no solenoid".
That's how we derive the flux quantization in the first place. The magnetic monopoles, for example (an important third situation I am adding where the flux quantization deserves to be discussed), have to obey the Dirac quantization rule which is equivalent to the flux quantization rule for the flux through the surface surrounding them. And they have to obey it exactly for the Dirac string – a semi-infinite line starting from the magnetic monopole where $\vec A$ is inevitably singular and which must exists because ${\rm div}\,\vec B\neq 0$ anymore – to be unobservable. The Dirac string is nothing else than an Aharonov-Bohm solenoid, however one that we know to be unobservable because there's no matter over there and we required the location of the Dirac string to be a pure convention.
Note that there is a difference between the surfaces above. The flux quantization (which doesn't hold) in the Aharonov-Bohm effect counts the flux through an open, disk-shaped region; in the Dirac quantization rule, it's a closed surface, a sphere around a monopole. It's only the latter flux through a closed surface that has to be quantized.
Now, in superconductor, electron pairs act as bosons that effectively produce a complex classical scalar field $\Psi$. Its charge is $2e$ because it is composed of electron pairs. Now, the vacuum expectation value of $|\Psi|^2$ is a nonzero constant but the phase of $\Psi$ is arbitrary. In particular, when you study how the phase of $\Psi$ changes if you encircle the boundary of a ring, you will find out it comes back to the original phase but it may "wind around zero" $w$ times, a winding number, and this integer $w$ exactly measures the magnetic flux in the units of the superconductor magnetic flux (which is $1/2$ times the minimum magnetic monopole dual to the electron).
This condition that "the phase of $\Psi$ has to return to itself" is mathematically equivalent to what we used in the magnetic-monopole, Dirac quantization discussion: its phase is changing as much as when an electron was encircling the Dirac string (or solenoid) in the previous two examples. A difference is that now, an electron pair must be allowed to peacefully encircle the ring without changing the wave function – because it's still the same state. So the phase is changing twice as quickly and the allowed unit of flux is $1/2$ of what it was before.
In the superconductor case, the phase must return to its original value (after the electron pair makes a round trip around the ring) because this situation is close to the "Dirac string". In particular, we require that there is no observable effect of the material inside the disk simply because there's nothing – there's no solenoid etc. – inside the ring. So much like for the Dirac string, the matter inside the ring has to be invisible – there isn't any – which means that the wave function has to return to its original value after a 360-degree rotation by the electron pair.
Summary
One could just dismiss these three situations as entirely different situations but the key maths is still analogous in the three situations, with some differences:

the Dirac string or the interior of the superconducting ring must act as if there were nothing, so the wave functions must return to themselves, and therefore impose the quantization rule; it's important to distinguish the open/closed topology of the surfaces over which the fluxes are measured
the Aharonov-Bohm solenoid contains stuff so there's no valid proof that the solenoid has to be invisible to the electrons running around it, and indeed, their interference pattern is allowed to shift as a result
one must be careful about the diffferent elementary charges, $e$ (or $e/3$ if quarks are included) in the Dirac string and/or the Aharonov-Bohm solenoid, and $2e$ in the superconducting case


Is prayer invalid/prohibited after 40 days of pubic hair?

Question: I am confused if prayer is makru or invalid if the pubic area is more than 40 days?
Comment: Does this answer your question? [Which things break the wudu?](https://islam.stackexchange.com/questions/11103/which-things-break-the-wudu). The question was asked by you!
Comment: there is no confusion here. the length of the pubic hair is not something that invalidates prayer. do you have any proof/evidence to support your confusion?.
Comment: actually he is not asking things that invalidate wudu. I have also heard this from one of my friend similar to what he asked, of course these things may not have any basis in Islam. So if someone knowledgeable confirm it is just false, then this question can be kept open so someone who has similar doubt can find it is wrong.
Answer: Cutting pubic hair is prescribed in Islam. And 40 days is reported as the upper limit of time before which they should be removed.

قال أنس - وقت لنا في قص الشارب، وتقليم الأظفار، ونتف الإبط، وحلق العانة، أن لا نترك أكثر من أربعين ليلة
Anas said: 'A time limit was set for us for trimming the moustache, clipping the nails, plucking the armpit hairs and shaving the pubes: that was not to be left for more than forty days.'
— Muslim

The below linked fatawa have expressed that they could not find any evidence which associates validity of prayer with pubic hair. Prayer is valid as long as its conditions are met such as purity of the body, clothes, place, having done wudu or ghusl as needed, covering of the 'awrah.
The only conceivable way pubic hair could invalidate prayer is if they interfere with purity: for example if the hair are not kept clean or if they carry some filth like urine, ejaculate, blood etc.
Ref:

https://islamqa.info/en/answers/1177/ (English)

However, leaving them for more than forty days does not have any effect on the validity of a person's prayer,

https://www.islamweb.net/ar/fatwa/107473/ and https://www.islamweb.net/ar/fatwa/120456/

وأما الحديث المذكور في السؤال فلم نقف عليه ... ولم نقف على قول لأهل العلم ببطلان صلاة من ترك حلق عانته

https://binbaz.org.sa/fatwas/12857/


Connecting to SQL Server 2012 on IIS8 with PHP_SQLSRV

Question: This is a project, so doesn't require extreme levels of caution/security - I'd like to get it working and then improve it from there.
How can I get PHP to connect successfully to SQL Server 2012
What I have done successfully:

Enabled mixed authentication on SQL Server 2012
Established an account using SQL authentication
Set up FastCGI on IIS and configured PHP.ini
.PHP scripts in the web root execute successfully
I can use SSMS to connect locally to the SQL database using the credentials (SQL Authentication) I created

The problem:

I cannot use a PHP script to successfully connect to the local SQL database.

What I have considered, but do not understand well enough to diagnose:

That the HTTP connections to IIS are impersonating IUSR, which has permissions to read/execute PHP scripts in the web root, but may not have permission to connect to the server?
That for some reason my connection dialogue is simply ineffective

Here is my connect script:
<code>$serverName = 'localhost';
$connectionInfo = array( 'Database'=>'DATABASE',
                       'Encrypt'=>'1', 'UID'=>'user', 'PWD'=>'password' );

$connection = sqlsrv_connect($serverName, $connectionInfo);

if( $connection == false )
{
  echo "No connection was established.\n";
  die( print_r( sqlsrv_errors(), true));
}
</code>
Here are my errors (unfortunately PHP does not pretty print them):
<code>No connection was established. Array (
    [0] => Array (
        [SQLSTATE] => 08001
        [code] => -2146893019
        [message] => [Microsoft][SQL Server Native Client 11.0]SSL Provider: The certificate chain was issued by an authority that is not trusted.
    )
    [1] => Array (
        [SQLSTATE] => 08001
        [code] => -2146893019
        [message] => [Microsoft][SQL Server Native Client 11.0]Client unable to establish connection
    )
)
</code>
I also tried using process monitor to check w3wp.exe when I load the script through a browser - I don't know how I would paste the information from that, but there doesn't seem to be anything wrong with its output.
Comment: My server name and database name contain hyphens and are all caps, such as "ABC-DEFGHI"
Comment: Also it uses a self-signed certificate and only allows SSL connections for IIS (so, HTTP/SSL, so only HTTPS)
Comment: "the HTTP connections to IIS are impersonating IUSR" - if you're not using Windows Authentication that won't matter.
Answer: The error message is straight-forward: the SSL certificate you're using on your SQL Server is self-signed and so is not trusted by the consumer.
Possible solutions include:

Disable SSL/TLS on your SQL Server
Use a non-secured connection to your SQL Server
Add the self-signed certificate to the consumer's trusted certificate store
Get a trusted certificate from a public CA (Namecheap do them for less then $20)


How bright should a flash be?

Question: Is it common/wise to invest in multiple flashers for different situations or can you use one given it has enough intensity? Another way to read this is: can a flash be too bright?
Comment: Wow, sorry, but I think this question is way too broad. The way I read it, it's the start point for a rather large book on the topic of lighting... What are you trying to do? The amount, and nature, of lighting varies from scene to subject to purpose. There's no magic answer here.
Comment: Sorry, Rephrased the question in attempt to narrow it down to what I'm actually looking for. Only trying to understand if it is a good practice to look into multiple flash levels. Please feel free to edit anyone.
Answer: You can typically reduce a flash's intensity, either by lowering it's power setting (I have a couple that go to 1/64 their full power), or by adding "neutral density" gels to it. So you can almost always make a flash less bright if necessary.
But it's pretty much impossible to make a single flash brighter.
So, there's usually very little danger in having a flash that's too bright. Most times you'll have the opposite problem.
However, there's lots of other good reasons to have multiple flashes. @mattdm has already mentioned having multiple lights with multiple angles. And occasionally, when you need a lot of light, you'll want multiple bright flashes (usually mounted on some sort of bracket). This is most common when shooting outdoors in full daylight, and you still want to shape your light; you need enough flash to overpower the sun.
Comment: Augustin-Jean Fresnel may want to take issue with your second paragraph... Mind you, that is more about shaping and directing the light, but the perception is brighter. :)
Comment: LOL, I couldn't resist. :)
Comment: @John: I hereby invoke my "pretty much" exception :-P
Answer: For many typical situations, having one (mid- to high-end) flash provides plenty of light in terms of quality, but it's not necessarily where you want it. Take a look at questions here in the lighting-basics tag for some very nice explanations (including diagrams) of some basic portrait-lighting setups, many of which involve multiple light sources.
Another part of your question seems to be about flash power. Almost all modern hotshoe strobe flashes automatically (either through camera control or their own sensors) fire at reduced power when the full discharge isn't required for the exposure. Or, you can set power level manually (to various degrees depending on the exact flash model).
Answer: 1) Any flash could be too bright if it is too close to your subject, or your camera settings are bad enough for that amount of light. You can blow a photo with a candle light inclusive.
2) You never buy several flashes to have a lot of light! You buy several flashes to controll the light!
One single flash, no matter how powerfull it is will not solve the vast majority of situations... This include the sun itself! Half the day the sunlight is blocked by a big ball.

Is it common/wise to invest in multiple flashers for different situations.

A total yes.
Outdoors, indoors, small setups, big setups, enormus setups, low key, high key, one light portrait, 2 lights, 3 light portraits, cars, industrial buildings... a concert when everyone fires theyre smartphones... well, you do not own thoose flashes...

How bright should a flash be?


April cheating on Frank in Revolutionary Road

Question: On the night out to tell the Givings about their decision not to leave for France in Revolutionary Road, April has sex with Shep in the car. In the scene after that, Frank confesses about his infidelity to April but she remains quiet about her own infidelity. Was this because she genuinely did not love Frank anymore or she wanted to make him think she was perfect and increase the guilt he felt?
Answer: First, please notice that there is a difference between those infidelities: Frank has seduced a younger girl and had a passionate romance with her; he has done in consciously out of lust. April on the other hand just let herself be grouped by a friend for a few seconds, only because she wanted to be happy for a moment again, just like she was happy when she was dancing. The former was infidelity, the latter... desperation.
But the main thing is - she doesn't care about Frank's romance:
<code>                       RANK (CONT'D)
                I've been with a girl in the city a
                few times.

                         APRIL
                Why did you?

                          FRANK
                    (relieved)
                Baby, I don't know. I think it was
                a simple case of wanting to be a
                man again after all that abortion
                business. Some kind of neurotic,
                irrational need to prove something.

                         APRIL
                No. I don't mean why did you have
                the girl; I mean why did you tell
                me about it?

               He is suddenly unsure.

                          APRIL (CONT'D)
                I mean what's the point? Is it
                supposed to make me jealous, or
                something? Is it supposed to make
                me fall in love with you, or back
                into bed with you, or what? I mean
                what am I supposed to say?

      He tries that same patient smile, but it's not convincing.

                          FRANK
                Why don't you say what you feel?

                          APRIL
                I don't feel anything.
</code>
At this stage, their relationship is basically dead and April feels as such inside. She doesn't tell Frank about her 5 seconds sex with Shep because for her, it wouldn't change anything: Frank could feel angry and hurt or he could feel better and justified with his romance ("because it is ok if we both did it"), but that wouldn't change the numbness inside her.


asp.net - variable pass between ascx and page

Question: Have any ways to keep a variables (object) in a page scope? I need pass some object from master page to all ascx files. Normally, i passing by using a method or structure with parameters. But now im asking another way to do this. Store it in session is a bad idea because my object should exists in a page scope only.
Comment: If it's small, y not the query string?
Answer: One way is to set up properties in your user controls. You have access to read and set these from all pages that implement them.
Comment: If you define these properties in a base class or interface then they can form a contract between your user controls and master page.
Answer: You could expose your variables a public properties of the master page:
<code>public string MyVariable { get; set; }
</code>
then access them from the user controls by referencing the master page, and casting to its specific type:
<code>((MyMasterPageType)Page.Master).MyVariable
</code>
Answer: Another alternative is to store the shared object(s) in the HttpContext.Items collection.
Answer: So you have masterpage, user controls and the page itself.
The page is the container for the masterpage and the user controls, hence it's the only one that 'knows' the 2 parties. So I'll suggest (if you haven't) you have the page instance to facilitate the object/variable passing amongst them.
Answer: If your variable's value is going to be changed on per page basis then i would recommend you to write that code in base page (or user control) and inherit all the page (or usercontrol),if the values are going to be similar for all pages(or user control) you can use cache object as well.
In a more better approach if you feel you can even create one helper class and call it from your base page (or user control), so you can separate variable assignment code from your page.


How do i print the list of jobs per plugin in Jenkins

Question: I'm trying to list the jenkins jobs per plugin is being utilized. I see there's a plugin in jenkins, https://github.com/jenkinsci/plugin-usage-plugin, which displays the plugins usage in the Jenkins UI. But how do i get the same output from the groovy script?
Comment: i've a jenkins master and i'm trying list the jobs or builds that are being utilized by a particular plugin. Ex: how many jobs are configured/used by maven plugin
Comment: i was trying to test these scripts, support.cloudbees.com/hc/en-us/articles/216351528. In a similar way i want to list all the jobs configured with a particular plugin.
Answer: They quick and dirty answer is to "Display jobs group by the build steps they use" as updated below.
import hudson.model.*
import hudson.tasks.*

//All the projects on which we can apply the getBuilders method
def allProjects = Jenkins.instance.allItems.findAll{ it instanceof Project }

//All the registered build steps in the current Jenkins Instance
def allSteps = Builder.all()

//Group the projects by the build steps used
def projectsGroupBySteps = allSteps.inject([:]){
   map, step ->
   map[step.clazz.name] = allProjects.findAll{it.builders.any{
        it.class.name.contains(step.clazz.name)}}.collect{it.fullName}
   map
}

//Presentation
projectsGroupBySteps.sort().each{
    println "--- ($it.value.size) $it.key ---"
}
println ''

println 'Occcurences:'
projectsGroupBySteps.sort().each{
println "--- ($it.value.size) $it.key ---"
    it.value.each {
        println it }
    println ''
}
return

Note that a job has multiple sections: builders, publishers and buildWrappers.
Depending on what you are looking for, replace
[allSteps = Builder.all(), allProjects.findAll{it.builders.any ]
[allSteps = Publisher.all(), allProjects.findAll{it.publishers.any ]
[allSteps = BuildWrapper.all(), allProjects.findAll{it.buildWrappers.any ]

Plugins may also be involved in the SCM section and as properties (eg: hudson.plugins.buildblocker.BuildBlockerProperty, com.sonyericsson.jenkins.plugins.bfa.model.ScannerJobProperty)
Obviously, same limitations of plugin-usage apply: does not scan pipeline steps plugin usage or build steps nested within an org.jenkinsci.plugins.conditionalbuildstep


Commercial app with optional GPL software usage

Question: Say one develops a closed source app that can produce a file of its own format like .ll .Then one asks the user to run a GPL licenced batch script that uses ffmpeg(GPL) to do the final bit. Note that ffmpeg or the batch script is not distributed with the software but install instructions are there in the software. Will the software have to be GPL?
Comment: Does this answer your question? [Can I use/distribute LGPL command line software in mine that isn't LGPL?](https://opensource.stackexchange.com/questions/4008/can-i-use-distribute-lgpl-command-line-software-in-mine-that-isnt-lgpl)
Comment: No as the program itself is not calling exec nor am I distributing it. Let me tell you the process again.Say my app produces an output.ll file. The user optionally downloads the batch file and ffmpeg separately the runs the bat file to get ffmpegoutput.mp4
Comment: Should that app be LGPL or GPL?
Answer:
Will the software have to be GPL?

That depends on how closely your software depends on the post-processing by ffmpeg in particular.
If ffmpeg is just one of potentially many (independently developed) programs that can read and process the files your app creates, then your app is a separate and independent work from ffmpeg as far as copyright is concerned and that means both works can be licensed completely independently.
If your app uses intimate knowledge of how ffmpeg works and uses this file format to communicate complex, ffmpeg-specific data structures, then most likely your app will be considered a derived work of ffmpeg and needs to be under the GPL itself as well.
The question as to who invokes ffmpeg (the app itself or the user of the app) I find less relevant. Just the fact that it is two executables is relevant for the determination if the GPL applies.
Comment: @compenthusiast, that is two independent programs then. One that creates animated GIFs (which can be used in their own right) and a second one that can convert an animated GIF into an MP4. That matches the first case I outlined.
Comment: I think it would be more likely that instead of filing a lawsuit, they'd ask you to either comply with the GPL or else stop distributing their software (i.e. completely remove it from your code). I don't know if you could actually be *forced* to open source your code, so i guess we would need a lawyer to answer that one.
Comment: Basically if it is an app that can make gifs and due to some reason making mp4 is not possible so the user is instructed to make mp4 using ffmpeg using a batch file.
Comment: I know it should be understood but many people fear one mistake and GPL will release their source.
Comment: @compenthusiast IANAL, but when you read the GPL, the main consequence of violating it seems to be that you lose all rights given to you by that license. That in itself doesn't necessarily mean you'll be forced to release the source. What it *does* mean however, is that you're no longer allowed to copy, modify or distribute the covered work. In addition to that, the original author could potentially sue you for copyright infringement.
Comment: What I meant was that lets say I use some GPL software in my code without noticing.The liscensor can sue me and most likely I might be ordered to apply GPL to my code thereby revealing the source to anyone who recieves it.


Selenium set value to input field that is not visible

Question: I am trying to set value to an input field via selenium-python but the problem is that it's not visible. So it throws "Element not interactable" error.
This is because the input field is part of an "li", that has a role of "tab" and at any point only one "li" can be active (tabindex=0), while the remaining are not visible (tabindex=-1).
I am writing an automation script that requires setting the input values in one "tab", and then doing something on the other "tab", but when switching to the other tab, that tab stays active and on the second run the previous tab is no longer active, hence I can't set the value anymore.
I tried deleting all cookies and local and session storage but the change in tab visibility is persistent. Is there any way of doing what I want to do?
Thanks in advance.
Answer: I suggest adding an additional step to your scenario:
Activate the tab for the particular input before setting the value.
From your description, you just have to click on the tab.
So your script might look like this:
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By

def fill_input_filed_a(a_value):
    driver.find_element(tab_for_input_a).click()
    input = WebDriverWait(driver, 10).until(EC.visibility_of_element_located(input_filed_a))
    input.clear()
    input.send_keys(a_value)

def fill_input_filed_b(b_value):
    driver.find_element(tab_for_input_b).click()
    input = WebDriverWait(driver, 10).until(EC.visibility_of_element_located(input_filed_b))
    input.clear()
    input.send_keys(b_value)

# then invoke methods in test
fill_input_filed_a('value1')
fill_input_filed_b('value2')

If you still want to work with hidden field, try
Set value to input field that is not visible
It's possible with JS, but this might not work, since some events might not
be fired when you just set the value with java-script.
input_field = driver.find_element(hidden_input_filed)
driver.execute_script("arguments[0].value='"+value+"'", input_field)


Why there is no tag cloud to choose tags from?

Question: I feel like hunt and peck on the Stack Exchange network when choosing the tags for a question. How one should know which tags exist when there is no list or cloud of tags to choose from?
Comment: Cloud of ~35,000 tags is a Nebula not a cloud. It's totally useless.
Comment: By tag cloud, do you mean that it would have more popular tags larger? Why would that help- almost all the top 50 tags are languages. Would you ever say "Well, I was going to tag my question [tag:perl], but now that I see the [tag:PHP] tag is bigger...
Comment: I understand your frustration but there are a [vast number of tags](http://stackoverflow.com/tags). Some kind of filtering would be needed. Currently you do that by starting to type keywords in the tags field.
Comment: We currently have 992 pages of tags....that would be one hell of a cloud. I'm not sure it would do much good.
Comment: I mean, by default you can narrow down by language or framework when applicable, and if it's a more abstract question, then the tag should be obvious. If your tagging was *that* terrible, it will probably be modified anyway
Comment: Maybe I don't know what a "tag cloud" is. Can someone enlighten me? There's already automatic suggestions given for tags... I don't know why this isn't good enough for you. Yes, you have to start by narrowing it down *somehow*, but that's not hard. You know what your question is generally about.
Comment: Isn't that the point of tag clouds, though - to narrow down a vast number of things into something useful?  Text analytics could certainly be used to compare the keywords used in the post (plus any other tags chosen) and give all 35k tags a weight, then display the top 100 or 200 by weight (and sized by weight).
Comment: @CodyGray A "tag cloud" is one of the ways of displaying tags where you list the potentially relevant tags with different font sizes based on the relevant weight associated with that tag (weight determined by context - on a wordpress blog, it might be number of posts containing that word, here it would be the number of posts that have similar keywords to the current post or something like that).
Comment: Weighting schemes are far more complicated than 'more popular'.
Comment: Suggesting tags based on the content of the post may be useful at times though, that's not a bad idea.
Comment: @codingkiwi Happens already on Meta, and some other sites (like Ask Different). Hasn't yet come to Stack Overflow. Not sure if it will. There are a number of feature requests about that already; seek and ye shall find. It's hard to get right, though. I'm of the opinion that it's nifty but a gimmick. The person writing the question knows what it's about—they're the best person to pick the tags.
Comment: I wanted to add the following as a legitimate addition to the question but it was rejected. So I add it as a comment: _I would not need a tag cloud if I were able to set my own tags (with any rep power, at any site on the SE network just like on other sites)._
Comment: This question already has an answer here: _Could S[OUF] get a tag cloud similar to the one on The Climate Deal StackExchange?_

Sorry, but the above title sounds Chinese to me. I couldn't have figured it out myself it is the same question. Is there a way to remove the minus 8 rep. power this question gave me?
Answer: Piotr Migdal has created a nifty piece of software that creates "tag maps" for Stack Exchange sites.
The original was created for Cross Validated, and they also been created for other sites, including Biology and Chemistry.
Presumably as a stress test, he has also created one for Stack Overflow—but only including the top 256 tags (only ~0.6% of the total!). It's still rather insane:

Yes, it's very cool to look at. It's also interesting for the study of trends. However, I don't think it's particularly useful as a way of selecting tags. At least not until the Stack Exchange folks start rewarding everyone who hits the rep cap with a 30" monitor.
Comment: I can stare at this all day
Comment: Wow... so beautiful. Well, except for that little "facebook" thing toward the bottom-left. /cc @OldCheckmark
Answer: Firstly, there are far too many tags in Stack Overflow for a tag cloud to be anywhere near usable.
Secondly, tag clouds are not actually used much in the real world anyway. They're a fad that has more or less died out (thankfully).
As Jakob Nielsen wrote back in 2009 about Tag Clouds

...usability studies show that most normal users don't know what they are and don't know how to deal with them.

and

Just because something looks cool, and just because it's a current fad in Web design, don't mean that it's necessarily best for usability

Finally, there is the AutoComplete tag entry system when adding questions, which does work pretty well for finding tags. Much better than an oldfashioned Tag Cloud.
Comment: Oh goodness. I asked in a comment on the question what a "tag cloud" was, I didn't realize it was such a well-known concept addressed by the Nielsen gurus. Amazing, somehow I've been on the Internet for two decades and seen this maybe once. You actually were supposed to *click the tag you want* from that? What about if you wanted one of the teeny tiny ones?
Comment: @CodyGray: Well, the example there is more of a word cloud than a tag-cloud. Slightly useful as a way of representing data, but not for interacting with. Tag clouds were similar but were a bit more intuitive that you can click on various tags. Popular on blogs when there are only a few dozen tags used, but not for sites with a bazillion tags.
Comment: @CodyGray For tiny ons you need subpixel mouse cursor ;)


What is the rule for adding -es/s/n to masculine or neuter nouns in the genitive?

Question: Kannst du mir die Adresse des Jungen geben?
Why is it des Jungen, and not des Junges, if it's in the genitive?
Comment: Different case (dative vs. genitive), but the same answers apply: https://german.stackexchange.com/questions/70344/why-does-the-dative-case-of-kunde-have-an-n/70347.
Answer: The short answer is that there is no rule; if you don't know you have to look it up in a dictionary. It's not completely random though since you can divide nouns up into declension classes. Each class has a pattern and there are a limited number of classes. There are global patterns as well, and if you know them you can determine the declension for all eight combinations of number and case from three of them plus the gender, which is all many dictionaries list. For example DWDS gives the nominative singular, genitive singular, and nominative plural. (See for example the DWDS entry for Junge.) The genitive singular is included because it can't be determined from general rules.
For certain nouns formed from adjectives, the noun declension follows the adjective declension, which is different and more complex, but fortunately very regular.
Answer: It's called weak noun declination or n-declination and you have to learn for each masculine noun whether it has strong or weak declination. And for the latter also which flavour. You can deduce that from the genitive singular.
So you have to drill nominative singular, genitive singular, nominative plural. I emphasized those forms:

der Zug, des Zug(e)s, dem Zug(e), den Zug, die Züge, der Züge, den Zügen, die Züge — strong declination

der Junge, des Jungen, dem Jungen, den Jungen, die Jungen, der Jungen, den Jungen, die Jungen — weak declination -n flavour

der Gedanke, des Gedankens, dem Gedanken, den Gedanken, die Gedanken, der Gedanken, den Gedanken, die Gedanken — weak declination -ns, -n flavour

Masculine nouns that end in -e are usually weak declined. But there are more endings for that, and also exceptions. Oh, and the neuter noun das Herz is also weak, at least if it's about the poetic heart. So learn the genitive singular with any masculine noun.

In addition to that, there are also nouns which follow the adjective declination, which is very similar to the weak declination. Those come in all three genders, as adjectives always do.

der Gute, des Guten, dem Guten, den Guten, die Guten, der Guten, den Guten, die Guten

die Gute, der Guten, der Guten, die Gute, die Guten, der Guten, den Guten, die Guten

das Gute, des Guten, dem Guten, das Gute, die Guten, der Guten, den Guten, die Guten

For those you have to remember that accusative singular is the same as nominative singular for feminine and neuter nouns. Oh, and the regular article ending pattern of course. As always.


Should we excuse foul language in gaming questions if it's relevant in context?

Question: In this question's fifth revision, the title contains some objectionable language because of the name of a relevant achievement. Up to date, I've been removing profanity from posts because I want to maintain a family-friendly environment on the site for gamers of all ages, and I know that some terms can be quite offensive to different people. Should I not do this if the profanity is relevant to the question?
Comment: I *barely* think that the profanity in that case example is relevant - it's relevant to the achievement, but the question isn't about that achievement, no matter how much it is about not getting it. So, even though the profanity exists in the achievement name, that doesn't really excuse its need for the question title.
Comment: @Grace I agree but I feel like this needs to be raised anyways in case it comes up again in the future.
Comment: I've got my general stance coming up, as well, as an answer.
Comment: @Grace *barely* is being generous.  The achievement is evidence in a side comment about how sadistic the developers are.
Comment: @tzenes The achievement name used to be the question title. It wasn't originally part of that side comment (which I think was more focused on the whole Floating Islands aspect, anyway). Which, honestly, is even less relevant of a position anyway.
Comment: @tzenes I first earned that achievement at that specific point of the game for falling off the floating island. I'd argue it is somewhat relevant, but it certainly is not necessary for the question (as I noted in my answer here) and could be removed without harm.
Answer: My general thought pattern is that if the question is about something that simply has foul language (rather than the actual obscene material which it may refer to), it can be excuseable. If you are asking about how to earn an achievement, or if for some inexplicable reason the game writers decided that a particularly important item just has to include it, it may become necessary to at least use the word in some fashion. Otherwise, it's exceptionally awkward and people might not be able to find the right information. The ideal scenario, though, would be that it is not in the question title.
I'll point to this question, which humorously you touched on but didn't have to deal with profanity itself. The title manages to go without stating the name, preferring to go about an acronym fashion. Now, I'm not going to comment on the censoring itself, but I'll note that even a certain programming language has been censored on Stack Overflow, so there's a bit of precedent to leave it like that. Actually, there's been a lot of separate incidents.
Question title has immediate visibility on the front page, and it has visibility to all people regardless of their curiosity. Question body only has visibility to people who are investigating that question. We can't hope to keep the entire site family-friendly, but I think it is very helpful that unless it is truly unavoidable, that we at least keep the front page clean. No, it won't stop people from clicking the title if they are young. But at least we won't be feeding it into their face.
Comment: @Fabian German, right. In this scenario, even though it's not being used on a literal person, Gravity is being personified in that instance so that it is used as an insult in the same fashion. The illustration is the same even though it is just a force of nature. I don't fault you, in the end - it's literally how the quote goes. But as it stands, the word is typically considered a fairly strong, explicit, and offensive insult.
Comment: I do see one problem with the very different views people have on what is offensive. When I asked the questions it didn't even occur to me that the title might be offensive, and I still would not really consider it offensive. Which standard of offensiveness are we going to use? I'm not insisting on profanity on the front page, but I'm wondering where we are going to draw the line?
Comment: @Fabian Well, you did happen to pick a scenario with the one word I personally despise the most, but even I can accept it when it is relevant to context. Which, as I've mentioned, I don't actually think it is anyway, but that's going on a tangent. I imagine that the best policy for now is to *play it safe*. I haven't kept on top of foul language development for the past 20 years (why would I?), but I imagine that the typical cluster of Fs, Ds, Ss, and both Bs make a good start for what to avoid.
Comment: I acknowledged that it is not necessary in my answer, and I won't mind if it is removed according to site policy. My personal offensiveness scale depends a lot on the context, I don't mind profanity against abstract entities like gravity, I would be much more strict with profanity against specific individuals or groups. As a non-native speaker I'm in the end reacting to the translated versions of the profanities, my perception is probably very different from that of a native speaker in the US.
Answer: As I've said in meta, I do not find it offensive, to the level that I wouldn't care if my (hypothetical) children would view it. I don't like foul language when it's just used for ranting or when directed at a specific person, product or organization - but in cases where it's appropriate I have no issue with it and I think it should remain.
In the specific case of having the accurate name of the achievement in the title / body of the question, this clearly helps the visibility of that question to relevant search engine queries (okay maybe not for this specific question, but in the general case of replicating the name of something).
Answer: The profanity is certainly not necessary to this question, it could be removed without harming the content. But the important point is not this specific question, but the policy in general.
I don't think we should generally remove profanity from this site, a gaming site is not appropriate for all ages anyway. To ensure family-friendly content we would have to ban questions on 18+ games, and I don't think we want to do that. We can't really ensure a totally kid-friendly environment here, any parents who let their kids visit this site have to make a judgement whether it is appropriate.
I'm fine with removing excessive profanity, but I don't think we should aim for zero profanity. And as Oak already mentioned, I also don't find this specific instance offensive (but I wrote it, I'm not necessarily objective here).
Answer: I'll make a movie analogy: the more inclusive a movie's ratings, the more people see it, and the more money the movie makes.
To appeal to, draw and retain the most uses, I believe Gaming should target the broadest audience possible. Thus. I would like to see a zero-tolerance policy for profanity. While there maybe appropriate edge cases, having zero-tolerance means you don't have to debate whether something is appropriate or not: it isn't, and can be edited accordingly.
Comment: You don't spend much time on [The Bridge](http://chat.stackexchange.com/rooms/35/the-bridge) do you?


What is the optimal schedule for running DeleteExpiredSessions?

Question: What is the optimal time between running DeleteExpiredSessions. I've just inherited a database for a 3M monthly unique session web app and the DeleteExpiredSessions runs every minute. This seems like massive over kill to me. Opinions?
Answer: There is an improved version of the DeleteExpiredSessions sproc published here: http://support.microsoft.com/kb/973849
I believe the intention of the rewrite was to reduce contention by eliminating the possibility of causing full page locks when deleting sessions as frequently as every minute.
In .NET 4.0, this is the version of the sproc that is created when you make a new ASPState database.
Answer: We just ran into the same issue.  We bumped it to 5 minutes just to ensure the database stayed small with the amount of data we had in session.
We are looking to make it once or twice a day if no negative performance impact.  Will keep you posted.


logic: order of quantifier with free variables

Question: Take the sentence, "You can't win them all."
This could be logically written as
"For all people, there exists a thing they cannot win at."
$\forall x.\exists y.(\neg win(x,y))$

Now suppose I was lazy and left the x unbound, as in:
$\exists y.(\neg win(x,y))$

Is this equivalent to the previous sentence, or is it interpreted as the different sentence:
$\exists y.\forall x.(\neg win(x,y))$

which would mean, "there exists a thing that all people cannot win at?"

In other words, when there are unbound variables, in what order do you put the quantifiers?
Comment: When there are free variables, they're never implicitly quantified *inside* existing quantifiers. The formula, with free variables, is implicitly universally quantified. If you were lazy and omitted $\forall x$, people reading the formula $F(x) := \exists y \neg win(x,y)$ would either not know what it means or would think it means $\forall x F(x)$.
Comment: The interpretation of free variables depends on your logic.  Usually, it is the same as universally quantifying over every formula containing the free variable (or equivalently, universally quantifying over every formula in discourse).  So $\exists y ~ P(x, y)$ is only the same (in some logics) as $\forall x ~\exists y~ P(x, y)$ if there are no other formulas anywhere containing $x$.
Comment: If a variable is unbound, you don't have any quantifier to attribute to the variable, by definition of *unbound*. The formula $\exists y(\neg \text{win}(x,y))$ is not a statement, A statement, by definition, can't have unbound variables.
Comment: @GitGud: By definition, yes a sentence (in first-order logic) cannot have free variables. But most mathematicians don't write sentences. When people write "$(A+B)^2 = A^2 + 2AB + B^2$" there is an implicit quantification, even though I disapprove of leaving out the quantifier, for the reason that it is always restricted. What if $A,B$ are matrices?
Answer: To expand on DanielV's comment, consider that:

It is true that $\neg win(x,death) \vdash \exists y\ ( \neg win(x,y) )$.
It is false that $\neg win(x,death) \vdash \forall x\ \exists y\ ( \neg win(x,y) )$.
If $T \vdash \exists y\ ( \neg win(x,y) )$ and $x$ is not free in any formula in $T$, then $T \vdash \forall x\ \exists y\ ( \neg win(x,y) )$.

Also note that your example is not translated correctly. Unless every thing is a person, you ought to write:

$\forall x \in people\ ( \exists y \in things\ ( \neg winat(x,y) ) )$.
Comment: This answer uses the convention of implicit universal quantification, which is the standard convention in most presentations of first-order logic that permit derivation of formulae with free variables. Other formalizations might not.
Comment: Thanks for the suggestion. I see why the set notation improves it. So is it assumed that all variables in a logical statement (not necessarily a sentence) must represent the same kind of thing?
Comment: @jimboweb: Unrestricted quantifiers **always** range over all objects in the universe. That's rarely what we want, and so either you use restricted quantifiers as I have done or you use additional predicates. The reason I don't use predicates is that natural language reasoning is often better represented by using restricted quantifiers. We say "Everyone here knows what happened." and certainly not "For every thing, if it is a person here then he/she knows what happened.".
Answer: If $\varphi[x]$ is the formula $\exists y(\neg W(x,y))$, introducing a quantifier to bind the free variables of the formula would produce $\forall x\varphi$, which is just $\forall x\exists y(\neg W(x,y))$.
Answer:
Take the sentence, "You can't win them all." This could be logically written as
"For all people, there exists a thing they cannot win at."
$\forall x.\exists y.(\neg win(x,y))$

Better would be:
$$\forall x: [Person(x) \implies \exists y:[Game (y)\land \neg Win(x,y)]]$$
where $Person(x)$ means $x$ is a person, and $Game(y)$ means $y$ is a game.

Now suppose I was lazy and left the x unbound, as in:
$\exists y.(\neg win(x,y))$

This would probably be interpreted as talking about a single person: There exists a game which person $x$ does not win.
Note that
$$\exists y:[Game (y)\land \forall x:[Person(x) \implies\neg Win(x,y)]]$$
suggests that there exists at least one game which everyone loses.
Comment: Thanks for the suggestion. I was under the impression that the general convention holds that later letters in the alphabet (u, v, w...) represent variables, while earlier letters or numbers represent constants.
Comment: "This would probably be interpreted as talking about a single person."  I have seen many sources where a free variable is implicitly existentially quantified.  I think our conceptualization of things like numbers leads to that.  But I would suggest that $P(x) \implies Q(x)$ is better interpreted as "Every $x$ with property $P$ has property $Q$" rather than as "there is an $x$ such that...".


How does Desmond relive Altair and/or Ezio's memories?

Question: I've heard people say that Desmond was not related to Altair and/or Ezio and that Ezio is not related to Altair. If that's true, then how did he access their memories? I thought that he could only connect with his ancestors' memories. Am I wrong, or just confused?
Answer: The story states that the memories are stored in the DNA; thus he must be related to them both in order to have have their DNA within him.
Coincidentally, 1up just ran a feature on the worst of video game science and because of the storing of memories in DNA they mentioned that there is about 1.5GB of information contained within our DNA (both in useful genes and in the filler space).
The article doesn't mention that since half of your DNA comes from your mother and half from your father you'd wind up with some seriously disjointed memories.
Comment: Is it possible then that he was not directly related to either or both of them but a distant relative of some sort, and that's what the people in question meant by stating that they were not related?
Comment: Desmond would have to be directly related to both Ezio and Altair to get fragments of their DNA (that is by tracing through mothers and fathers you wind up at both Ezio and Altair). As @leety pointed out though, Ezio and Altair aren't blood relatives, that is that on the path to Altair you don't go through Ezio.  For example, one possibility is that Desmond's father has Altair in his lineage while Desmond's mother has Ezio in her lineage.
Comment: Ah. Ok, thanks. I found what people were saying very confusing at first. Thank you for the clarification.
Answer: Inside this interview with the developers, they tell us how Desmond is related to all of them in some shape or form.
Assassin's Creed: Revelations Desmond's Ancestry Explained
Here is one of the illustrations they used inside the video describing how Ezio is not a descendant of Altair. Basically, they want Desmond to access all of his ancestors memories, and not let Altair or Ezio be able to access others memories.


Could a vaccine injecting B cells theoretically work?

Question: So I was in the car riding to school today when I was struck with genius. Each B cell is attuned to a different pathogen, am I correct? By that logic, would a vaccine injecting a dose of B cells attuned to the pathogen you're trying to protect against work?
Answer: Yes, take the cells out, purify, multiply them with the right stimulus and reinject.
You have been struck with genius, but I think some other people with the same idea got prizes already. Good to see you thinking, dont stop!
A review of just one application of this is here.
"Cancer Immunotherapy"
by
Wennhold K.a · Shimabukuro-Vornhagen A.b · von Bergwelt-Baildon M.
https://www.karger.com/Article/Fulltext/496166
permanent ref is http://doi.org/10.1159/000496166


SetWindowsHookEx WH_MOUSE freeze on breakpoint in Win7

Question: helos,
on WinXP my application has been sucessfully using a global mousehook to retrieve mouseposition and clicks even if it does not have the focus. the hook is in a separate .dll and is being initialized like this (in delphi):
SetWindowsHookEx(WH_MOUSE, @MouseHookCB, HInstance , 0);

now on Win7 this basically also works during runtime but i can no longer debug my application nicely (which i can under XP). as soon as i hit a breakpoint, Win7 freezes completely. i cannot switch to another process (even taskmanager fails to open). if i am lucky i can stop my process in the IDE. most of the times though i have to restart/logoff to regain access.
i know the problem is related to the mouse-hook as it is not present if i don't use the hook.
this is even if my hookprocedure does nothing but the following:
CallNextHookEx(MouseHook, Code, wParam, lParam);

ie. simply the presence of the hook causes the troubles.
having the globalhooks.dll write something into the EventLog i see that it is still active even while i am on a breakpoint.
i tried to use a lowlevelmouse hook via WH_MOUSE_LL which basically works but gives me strange mouse-move delays while installing the hook and sometimes while resizing a window. also there is a freeze for some seconds when hitting a breakpoint but at least the system recovers after ~5 seconds... therefore this option is even worse as it also affects runtime.
any idea why the WH_MOUSE hook freezes my app during debugging in the first place?
Answer: if you're debugging an APP you shouldn't use HInstance.
You're injecting the .exe itself into the global process, when debugging you are halting all mouse processing which could explain your issue.
SetWindowsHookEx documentation states to pass 0 when hoocking into own process and handle to a DLL when hoocking into a remote or global process.
Also make sure MouseHookCB() is resturning the value of CallNextHookEx.


Hibernate - How to make associations eager (globally)?

Question: Is there some easy way to fetch all associations of a big object graph without having to 'left join fetch' all of them? Can't I just tell Hibernate to fetch associations eager by default?
Answer: Even if it is possible to have a global lazy=false (google is not showing it, but it might be possible) you really don't want to do this.  Do you really want to load the entire db, or a significant object graph, for every request?  Keep in mind, the way hibernate works, it needs to instantiate every object in the graph.  Its going to be slow and memory intensive, and will probably crash your app as your data grows.
If you must load a large set of data, use a custom hql query, and pull the fields you need out of the tables.  Avoid the object instantiation.  Also, you could let the db do a lot of the heavy lifting by using a view; i.e. let the db continously update a virtual table dynamically, so you only need to select a single table from the web-apps perspective.
Another option is to rework your interactions so you don't have to do this in the first place.
Comment: sometimes you do not want lazy loading (e.g. in i multi server setting).
Comment: @deadsven: We solved all these problems by using DTO's. There is some initial effort, but at the end it is much more convenient then trying to serialize server object graphs.
Answer: You can put it into the hibernate-mapping tag:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" default-lazy="false">

But you won't get happy with it.
By the way: eager loading and join fetch are different concepts! Both aren't silver bullets to avoid any kind of problem.

Generally using eager loading may case a heavy N+1 problem
Generally using join fetch may cause heavy multiplication of results.

Use both where it is appropriate - and avoid both if in doubt.

See these related blog posts by Ayende Rahien:

NHibernate is lazy, just live with it
The Stripper Pattern
Comment: setting lazy=false loads the graph eagerly. But it still requires the same amount of queries as when using lazy loading and accessing every object in the graph.
Comment: Does it fetch the whole object graph eagerly? I know this is a bad approach but I have a case where I really need it.
Answer: I am not aware of a global switch either. Controlling fetching with annotations works, though.
@Proxy(lazy = false)
public class SomeBean {
...
    @ManyToOne(fetch = FetchType.EAGER)
    private OtherBean otherbean;
...
}

Answer: In HQL you need to specify you want to eagerly fetch an association.
Regardless, as @hvgotcodes stated above, trying to eagerly fetch everything quickly leads to performance issues. You will most likely find yourself fetching large portions of the DB when trying to do so.
I suggest you read the Fetching Strategies in the hibernate manual to get the hairy details.


Is kinetic energy relative or absolute?

Question: I only can think of kinetic energy as absolute. I know velocity is relative but I can't see kinetic energy as being relative because that would violate energy conservation. For example, if in some reference frame, the loss of kinetic energy is $60\mathrm{\ J}$, how can, in another reference frame, the loss be different? If kinetic energy is relative then its effects should also be relative. If $60\mathrm{\ J}$ produces an $X$ temperature and a $Y$ wave sound, how can this temperature and sound be different just because of changing the reference frame? It should be the same. Also, I thought that if the classical kinetic energy equation is true then the Galilean relativity is wrong because the more speed or velocity, the more loss of kinetic energy will there be in a collision, so what is true and what is wrong? Are the effects of kinetic energy equal no matter what reference frame is it? Is the kinetic energy equation wrong or is the Galilean relativity wrong?
Comment: Does this answer your question? [Missing energy in moving reference frame](https://physics.stackexchange.com/q/289244/)
Comment: Another example: [Kinetic Energy in different reference frames](https://physics.stackexchange.com/q/359967/114300).
Comment: 'how can this (...) sound be different just because of changing the reference frame?' - wait until you hear about the Doppler effect
Comment: Possible duplicates: https://physics.stackexchange.com/q/51220/2451 and links therein.
Answer:
Is the kinetic energy equation wrong or is the Galilean relativity wrong?

Neither is wrong, only the assumption that they are in any way incompatible is wrong. Kinetic energy is frame variant, but energy is conserved within each frame. Similarly with momentum. It is also different in different reference frames, but still conserved. Frame invariance and conservation are separate concepts.
Edit: to fully work out the example you proposed consider an inelastic collision with coefficient of restitution of 0, between a ball of mass $m_a=0.4 \mathrm{\ kg}$ and room of mass $m_b= 1000 \mathrm{\ kg}$ from a reference frame where the ball is initially moving at $u_a=20 \mathrm{\ m/s}$ and the room is initially at rest $u_b=0 \mathrm{\ m/s}$. In this frame after the collision $v_a=v_b=0.008 \mathrm{\ m/s}$ for a $\Delta KE_a= -80 \mathrm{\ J}$ and a $\Delta KE_b=0.032 \mathrm{\ J}$ for a total $\Delta KE = 79.968 \mathrm{\ J}$ of KE converted into thermal energy.
Now, consider the situation in the reference frame where the ball is initially moving at $u_a=40 \mathrm{\ m/s}$ and the room is initially moving at $u_b=20 \mathrm{\ m/s}$. In this frame after the collision $v_a=v_b=20.008 \mathrm{\ m/s}$ for a $\Delta KE_a=-239.936 \mathrm{\ J}$ and a $\Delta KE_b = 159.968 \mathrm{\ J}$ for a total $\Delta KE=79.968 \mathrm{\ J}$ of KE converted into thermal energy.
In both frames energy is conserved. The change in KE of each object depends on the reference frame, but the amount of energy converted into heat does not. I leave it as an exercise to show that the momentum is also frame dependent but conserved in both frames.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/133733/discussion-on-answer-by-dale-is-kinetic-energy-relative-or-absolute).
Answer:
For example, if in some reference frame, the loss of kinetic energy is 60j, How can in another reference frame the loss be different?

It can't.  So in any inertial frame the difference between the initial and final states will be the same.
Similar to saying that if you drop a mass 1m, it doesn't matter if you consider it dropping from a height of 1m above the table to the table top, or if you consider it dropping from a height of 1.5m above the floor to the table top 0.5m above the floor.  The difference is conserved even when the zero reference changes.
The same is true for KE.  Each frame may have a separate reference for the amount of energy, but the difference between two events should be consistent.

Also i thought that if the classical kinetic energy equation is true then the Galileo relativity is wrong because the more speed or velocity, the more loss of kinetic energy will be in a collision

Collisions don't take you to zero in all reference frames.   We have an incredible amount of KE if you measure our speed in the frame where the sun is at rest.  But if you get in a car crash, the KE relative to the sun doesn't go to zero and isn't released to do mayhem.
Comment: "It can't. So in any inertial frame the difference between the initial and final states will be the same." -- this is not true. Let's say the difference b/w initial and final kinetic energy is $\sim(v_f^2-v_i^2)$ in a given frame. The difference b/w the initial and final kinetic energy in a frame moving at a velocity $v$ would be $\sim((v_f-v)^2-(v_i-v)^2)=v_f^2-v_i^2-2v(v_f-v_i)$.
Comment: Also, the analogy drawn to gravitational potential energy is wrong for obvious reasons. The gravitational potential energy near the surface of the earth is linear in height, the kinetic energy is quadratic in speed.
Comment: I'm still confused because according to the K equation the loss in a collision on earth using the sun reference frame, will be considering earth velocity + objects velocity, this will give us a bigger loss than if we use earth reference frame, so which reference frame is correct? or is the K equation wrong?
Answer: There is a fundamental point in the interpretation of the concept of energy: even the kinetic energy (KE) exists in relation to other kinds of energy, whose exchange is realized through work. In this way, the existence of an absolute quantity, the KE does not make sense. On the other hand, differences that come from energy transformations (no matter what kind) are such that they conserve the overall energy (momentum) of the system.
Look for instance to the potential energy, in its most simple form: U = mgh. It is settled with the exception of a constant of height. This can be thought to be similar to the kinetic energy.
In both cases, for the transformations through work, the important concept is the difference from the initial/final KE (or potential) in a given process, not how each observer/experimenter would measure that energy.
Comment: -1: This answer is a word salad with no explanatory content. How does this actually address the specific question that OP asked? Also, many statements here are either misleading or wrong. For example, the arbitrariness of the datum of potential energy has nothing in similarity with kinetic energy, we don't fix the zero of kinetic energy arbitrarily -- it is zero when the speed is zero.
Comment: "It is zero when the speed is zero". This is the key to understand your conceptual mistake: there is no absolute velocity, as there is no absolute zero point for hight.
Comment: I didn't say that there is an absolute velocity. Obviously, the velocity would be dependent upon the frame of reference. The point is that in a given frame of reference, the kinetic energy cannot be shifted by an arbitrary constant, whereas potential energy can.
Comment: In both cases, if you change the frame of reference, you can change the energy definition, and this is as simple as that, despite you most problem didn't understand it (or accepted). The ke attributed depends on the frame of reference...
Comment: "The [KE] attributed depend on the frame of reference" -- Yes, obviously. This is not what I am contradicting. "In both cases, if you change the frame of reference, you can change the energy definition" -- Yes, but there is an inherent ambiguity in the definition of potential energy even within a given frame of reference. This is the distinction between kinetic energy and potential energy that I am referring to.
Comment: I didn't get your point. Inherent ambiguity means that you can define "U" except for a constant value, if this is not useful to do physics as f. e. dynamics, so can you do for ke.  All in all I can't see your point.
Comment: " This can be thought to be similar to the kinetic energy." Sorry can you clarify this?
Answer: KE is frame dependent, as is momentum. If you stand on a street corner, your KE and momentum are each zero in your rest frame, but if I pass you in a car you have both energy and momentum in my frame.
The conservation laws apply to total energy and total momentum- how the overall energy and momentum is distributed between bodies is frame dependent.
If you play with a few examples of colliding objects or weights sliding down ramps and so on, you will find that Newton's laws apply in a consistent way regardless of which (inertial) frame of reference you adopt, although the KE and momentum of the individual objects involved will vary by frame.
There are many interesting examples that seem paradoxical at first until you figure them out. For example, consider the text-book case of a stationary block that then slides down a smooth ramp. You can calculate its speed at the bottom of the ramp by equating the PE lost with the KE gained. However, if you consider the experiment from the frame of someone walking past it with just the speed that the block attains in the frame of the ramp, the block will be moving at the top of the ramp and will end up stationary at the bottom, so the loss of PE seems to be accompanied by a loss of KE. Try to figure that one out (a hint- consider the recoil of the ramp, which is usually neglected).
Comment: $+1$: A nice example! :) Another tricky variation of the problem you mention is to consider a freely sliding ramp and analyze the system from the reference frame of the ramp. Both in the ground frame and the ramp frame, the change in the potential energy would be the same but the change in the kinetic energy would be different (of course, due to the ramp not being an inertial frame, one would have to take into account the work done by pseudo forces)!
Answer: Kinetic energy is frame dependent by definition. In newtonian mechanics, the kinetic energy $T_{_{P,S}}$ of a point mass $P$ with respect to a frame of reference $S$ is $\mathit{defined}$ as:
$ T_{_{P,S}} := \frac{1}{2}m_{_{P}}|\vec{v}_{_{P,S}}|^2$
where $\vec{v}_{_{P,S}}$ is the velocity vector of $P$ relative to $S$.
As for your question regarding $"\mathit{energy\; conservation}"$ I'm going to assume that you mean the law of conservation of $\mathit{mechanical}$ energy (as has been assumed by the other answers since the OP appears to be wanting an answer within the framework of Newtonian mechanics and Galilean relativity). The law of conservation of mechanical energy according to Wikipedia is:
"The principle of conservation of mechanical energy states that if an isolated system is subject only to conservative forces, then the mechanical energy is constant"
Here is a proof for the law of conservation of mechanical energy when all kinematic quantities are measured from an $\mathit{arbitrary}$ intertial frame $S$:
I am going to assume you are familiar with the work-energy theorem for an $n$-particle system $P_{1},P_{2},P_{3},...,P_{n}$:
In any inertial frame of reference, The sum of the works done by every force(internal as well as external to the system) on the system is equal to the change in the system's kinetic energy:
$$\sum_{k=1}^n W_{\vec{F_{k}},P_{k},(S)} = \Delta{\sum_{k=1}^n T_{_{P_{k},S}}}$$$\;$
where $\vec{F_{k}}$ is the resultant force on the $k^{th}$ particle so $W_{\vec{F_{k}},P_{k},(S)}$ is the work done by  $\vec{F_{k}}$ on $P_{k}$ relative to $S$ (yes, work is relative too as $W_{\vec{F},P,(S)}:= \int_{\vec{r}_{_{P,S,(i)}}}^{\vec{r}_{_{P,S,(f)}}} \vec{F}\cdot d \,\vec{r}_{_{P,S}}$) or equivalently, the sum of the works done by every force acting on $P_{k}$ All of these forces can be split into $3$ categories: external forces, conservative internal forces and non-conservative internal forces. Using this:
$\sum W_{\vec{F}_{ext},(S)} + \sum W_{\vec{F}_{int. cons},(S)} + \sum W_{\vec{F}_{int.noncons},(S)} = \Delta{\sum_{k=1}^n T_{_{P_{k},S}}}$
There are no external forces on an isolated system by definition and if there are no non-conservative internal forces either, the first and third sums vanish.
$\implies{\sum W_{\vec{F}_{int. cons},(S)} = \Delta{\sum_{k=1}^n T_{_{P_{k},S}}}}$
The change in potential energy of an $n$-particle system due due to an internal conservative force vector $\vec{F}$ acting on $P_{k}$ relative to any frame S is defined as:
$ V_{f,(S)} - V_{i,(S)} = -\,W_{\vec{F},P_{k},(S)}$
$\implies{\sum W_{\vec{F}_{int. cons},(S)} = V_{tot,i,(S)} - V_{tot,f,(S)}}$
where $V_{tot,(S)}$ denotes the total potential energy of the system due to all the conservative internal forces. Plugging this back into our equation gives us the desired result:
$V_{tot,i,(S)} + \sum_{k=1}^n T_{_{P_{k},i,S}} = V_{tot,i,(S)} + \sum_{k=1}^n T_{_{P_{k},f,S}}$
$\implies{V_{tot,(S)} + T_{tot,(S)}} = c$
for some constant $c$ (since $i$ and $f$ can be arbitrarily close configurations) for any inertial frame $S$.$\;\;$$Q.E.D$
Note: If you would like a proof based purely on first principles, I would be more than happy to add the proof of the Work-energy theorem.
Answer: The confusion may be a result of a very common misconception about the conservation of energy:
People often think that the energy conservation states that potential energy equals kinetic energy ($E_{\mathrm{kin}} = E_{\mathrm{pot}}$).
But this is only a special case, where the reference frame and the reference point for the potential energy are chosen such that the problem becomes very easy. Which is the case for most textbook problems.
At first, energy is a quantity that only decribes the state of a system. If a process occures and we want to describe the change of state, we have to use the physical quantity work.
The full law of energy conservation states that the sum of all energy forms is a constant. The value of this constant may depend on the chosen reference frame.
(Beyond galilean relativity, in the special theory of relativity this only works if energy and momentum as a whole are considered.)
Comment: "People often think that the energy conservation states that potential energy equals kinetic energy ($E_{\mathrm{kin}} = E_{\mathrm{pot}}$).

But this is only a special case, where the reference frame and the reference point for the potential energy are chosen such that the problem becomes very easy. Which is the case for most textbook problems." -- Can you clarify this part of your answer? I don't see how energy conservation relates to potential energy and kinetic energy being equal.
Comment: Maybe what you mean is that during a process the change in kinetic energy is the negative of the change in potential energy (which would ensure, for an isolated system with no dissipative forces, that the net change in the energy of a system is zero, i.e., energy is conserved)?
The rest of your answer looks great! Welcome to Physics StackExchange :)
Comment: A simple example: dropping a ball out of rest. The question is how fast is the ball when it reaches the ground. The easiest solution is obtained with the conservation of energy. Students now argue that the ball starts with only potential energy and when it reaches the ground it only has kinetic energy. This IS what the computation says but it is not what is going on. When you now ask them about the energies in an intermediate state in the motion, they are completely lost.
Comment: Yes, constructing a simplified model system with no dissipative forces like friction, as you mentioned, unfortunately lead to this misconception.

Is kinetic energy relative or absolute?


Erasing Data from a Water Damaged MacBook Air

Question: I have a water damaged 2015 MacBook Air which will not turn on. I would like to sell it for parts but want to firstly erase all the data from it. I know that one method of doing so safely is just to take out the drive manually, but is there some method to do it for example from another MacBook?
Comment: If it doesn't turn on, another Mac will not help.
Answer: First, the SSD is PCIe based so it's removable.  Open the back cover and remove the SSD. There's an excellent step-by-step guide on iFixit.
Removing the SSD will ensure that nobody else will have your data and at this point, you can list your MBA for sale without the fear of your data ending up in someone else's possession.
You then have the option of installing it into a USB enclosure so that you can access the data (via the other Mac), though there's no guarantee that it (SSD) will work.  If it does work, you can copy your data off and then wipe the drive and sell it as well.
Could you install it into a similar MBA (mid 2013 through 2017 MBAs)?  Sure, but I am hesitant to put electronic components that are of questionable functionality into working machines.  I personally wouldn't take the risk.


Appropriate .Net data type for decimal(20,0)

Question: I've got some sql returning a decimal(20,0) data type.  In SSIS I have a package with a foreach loop.  In my variable mappings, what type of variable would I map it to?  I've tried Int32, Int64, double, and still get the error "The type of the value being assigned to variable "User::iID" differs from the current variable type..."
Answer: Have you tried Decimal yet?
Comment: There is no option for decimal or float in the ssis designer
Answer: The SSIS variable designer did not, in my case, show the Decimal or Numeric data types to select to place my decimal(18,2) value into.
I changed my variable to Object, and was able to read the Decimal(18,2) value from the result set of one stored proc, and pass it as a parameter with type Money to a second SP.
So I would use "Object" if you cannot find a type in the variable list that works for you.
Answer: SSIS does have Decimal and Numeric types.  You can use either of these and it'll go through (except maybe on a Union All, where you should make sure they're the same precision and scale).
See more about data types here.
Comment: Where? In the variables window, I can pick Boolean, DBNull,Double, Int16, Int32, Int64, Object, SByte, String, UInt32, UInt64  but no decimal or numeric
Answer: .NET decimal has methods decimal.ToInt64(), decimal.ToInt32() etc.
Answer: A float or a decimal would be my recommendation.
Comment: There is no option for decimal or float in the ssis designer
Answer: A SQL decimal(20,0) has a precision of 20 which equates to 13 bytes of storage. The .Net decimal is 16 bytes and should work.
Answer: You would need to convert the SQL data type to an Int64 prior to putting it into a Int64 package variable.
How are you getting it, as an output parameter?
In a dataflow, you would obviously read it into a decimal/numeric and then convert to Int64 in a Data Conversion component.
If you're trying to directly map an output parameter from an Execute SQL Command task, you'll probably have to use a temporary object package variable and then convert it in a script task into the real Int64 package variable.