Difference in thermal radiation between condensed matter and gases

Question: In Quantum physics of atoms, molecules, solids, nuclei, and particles by Robert M. Eisberg and Robert Resnick, the authors write:

Matter in a condensed state (i.e., solid or liquid) emits a continuous spectrum of radiation.

What happens in a gas?
Answer: If the gas is atomic or molecular, then there is very little continuum opacity, since absorption of a photon would usually take place at the relatively distinct wavelengths associated with atomic and molecular transitions. Rayleigh scattering has a continuous cross-section, but is an elastic process.
Since there is a directly proportional relationship between the effectiveness of emission and absorption at each wavelength, then in such cases the gas is likely to be transparent, or optically thin at most wavelengths. Almost all its emission will be in the form of discrete lines, with perhaps a continuum of scattered light from whatever illuminates it. A blackbody, as a minimum requirement, must absorb all radiation incident upon it, so such gases cannot emit as blackbodies.
If there was really a lot of such gas, then things like line broadening mechanisms come into play. There is a tiny amount of opacity at a broad range of wavelengths, even for discrete transitions, because of doppler broadening, pressure broadening, the Stark effect and others. This small opacity, combined perhaps with the increased optical path length caused by scattering, could make the gas optically thick at a broad range of wavelengths. In which case it might approximate a blackbody. I can't think of any examples.
If you heat and ionise/partially ionise the gas, then the options for continuum opacity are considerably increased. Free-free absorption, inverse bremsstrahlung, Compton scattering, photoelectric absorption, pair production are examples of mechanisms that produce a continuum opacity. It requires far less quantity of such gases (or plasmas if you insist) to become optically thick and approximate blackbodies. Examples include the visible surface of stars, or even better, the interiors of stars - which we can't see at any wavelength, because all wavelengths are absorbed!
The basic rule of thumb is - if radiation can pass through an object then it will not emit blackbody radiation
EDIT: Perhaps the best example of the differing properties of ionised and atomic gases is in the early universe. When the universe was hotter than $\sim 3000$ K, there were sufficient free electrons and free-free opacity to keep the universe opaque at all wavelengths - leading to the emission of blackbody radiation. The universe cooled, the electrons and ions combined to form atoms, and the universe became transparent to radiation. That is why the cosmic microwave background looks like blackbody radiation at $\sim 3000$ K, redshifted into the microwave region by the expansion of the universe.
Answer: In a solid or liquid the electrons in the valence and conduction bands are roughly uniformly distributed so we have a continuous distribution of electrons throughout the whole material. By contrast atoms or molecules in a gas are widely separated by vacuum (where there are no electrons).
The reason this matters is that the radiation mentioned in the quote, black body radiation, is mainly produced by oscillations in the electron density. Thermal motion makes the atoms oscillate and this produces changes in the electron density. This in turn produces oscillating electric dipoles, and those dipoles emit the black body radiation.
In a gas at everyday temperatures and pressures this can't happen because the gas atoms or molecules are too widely spaced. There is no continuous distribution of electrons to oscillate, and as a result gases do not emit black body radiation. The radiation emitted by gases generally consists of sharp lines related to rotational or vibrational transitions.
If you compress a gas to very high density then it can emit black body radiation much as a liquid does. However this normally requires extreme pressures not found outside physics labs or astronomical bodies.
Answer: From Basics of Radio Astronomy, published by NASA's Jet Propulsion Laboratory in April 1998, Chapter 3 - The Mechanisms of Electromagnetic Emissions (emphasis added):

In solids, the molecules and atoms are vibrating continuously. In a gas, the molecules are really zooming around, continuously bumping into each other. Whatever the amount of molecular motion occurring in matter, the speed is related to the temperature. The hotter the material, the faster its molecules are vibrating or moving.
Electromagnetic radiation is produced whenever electric charges accelerate—that is, when they change either the speed or direction of their movement. In a hot object, the molecules are continuously vibrating (if a solid) or bumping into each other (if a liquid or gas), sending each other off in different directions and at different speeds. Each of these collisions produces electromagnetic radiation at frequencies all across the electromagnetic spectrum. However, the amount of radiation emitted at each frequency (or frequency band) depends on the temperature of the material producing the radiation.
[...]
Any matter that is heated above absolute zero generates electromagnetic energy. The intensity of the emission and the distribution of frequencies on the electromagnetic spectrum depend upon the temperature of the emitting matter. [...]

The author provides a table on page 3 of the PDF (page 21 in the book):

Thus, according to the JPL, gases do indeed emit radiation in all wavelengths (according to their temperature), just like liquids and solids do.


Can we remove the legal tag?

Question: It seems that despite the decision to ban the legal tag six years ago, it's still alive and well.  The majority of questions that use this tag seem to get closed almost immediately and its continued existence seems to suggest to newcomers that it's okay to ask "is it legal" questions.
Comment: No need to accept my answer right away; just because I'm a moderator doesn't mean I have the final say or anything.  Maybe we can use this question to *adjust* rather than *delete* the tag, as proposed in another answer.
Comment: I believe [this](https://workplace.meta.stackexchange.com/questions/3963/if-we-avoid-legal-advice-why-do-we-have-a-law-tag?noredirect=1&lq=10) was the most recent discussion on the tag.
Comment: And I see from that question that we also have a [tag:law] tag.
Answer: Apparently it was removed back then.  It came back a bit under three years ago and now has the following wiki excerpt:

Questions involving local labour laws or about working within the legal system such as for the courts or lawyers. Please note that we can not provide case-specific legal advise. Also consider if your question might be more appropriate on https://law.stackexchange.com

The focus of the older meta discussion was on legal advice, which is off-topic here.  The current description isn't about that.  I don't know the history here (in particular, if there was another meta thread), but I don't think we should delete the current tag based on the old discussion.  (I'm not saying we shouldn't delete it after having a new discussion based on the current definition; I don't yet have an opinion on that.)
Comment: @DarkCygnus I suspect you're right about it being misused.  Anybody, feel free to clean up mis-applied tags or bring larger "what should we do with this class of questions" questions to meta.  Just the other day in chat I was saying that some of our tags seem a bit of a mess and it'd be nice to do something about that, but I haven't put together anything concrete yet.  Fortunately, anybody can help. :-)
Comment: [Don't we have some legal questions that are on topic though?](https://workplace.meta.stackexchange.com/questions/1856/what-is-asking-for-legal-advice?noredirect=1&lq=1) (at least based on the top-voted answer)
Comment: I agree with this. The tag now clearly refers to work-related questions on legal workplaces (courts, etc.). This could be easily answered by, say, any user with working experience on such places. I think however, that it has been **misused** by recent questions, where they include it using the "old" concept of the tag.
Comment: Turned that comment into an answer and possible suggestion ;)
Comment: Was just going to share @Dukeling's link - our current scope (as I understand it) is that legal advice is acceptable if it is something that any HR professional should know the answer to.
Answer: I agree with Monica's answer, we should not necessarily remove it.
The tag now clearly refers to work-related questions on legal workplaces (courts, etc.). This could be easily answered by, say, any user with working experience on such places.
I think however, that it has been misused by recent questions, where they include it using the "old" concept of the tag instead.
What I think we can do is to rename it to something like legal-industry instead. This would help remove the possible confusion here, as it will now be clearer that it does not refer to legal questions, but rather questions about legal work environment (courts, law firms, etc.).
This way would also be aligned with current ""tag standards" given the other x-industry tags we have in the site (like our top 3 tag software-industry).
Comment: I like the idea of renaming it.  I fear that renaming it to legal-industry will lead to questions about jobs as lawyers (like software-industry attracts questions about programmer jobs), which isn't what we want either.  Does anybody have a better idea?
Comment: Well, people come here asking for programmer jobs and not necessarily do it just for the tag (or even include it). Maybe the "-industry" is not the perfect candidate, but it could work right. Other options I can think are "legal-job", "legal-company", "legal-workplace"... let's see what other think.
Comment: For [the 51 open questions](https://workplace.stackexchange.com/search?page=1&tab=Newest&q=%5blegal%5d%20closed%3ano) with the [tag:legal] tag, only 2 of them appears to not be asking for legal advice, and those questions are, respectively, writing resumes when there were legal issues with the work and company interaction for appearing in court. So a [tag:legal-industry] tag wouldn't do us much good at this stage.
Comment: @Dukeling what do you suggest then? We *could* create this new tag and burninate the old legal one...
Comment: @DarkCygnus I'm not sure the off-topicness of **all** legal questions has been conclusively decided, so I'm not really suggesting we do anything with [tag:legal] (yet) (notwithstanding my own desire to watch all tags burn). I'm just saying creating a tag with 0 questions doesn't make sense, and is also not possible AFAIK (if there are a handful of applicable question that are specific to the legal industry, I'd be more than happy to agree that a tag would be a good idea).
Comment: When you ask a question you can create new tags if you have some small rep lvl, and if your question needs so @Dukeling
Comment: @Dukeling I think a lot of questions that could use a legal tag don't actually get one: either because no one thought of it or because the tag is sometimes removed since it's such a loaded one. Questions on overtime, reporting hours and whatnot which have been considered on-topic legal questions don't seem to get the tag. The tag is abused but imo necessary.
Answer: How about creating two tags: laws and legal-industry? It doesn't sound appropriate to bundle those together into a single tag, since laws apply to all workplaces, not just those in the legal industry.
laws can be used for questions concerning laws applicable to the workplace, and ones which the legal department of a company (or even HR in some cases) can reasonably be expected to answer (example: "What is the minimum daily wage according to the Elbonian law?")
legal-industry can be used for questions about a workplace pertaining to the legal industry, such as courts and law firms.
Analogously, it isn't appropriate to subsume software into software-industry. For example, a mom-and-pop pizza shop may be using a software to generate invoices, track inventory, etc.. A question pertaining to the software use (example: "How do we manage a software upgrade without shutting down our business for a month? :)") cannot put a pizza shop into the software industry. See also Monica's answer to my question here:  What is the use of 'software' tag?

Can we remove the legal tag?


Does the unit of measure matter when you are solving for the diameter of a circumference?

Question: I understand that the circumference of an object should be divided by $\pi$ when searching for the diameter. What I  don't understand is what unit of measurement should I use, inches, cm, mm? If I want to find the diameter of a $10$ inches circle I would get the same number I would, were I looking for the diameter of that of a $10$ cm circle?
Comment: The diameter of a circle $10$ inches in circumference is approximately $8.08508$cm because $\pi$ is approximately $7.97965$ inches per centimeter.
Answer: Both the diameter and the circumference are lengths, so it doesn't matter what units you use to measure them, as long as you are consistent: both in cm, or both in in., or both in miles or... .The ratio of circumference to diameter will then be $\pi$. In your example, a circle of circumference 10in is bigger than a circle of circumference 10cm; the diameter of the bigger circle is $10/\pi$ in., so the ratio is $\pi$, and the diameter of the smaller circle is $10/\pi$ cm, so the ratio is also $\pi$.
Answer: In Euclidean geometry the ratio of the circumference to the diameter  has the the same numerical value for all circles. We call that number $\pi$. That fact is independent of any way you might measure lengths. Lay the diameter along a string and mark its multiples. Then wrap that string around the circle - it will take $\pi$ diameters to get back to the starting point.
If you simultaneously mark the string in inches (so measuring the diameter in inches) it will take $\pi$ times as many to travel the circle. If you measure the diameter with centimeters (or paper clips, as they do in first grade) you get the same multiple for the circumference.
Note that the ratio of circumference to diameter is the same for all circles only on the plane. For circles on a sphere (where "lines" are great circles) that ratio is smaller the larger the circle. It's always less than $\pi$, but close for small circles.
Related: How to prove that $\pi=$ constant ratio
Comment: Is there any geometry, besides Euclidean, where this does not hold?
Comment: @BlueMoon93 The constancy of $\pi$ is equivalent to the parallel postulate, so it fails in all nonEuclidean geometries. In hyperbolic geometry the ratio of circumference to diameter increases for larger circles.
Answer: The diameter of a circle with a circumference of $10$ inches is $\frac{10}{\pi}\approx 3.1831$ inches
Similarly the diameter of a circle with a circumference of $10$ centimetres is $\frac{10}{\pi}\approx 3.1831$ centimetres
You could mix things up, but this is unlikely to help. $10$ inches is $25.4$ centimetres so you could say the diameter of a circle with a circumference of $10$ inches is $\frac{25.4}{\pi}\approx 8.085$ centimetres, but why would you want to?
Answer: The unit of the circumference will be the unit of the diameter.
You can pick any unit of $C$ which will be the unit of $D$ and vice-versa: $C = \pi D$ and $D=\pi / C$, no matter the unit, as long as the unit is linear (some rare physics unit are non-linear like decibels).


Master Locksmith

Question: Description

Master Locksmith has just finished the work of his life: a combination
  lock so big and complex that no one will ever open it without knowing
  the right combination. He's done testing it, so now all he has to do
  is put the lock back into a neutral state, as to leave no trace of the
  correct combination.
The lock consists of some number of independently rotating discs. Each
  disc has k numbers from 0 to k-1 written around its circumference.
  Consecutive numbers are adjacent to each other, i.e. 1 is between
  0 and 2, and because the discs are circular, 0 is between k-1
  and 1. Discs can rotate freely in either direction. On the front of
  the lock there's a marked bar going across all discs to indicate the
  currently entered combination.
Master Locksmith wants to reset the lock by rotating discs until all
  show the same number. However, he's already itching to start work on
  an even greater and more complicated lock, so he's not willing to
  waste any time: he needs to choose such a number that it will take as
  little time as possible to reach it. He can only rotate one disc at a
  time, and it takes him 1 second to rotate it by one position. Given
  k and the initialState of the lock, find the number he should
  choose. If there are multiple possible answers, return the smallest
  one.

Example

For k = 10 and initialState = [2, 7, 1]
the output should be masterLocksmith(k, initialState) = 1
It takes 1 second for the first disc to reach 1 (2 → 1). It takes 4
  seconds for the second disc to reach 1 (7 → 8 → 9 → 0 → 1). The
  third disc is already at 1. The whole process can be completed in
  5 seconds. Reaching any other number would take longer, so this is
  the optimal solution.

Constraints
Guaranteed constraints:
3 ≤ k ≤ 10 ** 14
2 ≤ initialState.length ≤ 10**4
0 ≤ initialState[i] < k for all valid i
Code
from operator import itemgetter
from collections import defaultdict

def masterLocksmith(k, initial_state):
    occurence = defaultdict(int)
    for i in initial_state:
        occurence[i] += 1

    num_set = set(initial_state)
    num_set.add(0)

    shortest = {j: 0 for j in num_set}
    for i in occurence:
        for j in num_set:
            shortest[j] += min(abs(i-j), k - abs(i-j)) * occurence[i]
    return min([[k, shortest[k]] for k in shortest], key=itemgetter(1,0))[0]

The TLE's were really hard, I've tried some optimization but the best I could solve this in was still  \$ O(n * k) \$ which was not enough to complete the challenge. I am less concerned about readability but more how this can be sped up.
Comment: What limits are you given on \$n\$ and \$k\$?
Comment: @PeterTaylor I've added the constraints
Comment: Is this from some public challenge? Can you add a link to the original problem?
Comment: @MartinR [source](https://app.codesignal.com/challenge/Dfq9AGTczotsS9hqF)  You may need an account for this though
Comment: K is 10 ** 14 O(n * k) will never works more
Answer: Style nits: misspelling of occurence, gratuitous renaming of the problem statement's initialState to initial_state.
I was initially skeptical of your algorithm, but I think I've convinced myself now that it's correct — even the initially mysterious addition of 0 to the num_set. Basically you're observing that if we have m dials set to the Mth position, and n dials set to Nth position, then it never makes sense to send them all to some position POS in the middle (M < POS < N). If m > n then we can save time by sending them all to M; if m < n then we save time by sending them all to N; and if m = n then sending them all to POS costs exactly the same amount as sending them all to either M or N. The one special case is when m = n and M < 0 < N, in which case the problem statement requires us to send them all to 0... and that's why you special-case num_set.add(0)!
The above reasoning could productively have been recorded in a block comment.
Speed-wise, I see one obvious improvement and one possible improvement.
shortest = {j: 0 for j in num_set}
for i in occurence:
    for j in num_set:
        shortest[j] += min(abs(i-j), k - abs(i-j)) * occurence[i]
return min([[k, shortest[k]] for k in shortest], key=itemgetter(1,0))[0]

The obvious improvement is that you are repeatedly doing the lookup of occurence[i] (sic) inside your inner loop, even though you could have cached it in the outer loop. Let's do that. And similarly shortest[k], even though I can't imagine that being a bottleneck:
shortest = {j: 0 for j in num_set}
for i, population in occurence.iteritems():
    for j in num_set:
        shortest[j] += min(abs(i-j), k - abs(i-j)) * population
return min(shortest.iteritems(), key=itemgetter(1,0))[0]

The possible improvement is that you've got this dict shortest that you're keeping only so that you can take its minimum at the end. This is a classic pattern that's going to come up over and over, so you might as well learn it: keep a running min.
best = (0, float('inf'))
for j in num_set:
    score = 0
    for i, population in occurence.iteritems():
        score += min(abs(i-j), k - abs(i-j)) * population
    if score < best[1]:
        best = (j, score)
return best[0]

This isn't much of anything to look at, but it does completely eliminate the repeated computation of shortest[j] inside your inner loop.
If you'd included some test vectors in your question, then we could run them and see if these changes made any difference in the running time.

P.S. — You say your algorithm is O(n*k) (where n = initialState.length), but I believe your num_set optimization makes it actually O(n*n). Since n is less than 10000, you're doing on the order of 100 million ops here, so I'd guesstimate it should be doable in a couple of seconds, tops. How much time are you seeing it take, and on what kind of test cases?
Comment: This is incorrect, because when there are similar minimal distances, it should return the one with the lowest number. ie for `k:  10` and `initialStateinitia : [7, 8, 9, 3, 3]` it should return `7` not `9`
Comment: The question is tagged [tag:python-3.x] so it should be `items()` rather than `iteritems()`. Also , I think your running min code assumes that `num_set` is ordered (for the tie-breaker to work), and I don't believe that to be true.
Comment: After adding both improvements it will still not pass the TLE constraints
Comment: Ah, right, the tiebreaker should be `if (score < best[1]) or (score == best[1] and j < best[0])` — which can be just `if (score, j) < best`, if you flip around the order of `best`'s elements.
Comment: As for "Time Limit Exceeded": when I paste the Python code into https://app.codesignal.com/challenge/Dfq9AGTczotsS9hqF and click "Run Sample Tests," the site hangs forever (like, *way* more than the 4 seconds it claims is the time limit). But at the command line, running all 10 visible sample tests takes 0.073s *total*. So I think it's more likely a bug in the site's backend than a problem with Python. (For comparison, I also did the mechanical translation of this algorithm to C++17 and ran it; it also hung the site. So whatever problem it is, it's not Python-specific.)
Comment: @Quuxplusone That's the second time somebody told me this. Do you have an account? Because that might be the issue
Comment: No, I don't have an account. (I also wonder if your own account is encoded into the URL somehow.)
Answer:
def masterLocksmith(k, initial_state):
    ...
    for i in occurence:
        for j in num_set:
            shortest[j] += min(abs(i-j), k - abs(i-j)) * occurence[i]
    return min([[k, shortest[k]] for k in shortest], key=itemgetter(1,0))[0]

The aliasing of k is not very helpful for readability; that last line is hard enough to decipher without confusion about the names. Another answer observed that using a running minimum would reduce memory usage and therefore possibly performance; in my opinion it would also be more readable.

from collections import defaultdict
...
    occurence = defaultdict(int)
    for i in initial_state:
        occurence[i] += 1

There's a specialised class for this:
from collections import Counter
...
    occurence = Counter(initial_state)

the best I could solve this in was still \$O(n∗k)\$

I concur with Quuxplusone that it's actually \$O(n^2)\$. Looking at the small example case by hand, I think there's a reasonably straightforward way to do it in \$O(n \lg n)\$ time. This is just a sketch: I haven't implemented it.
Basically the task is to add a series of functions which look something like
  ^
 / \
/   \
     \   /
      \ /
       v

Note that there are two points of inflexion: at the initial value, and opposite the initial value. (Correctly handling odd vs even values of k will be a minor complication). Also note that a sum of piecewise linear functions is piecewise linear.
So you can first calculate in \$O(n)\$ time the score if the target number is 0 and the gradient of the sum at \$0\$. Then sort a list of inflexion points in \$O(n \lg n)\$ time and iterate through them, calculating the score by extrapolation from the previous one and the new gradient. Finally extrapolate to k-1.
Answer: Clicking through to the source of the puzzle, I observe that the problem statement does not require that you use Python; in fact it offers compiled languages such as C++ as possible alternatives. In the real world, many problems can be solved by switching tools than by trying to hack a solution using the first tool you thought of. You should consider the very real possibility that the puzzle is deliberately not solveable in Python given the constraints imposed by the problem statement.
Here's the mechanical translation to C++17 I mentioned in my previous comment.
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <tuple>
#include <vector>

long long masterLocksmith(long long k, std::vector<long long> initialState) {
    std::map<long long, long long> occurence;
    for (auto&& i : initialState)
        occurence[i] += 1;

    std::set<long long> num_set(initialState.begin(), initialState.end());
    num_set.insert(0);

    auto best = std::tuple(INFINITY, 0);
    for (auto&& j : num_set) {
        long long score = 0;
        for (auto&& [i, population] : occurence)
            score += std::min(std::abs(i-j), k - std::abs(i-j)) * population;
        if (std::tuple(score, j) < best)
            best = std::tuple(score, j);
    }
    return std::get<1>(best);
}

On my machine it takes 0.018s to run the 10 provided test cases; the Python version takes 0.073s. Neither takes anywhere close to 4 seconds. :)
OTOH, when I randomly generate a k=10000, n=10000 test case and try running that, I see C++ taking 6.8s (and with -O3 it takes 1.8s) whereas Python takes 76.1s. That's quite the penalty for using an interpreted language!
You can cut the running time of the naïve C++ code in half again by noticing that iterating a map inside your inner loop involves following a lot of pointers, and that's no good for your L1 cache. Replace the map with a cache-friendly vector, leaving the rest of the code the same:
std::map<long long, long long> temp;
for (auto&& i : initialState)
    temp[i] += 1;
std::vector<std::pair<long long, long long>> occurence(temp.begin(), temp.end());

and the running time on my huge random test case drops to 3.5s (0.48s with -O3). I suspect that you could hack a similar cache-friendliness fix in Python, but I have no idea what it would look like; and anyway, if it halved your running time, you'd still be at 38s — a lot more hacks would be needed to get down to the compiled-language level.
Comment: Agreed Python may not be the best tool for the job :), but there are Python solutions that passed the test cases. I think a solution modeled after Peter Tayler will work.

Master Locksmith


How to remove broken screws with no heads from a door jamb

Question: I broke the screws off accidentally on both. I've tried to use a drill's chuck to remove them, I tried pliers, and even one of those universal sockets. Any other ideas on how to remove them? The top screw is sticking out further than the bottom and pliers wont grip good enough to twist and turn it lose.
Comment: I assume there's actual framing behind the ripped up casing, where it's the framing that's holding the screws with no contribution from the casing. To get a better bite on the recessed screw, you can take a utility knife and cut a pyramid of wood from around the screw. Just offset a 1/4" or so from the screw and cut diagonally toward the screw on all 4 sides.
Comment: Or this? [How to remove screws with stripped heads?](https://diy.stackexchange.com/questions/10451/how-to-remove-screws-with-stripped-heads)
Answer: While vise grips are the absolute right answer, a small drill bit (3/32) run down the sides of the screw will help loosen the hold of the wood fibers on the screw.
Answer: Vise grips will work on the top screw, since it has almost 1/4" of shank protruding. You will need to adjust the setting screw on the end of the handle to really grab the screw strong, like tight enough you can barely get the handles to lock in. The jaws of the vise grip have corrugations, set them so the shank of the screw is in the lower part of the corrugation, so the screw shank is hugged by the corrugations. This means you will need to get the vice grip perfectly perpendicular to the screw shank. If doing it this way, and you cannot grab at least a 1/4" of shank with the jaws, it will spit it off as soon as you try to turn the screw out, so don't even try it, for it will ruin the other way using the same tool.

That way is grabbing it straight in, so the tool is in line with the screw, not perpendicular. This way, you will really need to have the best firm grip you can get with the tool, for it will be really easy for it too spin on the screw shank without turning a thing except for ruining the end you need to work with. If you grab less than 1/4" it will spit off the end of the screw while tapering the remaining screw shank. Been there, done that, MANY times, before I got it down.
The bottom screw, good luck with that one. I would suggest lowering or raising the strike plate just enough to get a screw in beside it. Moving it enough to let the latch bolt go in. Usually, the latch bolt and strike plate are never really perfetly centered on each other, so there is usually a preferred way to relocate the strike plate to take advantage of the off-centeredness.
Link to plug cutter
I wanted to get just the picture, but it didn't work, the link will have to do.....
If you absolutely must have the screw gone, I have used plug cutters to remove screws. They have an open center that can go around the screw and cut the wood that the screw is embedded in. Expect to trash it out, as in it will be good for a one time use, but the idea is to get rid of the screw anyways. A 3/8" plug cutter is a good size for this. Center it up over the screw, trying to determine the direction the screw goes in so it does not hit the metal too quickly as to trash it out right away. Once the plug is cut with the screw in the center, pop the plug out with a small thin tool, perhaps a small screwdriver, or ice pick. To restore the area cut a 3/8" dowel rod to length and drive it in the hole with glue on the dowel before driving it in. The grain direction on the dowel make for a weaker screw grab, but this is where a longer screw will make up for that difference.
Answer: My first choice is locking pliers, AKA "VISE-GRIP®" pliers, such as these (example only). As the pliers are about to close, force can be very high, and once locked, you no longer have to squeeze while turning out the screw.
Some other choices are:

Break off the end of the wood screw and drill out the remainder (difficult in wood, since the drill bit will tend to slip off the metal screw and dig into the soft wood).
Chisel out the surrounding wood, and insert a wood patch. This might be the best choice, since the existing wood seems badly damaged.
Answer: Compound leverage locking pliers (e.g. things like the brands Vise-Grip or Mole Grip) are the only plier type that's likely to have a chance. On the lower one you might have to chisel away some wood to get a bite on the screw.
Failing that, use a hole saw to drill around the broken screw and remove the wood plug and the broken screw as one, then glue in a wood plug before trying again with the screws.
Answer: A good end-nipper will grab those screw stubs. Chisel away any wood that interferes, as you are going to have to replace that section of door frame anyway.


Why laundry dry up also in cold/frost?

Question: Why laundry dry up also in cold/frost? When you have frost, water in the clothes should freeze, but if clothes are dry, then it should be possible that steam in the clothes does not have time to freeze.
Comment: "then it should be possible that steam in the clothes does not have time to freeze" not very sure what you mean about this, can you rephrase it?
Comment: I mean that if clothes are dry then there are only steam in the clothes, but I'm not sure is it true. and I think steam does not freeze in the cold.
Comment: Maybe this will help: drying happens not only due to heat but wind have a big role in this, you can imagine water molecules as always bouncing and jumping out of the laundry surface due to there internal energy, but most of them usually coming back to the surface, but wind can force them to "fly away" and by long time it will became dry anyway, and heat usually increase there energy so they will jump further and thus dry faster, anyway having frost will freeze water and particles will become incapable of jumping far away of the surface (but they still bouncing).
Answer: It is called sublimation. It is how ice cubes disappear in the freezer.

Snow and ice sublime, although more slowly, below the melting point temperature. This allows a wet cloth to be hung outdoors in freezing weather and retrieved later in a dry state. I

....

Sublimation is the process of transformation directly from the solid phase to the gas phase without passing through an intermediate liquid phase. Sublimation is an endothermic phase transition that occurs at temperatures and pressures below a substance's triple point in its phase diagram
Answer:
Why laundry dry up also in cold/frost?

Probably because, initially, the clothes and the liquid water trapped in the clothes fibres, are both at a temperature well above 0 C.

When you have frost, water in the clothes should freeze,

And it does, when the temperature of the garment and water trapped within it have eventually reduced to below 0 C

but if clothes are dry, then it should be possible that steam in the clothes

If clothes are already dry, the situation is not relevant to your question of how (wet) clothes become dry (or dryer) when air temperatures are below 0 C.

it should be possible that steam in the clothes does not have time to freeze.

If you move warm wet clothes into a cold environment for a sufficiently short time, the water will indeed not have time to freeze. The temperature of the majority of water will not be sufficiently reduced.
Left longer in air at a temperature below 0 C the liquid water in the clothes will freeze and any water vapour in the clothes will form frost.

Why laundry dry up also in cold/frost?


Magento 2 – How to off the autocomplete on forms on the admin

Question: How to off the autocomplete on forms on the admin
Comment: it's off-topic , its related to your browser and not magento.
Comment: I'm voting to close this question as off-topic because it is not related to Magento. This is browser specific.
Answer: The yellow highlight means that you have, at some point, allowed your browser to save the username and password for this site.
So this is a browser feature, not a Magento one.
Consult the help for your browser to find out how to remove saved passwords.
If you want to disable autocomplete on input fields in a custom module, you can add the HTML attribute autocomplete="off" to certain form fields (see link below) to prevent browsers from automatically injecting any saved credential into such a field.
See https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion for more information about using the autocomplete attribute.
Answer: Clear your browser's saved password. It will solve this problem.


Is Phosphate (PO4 3-) solube in water?

Question: Josh~
Superphosphate is used instead of just phosphate because superphosphate is a compound whereas phosphate is an ion. This means that phosphate must attach itself with a cation in order to give a plant its phosphorus supplement, it could do this by attaching itself to 3 calcium to make tribasic calcium phosphate but that is insoluble in water and Plants can only absorb materials when they are dissolved in water. In chemistry 'like dissolves like' so nonpolar solutes can only dissolve in nonpolar solvents, water is polar and tribasic calcium phosphate is nonpolar so phosphate cannot dissolve in water. This is why Superphosphate is so great because it has phosphorus and it can provide it because it is soluble.
Comment: You seem to be in some fundamental disagreement with our reality. You've asked this before, and the answer is not going to change, no matter how much you dislike it or how many times you repeat the question. Being soluble or insoluble is simply **not a property of ions**. Then again, in my book phosphate is definitely an ion; maybe you are using this word to denote something entirely different?
Answer: Ions are always dissolved in their solution. Anything that has charge is an ion. If phosphate ions are present in a solution it is because they came from a soluble parent molecule such as phosphoric acid.
Comment: Thanks for you answer, Can you give plants phosphate (PO4 3-) instead of super phosphate for their phosphorus supplement?
Comment: When you give a plant super phosphate you are giving it monnoammonium phosphate salt. You can't get "just Phosphate ions" by themselves, it's likely that some other salts of phosphate would work and that others would kill your plant.
Comment: Thank you so much, you mean monocalcium phosphate right?
Comment: I was looking at a bag that used monnoammonium phosphate, you must be looking at one that uses monocalcium phosphate. What the plant needs is phosphate and various cations bound to the phosphate may work.
Comment: Thanks so much for you help, you've helped me in more ways than you can imagine. If you dont mind can you tell me if this paragraph makes sense in respect to Chemistry. I put it in the description under your name. I really appreciate your help.

Is Phosphate (PO4 3-) solube in water?


Original Sheet music especially for rock and pop music genres

Question: Is it ok to ask for how to find original soundtracks of rock or pop music? For example, Lou Reed Perfect Day. This is fairly easy for classical music, in other music there is still scores but they are different, not only in terms of tonality but sheer notes.
Answer: No - this is off topic here. It is not about practice or performance.
In general, google (or other search engines) will be your best bet for searching for anything online.


How to authenticate TWiki against Windows Active Directory

Question: How would I go about getting TWiki to transparently authenticate against Windows Active Directory with Single Sign-on?
Answer: I wrote part of the supplemental documentation for this feature. The guide targets TWiki 4.2, but the setup process remains the same.
Kerberos SSO works in Firefox, just be sure to add your server name to network.negotiate-auth.trusted-uris in about:config
Name mapping is the hardest part. The TWiki LDAP plugin has a regex which maps Active Directory login names to TWiki user names. It had capitalization problems with our firstname.lastname format, but changing the regex produced the TWiki user names we wanted.
Answer: Do you mean single sign-on or merely authentication?
Authentication is probably pretty easy. Just point twiki to the OU that you keep your users in, if it's like every other LDAP authentication scheme out there. Single sign-on is much more complex, and I have no idea.
Here's a HOWTO that might help: http://twiki.org/cgi-bin/view/Support/LdapAuthenticationHowTo
Answer: Matt Simmons' answer is a good starting point.
I add some details as I use TWiki with LDAP (pure LDAP not AD).
In you apache conf where you normally have:
AuthUserFile /var/www/twiki42/data/.htpasswd
...

replace it with this:
AuthType Basic
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthName "login with your AD/domain credentials ..."
AuthLDAPURL ldap://your.ad.example.org/ou=people,dc=example,dc=org
require valid-user

(You have to set the proper values in AuthLDAPURL of course.)
You have to enable the proper auth module for ldap. On debian based systems use:
a2enmod authnz_ldap

ensure you have
$TWiki::cfg{PasswordManager} = 'TWiki::Users::HtPasswdUser';

in your LocalSite.cfg The other way is to use the admin interface to set this up.
Maybe you also want to disable registration:
$TWiki::cfg{Register}{EnableNewUserRegistration} = 0;

Just ask if you have any questions.
This is one way to do it (maybe the easiest). The other way is to use the ldap plugin and force your users to registrate a new user based on the ldap data (this was not what I wanted).
Answer: As far as I understand it, you will need a web browser that supports Kerberos for SSO. IE will probably have the functionality built in for communication with, at least, AD servers.
There also used to be Kerberos support in Firefox, but I just checked and e.g. the one from Debian Stable doesn't seem to have it linked in.
Answer: One method of doing single-sign-on on against AD is to use NTLM. You can do NTLM over HTTP to provide your users with automatic logins, but it's not really straightforward.
I've come across this article from 2006, and this somewhat more garish website from 2005, but this third and final link seems far more useful. Hopefully one of them will help you out!


What is the suggested level before entering Volskygge in skyrim?

Question: So what's the suggested level for an attempt on Volskygge?
 Just wondering, because I'd heard that once you pass a certain point, you'd have to revert to get out without completing.
Answer: I passed the point of no return, and I was level 18/19. Wasn't prepared for the last battles, so became invisible and walked around the Overlord, went outside, traded some stuff, and returned through the same door I left, Lydia, bless her, was still there and I defeated the overlord
Answer: I am not sure which level would be appropriate but I have just finished this dungeon at about level 23 with my archery at 60 as my primary damage dealing skill. The only problem I had was the last boss which is an elemental thing that flies around. I was just able to break line of sight with trees and fire off my arrows. I'm not sure if this is required to clear but you probably want the loot.
Comment: It's one of the Dragon Priests - Volsung.
Answer: I just finished that one and yes, like several other dungeons I've found so far, there is a point of no return, much to my annoyance. I was about level 22, a one-handed/heavy-armor type with a trusty companion. The last two encounters were quite challenging. The difficulty slider is always your friend.
I'd suspect that mid-teens is probably the earliest you'd like to try it depending on your build.


Should I use cPanel on my server?

Question: If I am using a hosting provider like Bluehost, or a2, should I also use cPanel ? cPanel is an admin interface and what looks like a handy utility for administering my server. Are there advantages and disadvantages to using cPanel?
Answer: I've certainly found cPanel very useful to do lots of things and easier that using ssh access (some hosting providers might not provide that). I have found it does everything I need that can't be done in the CiviCRM UI. My hosting provider (Siteground) has moved away from it to its own control panel which covers all the same functionality and has some better functionality, but there was nothing wrong with cPanel. Of course it also depends on the functions provided through cPanel as its a toolkit and they might leave bits out.
Answer: so my suggestion would be to go ahead and use it. As much as software can make things less secure, in this instance the cpanel is probably setup to auto update so its not something your managing and its probably installed on the server anyway so whether you use it or not, its going to be present.
From the other side of security, the more that the panel can do for you, in terms of checking, configuring and recommending, the better your security is likely to be. The modern panels have all sorts of plugins which will enhance and not detract your experience.
Think of the panel like any CMS such as Drupal or Wordpress. Yes, you could create a website without them but they provide a hell of a lot out of the box and keep getting updated. Hosting panels are similar, they offer you a bunch of functionality that will make your life a lot easier.
Answer: It's a tradeoff - it does a whole bunch of stuff that you don't need and some types of custom configurations can be difficult or get overwritten, but it does make some tasks easier, e.g. SSL certificate autorenewals, split php versions for different sites, creating mysql databases, etc...
And I'm not saying cpanel is insecure but just as a general comment about any software the more stuff you have running the more surface there is for attacks. It does let you turn off some things.
Answer: It is true that the more stuff you are running then potentially there are more attack vectors. If you are not comfortable doing all the low level config on the server or are not an expert then using something like cPanel or Plesk will give you more confidence.  Additional extensions are available to do things like security checks which can be invaluable.  It's always a trade of though - if you want to be able to do deep  level tweaks and config and want to squeeze the max performance out of the server then go without.

Should I use cPanel on my server?


Should I bag lawn clippings from a crabgrass-infested lawn?

Question: I know all the recommendations are to NOT bag the lawn (assuming a mulching mower), however, given a crabgrass-infested lawn (approx 50% surface coverage is crab grass), is it better to bag the clippings and dispose of them rather than let them cover the ground? Our community has a weekly grass pickup.
Answer: Adding on to "winwaed's" answer:

Crabgrass is an annual weed (dies at first frost) and lives year-by-year by self seeding itself.
Therefore if you cut your lawn "regularly" enough so that the crabgrass doesn't grow large enough to form seeds-heads, you can:

Leave the grass clippings on your lawn.

The problem with the above is, crabgrass thrives in the heat, and you really don't want to be out there cutting your lawn (for the overall health of your lawn) when temperatures are above 90°F (32°C).
Video: Will the REAL Crabgrass Please Stand Up? from University of Illinois Extension

You way also wish to take a look at this, "What's an organic way to discourage crabgrass from a large "lawn"?" question here on SE.
Comment: @Brian, this year you **might** be best to cut regularly (every 4 or 5 days) & bag the clippings (during July & August). Keep in mind, cutting regularly during the heat of summer isn't good for your lawn (wanted grass), but to gain (some) control & to get ready for **major** lawn care maintenance in early September you **might** be best to bite the bullet this year (during July & August) & cut regularly (every 4 or 5 days) & bag.
Comment: Good info, but there doesn't seem to be a clear "Yes" or "No" response. I am taking away that it probably isn't a good idea to leave the clippings as they could leave seeds for next year because I only cut once every 6-8 days in the summer.  If I go any longer than this, the crab grass really gets out of control.  In fact, I mowed Sunday (it's currently Wednesday), and the crag grass should already be mowed again.
Comment: @Brian, from my experience fighting crabgrass, you can control crabgrass, but you can't totally eliminate it (I use an organic approach to lawn care).
Comment: I understand I will never totally eliminate it, but I feel I can definitely do better than what I've got.  I see many lawns in the neighborhood that are not nearly as infested with crab grass clusters as my own.  I am just looking to get it to a point where I can walk the lawn once a week and manually remove the stuff within about 30 minutes of work (I have about 1/3 acre).  I am looking to "control" whats there now so that I am battling less of it next year.
Comment: @Brian, then I suggest you read the approach I have taken (during the last 5 cutting seasons): [What's an organic way to discourage crabgrass from a large "lawn"?](http://gardening.stackexchange.com/q/1390/394). I'm **not** saying my approach is perfect, it's just the approach I've taken & continue to refine as I learn more...
Comment: I've read it before.  My question still remains.  Do I bag the clippings or let them rest, with the hope that next year not as many seeds germinate?
Comment: @Brian, I'm not avoiding the actual question, but it really is your call to make (I've given you my opinion in the above comments, for what they are worth). Plus, regardless if you do or don't bag the clippings, the best thing you can do for the overall health of your lawn is **"to get ready for major lawn care maintenance in early September"** (IMHO).
Answer: From what I've read it propagates by seed rather than suckers/creeping, so you probably want to bag it if there are seed heads present. If there aren't, you are probably going to be okay.
Answer: This is what the crabgrass seed head looks like (photo from wikipedia, Forest & Kim Starr):

Note that "crabgrass" describes a variety of different species, so what you see may be somewhat different, especially depending on where you live.
Before you mow, patrol your lawn. Do you see crabgrass seed heads?
If yes:

Pull out each one and dispose of the seed heads, or
mow with the bagger.

If no:

Mow with the mulcher.
Answer: From my experience here in Indiana (land of weeds), the only way to really get rid of the crabgrass is to pull them up by the roots, one by one and throw it in the trash. It will leave divots and the grass will fill those in over time.


How to apply alternating caps?

Question: Fast way to type or change to AlTeRnAtInG CaPs?
Answer: Substitution is one way...
:s/\v(.)(.?)/\u\1\l\2/g

Breakdown:

\v : use "very magic" mode
(.) : first dot is our "odd" character; enclosed in capture group 1
(.?) : second dot is our "even" character; enclosed in capture group 2; have to make it optional in order to capitalize last char of line if it's "odd"
\u : convert to uppercase the character that follows which is...
\1 : ...the "odd" character
\l : convert to lowercase the character that follows which is...
\2 : ...the "even" character
g : ensure that this is repeated for every pair of characters on the line.
Answer: You could use a macro, started on the first letter of the word (and assuming
it's all lower cast to begin with (if not do guu to put the line into lower
case):
qa~lq

Then just do @a to replay the macro (and thereafter @@ to repeat). This
won't ensure that the first letter of each word in a sentence is of the same
case though:
SoMe aLtErNaTiNg tExT

If you need to exchange upper and lower case in some non-alternating pattern,
i.e change this:
SoMe wEIRd capiTaliSation Going on herE

to this:
sOmE WeirD CAPItALIsATION gOING ON HERe

you can do g~~ (thanks to @Rich for the tip)
Comment: @Rich Thanks - I never realised there was a `g~` command
Comment: Ah yes @filbranden you're right, thanks - I was surprised when `@@` worked for me (I thought I'd discovered a new behaviour I was previously unaware of), but I must have
been using an old recording of the same macro when I was testing it for the
answer. Updated the answer now.
Comment: Your second example (exchanging text of line) you can do inside Vim by typing `g~~`
Comment: You're missing the final `q` to stop recording the macro. You need to execute it at least once (with `@a`) before you can repeat it (with `@@`). You can use a count to repeat it enough times, e.g. `999@a`. At the beginning, you might want to use `guu` to lowercase the whole line (not just the current word.)

How to apply alternating caps?


finding the mean of the sample mean

Question: given that the population of the quarters has a mean weight of 5.67 g and a standard deviation of 1.34 g what is the mean of the sample means? (use central limit theorem) My issue if I am even supposed to be using this formula it requires to know what n is how do I know what n is since it doesn't list a sample size.  it is not given in the question or is the mean of the sample mean the same number 5.67 help! the second part is what is the standard error?
Answer: If we're working with the sample means $\bar{X}$, then
$$\begin{align}
\mu_{\bar{X}} &= \mu \\
\sigma_{\bar{X}} &= \dfrac{\sigma}{\sqrt{n}}\text{.}
\end{align}$$
Judging by your questions, I'm guessing that this is not a class where you prove these formulas, so I'm not showing the proofs of these formulas.
$\mu$, recall, is the population mean, so $\mu_{\bar{X}} = \mu = 5.67$.
The standard error is $\sigma_{\bar{X}}$, with the sample standard deviation used in place of the population standard deviation. Since $\sigma_{\bar{X}} = \dfrac{\sigma}{\sqrt{n}}$, the standard error is $\dfrac{S}{\sqrt{n}}$.

finding the mean of the sample mean


How to use Tibco Certified Messaging Mode

Question: How do I use Tibco Certified Messaging mode?  Does WebsphereMQ provide the same functionality?  Does the JMS specification define this functionality?
Comment: Which MQ are you talking about? If you mean Websphere MQ, why don't you ask them as its a commercial product? (If they don't know, no body does) If you mean ActiveMQ, or HornetQ, let us know.
Answer: I am guessing that you are looking for a message transport that offers guaranteed delivery. E.g. if the recipient of the message is not available, the message will be delivered when the recipient comes back online again?
TIBCO Rendezvous has a mode called Rendezvous Certified Messaging (RVCM) that stores messages on disk until all recipients has acknowledged it. Both TIBCO EMS and Websphere MQ allows configuring persistent destinations with similar functionality. For details on how to configure and use these please refer to the documentation provided by either vendor for your particular language.
JMS, which is a specification and not an implementation as the above, states that when a message is marked as persistent, the JMS provider must "take extra care to insure the message is not lost in transit due to a JMS provider failure". Please note that both TIBCO EMS and Websphere MQ can be accessed using the JMS API.
Answer: The equivalent of TIBCO RVCM in the JMS/EMS world is 'PERSISTENT' messaging to a durable subscription, more specifcially: use publish(..,DeliverMode.PERSISTENT,..) on the publisher and Session.createDurableSubscriber(..) on the consuming side.
That way you will ensure that every message published to this topic will end up at the subscriber, even if the subscriber is down for a while and that all messages are stored on disk before delivery, so it will survived tibemsd downtimes.
But be careful: unlike RVCM, where messages were stored on the publisher, with EMS messages are stored on the daemon (tibemsd), so one subscriber that is not picking up messages will let the memory and disk of the tibemsd grow and grow. Make sure you configure max_msg_memory and msg_swapping and TEST this !
with RVCM one rouge subscriber might influence only the publishers that are actually publishing to it, with EMS one rouge subscriber can influence memory and performance of the whole system.


Ethereum Virtual Machine in very simple words

Question: Can someone explain in very simple words (non technical) what EVM is? Is it something tangible, like a computer, that all nodes in the Ethereum network have access to? If so, then where is it located? If not, then what is it? A software that all nodes use? How would you explain it to your grandmother? Thank you!
Comment: I admit that up to now there seems to be no one who could explain the EVM in simple terms.
Answer: EVM can be thought as a single powerful computer. The computer can be accessed from the outside world only through nodes.
The biggest different between a 'regular' computer and EVM is that EVM is not physically located in any single place - it is many not-too-powerful sub-computers working together to form a big-ass mega computer.
However, this big-ass mega computer is not mega because of its computing power or speed. It is mega because of its reliability and distributed governance (decentralization): no single entity has the power to take it offline or change how it works. All of its results are 100% predictable (deterministic).
Analogy
Imagine you have a million-dollar bike and don't want anyone to steal it. When someone adds a lock to the bike the bike is more difficult to steal. However, the lock's owner can just unlock the lock, take it with him and walk away - this isn't very safe. So, we get someone else to add also his lock. It's already much harder for any single individual to steal the bike if there are locks from two different owners. The more locks you add the safer it gets.
Bike locks are analogous to EVM's nodes. More nodes does not bring more processing power or more speed to the computer. But the more nodes there are, the safer the system is - no single entity can then alter it.
Comment: Good point @Jannik. Will edit my answer.
Comment: It looks very similar to what happens in Bitcoin: a lot of nodes work on the same problem. And all these nodes can be thought of a one powerful computer. However, there is no EVM in Bitcoin.
Comment: Note that while ants do the same type of work, they don't just replicate each other's work. Twice as many ants are able to collect twice the amount of resources (disregarding network effects, I'm not a myrmecologist -- even had to look that term up). This is different to the Ethereum network where increasing the number of nodes would not increase the computational power of the EVM.
Comment: would the ants analogy become true with [sharding](https://github.com/ethereum/wiki/wiki/Sharding-FAQ) ?
Comment: @Mheni as far as I understand sharding, to some degree, yes. Adding one more ant might not increase anything (except security) if it does not result in a new shard, though.
Answer: Quoting the yellow paper:

The execution model specifies how the system state is
  altered given a series of bytecode instructions and a small
  tuple of environmental data.  This is specified through a
  formal  model  of  a  virtual  state  machine,  known  as  the
  Ethereum Virtual Machine (EVM). It is a
  quasi-
  Turing-
  complete machine; [...]

In other words, the EVM is an abstract model of how a "system state" looks like and how this state is updated. All (full) nodes in the Ethereum network follow the rules defined by this model, calculate the system state on their machine and (as long as they use the same input data, i.e. the same transactions), arrive at the same result.
Comment: According to your answer there should be BVM: Bitcoin Virtual Machine. But apparently there is no BVM. Why is that?
Comment: You're right that there is something similar in Bitcoin, but it's extremely simple: The "BVM" just aggregates transactions. So no one bothered to define a term for it.
Comment: EVM is a collective term for the nodes in the Ethereum network and the following statements are equivalent
1. "Once triggered by a transaction, the smart contract is executed by the EVM"
2. "Once triggered by a transaction, the smart contract is executed by each node in the Ethereum network"
Is this right?
Comment: No, the EVM is not a collective term for the nodes in the Ethereum network. Nodes are comprised of more than just the EVM and each node has its own "instantiation" of the EVM.


Full local server preparing for use full site backup file from hosting

Question: To install CMS from the beginning locally we need LAMP web service stack. In ex. in our Ubuntu OS, usually in var/www/html path will be our site (domain name folder)..
But what from start I have to prepare on my clear OS if: my site was maked and developed on hosting with Cpanel, Softaculous, plugins, themes (some of this instruments or plans on commercial basis - does it have matter?) and etc. and now I want migrate to my home PC? And it is enough just put downloaded backup file into local html?
Comment: What is in the backup?  Are all the WordPress files there, or do you need to install Wordpress?  (It could just contain wp-content which is the WordPress uploads directory).   How about the database?  Do you have a database backup included?
Comment: Only OS installed + standart tools (no LAMP, CMS). That what i have inside:
[link](https://yadi.sk/i/AHdjEhFiBTWTUw)
Answer: If you do anything short of a full bitcopy of the server disk the answer is going to depend on the specific software you are running.
If you are just worried about the website you typically only need to  back up the HTML directory and a database dump.  However depending on the framework this may require fiddling and manual debugging to deduce required server packages to make it work in another environment. This is the most typical  backup.
A common mid-point might be do record all installed packages on the server (how you dump this depend on IS) and back up this, alongside all databases, HTML directories at the /etc directory.


Show ringtones and books in iTunes library

Question: In my iTunes (12.3.2) I want to have ringtones and books show up under library.  But only Music & Purchased shows up under library. I went to iTunes preferences/general and did not get the option to have those two ringtones and books show up.
Answer: Ringtones are called Tones in my version of iTunes (220.127.116.11), and are already shown on the top left of your screen capture.
If not, you can click the ··· menu and edit it to make them always visible.

Purchased books and audiobooks are shown on the iBooks app on OS X and iOS.


Finding Lost Samsung S4 with Lat/Long Coordinates

Question: I lost my Verizon provider Samsung S4 phone while running on a narrow trail surrounded by brush.  The phone no longer has power.  Using Google Location History I obtained that Latitude and Longitude of the phone and have returned 2 times to the location looking for it using hard copies of assorted Google Map views and Bing aerial views centered on the coordinates.  I've yet to locate it in part due to the heavy cover.  Any suggestions?  My wife has an older Android phone powered by Virgin Mobile using Sprint's network.  My guess is if I brought that phone to the same coordinates it may give me a considerably different position (by up to 20 meters?) than the other phone.  Any thoughts on how I can find the phone?  Cell tower reception is also poor for both phones at the location where my phone was lost.
Comment: GPS and especially cell phone GPS will get you only roughly in the area, but you are right, your search radius will be at least 20m of the last known location - assuming that someone hasn't already found it and removed it or heavy rain washed it downhill. Perhaps a good metal detector might help but you will be covering a fairly large area. Good luck!
Comment: Did the phone definitely lose power **after** you dropped it? Do you have a **series** of points leading up to the last known position? Also, it might be interesting to work on a solution to this using some GIS tools - do you use QGIS or something like it?
Comment: If your cell phone has an error rate of 20 meters, your phone could be anywhere in a 40 meter (20x20= 400 meter area) circle.  Granted that is small area but then you need to factor in that the coordinate given could be anywhere in that circle.  Therefore your really looking at doubling your search radius to accommodate this a 40x40 circle (1600 meter area) or .4 acres.
Answer: As the previous comments stated if you have a series of points where it could be, ie the pings as it was dying, you could take a statistical average of them and possibly come up with a good starting point.  "Cell phones triangulate their position using weak GPS sensors and, if you're lucky, positional information from cell phone towers. Some have added the ability to triangulate from area Wi-Fi hotspots, but that only works well in urban environments. All said, you're lucky to find a spot on the Earth with your phone within 50 to 100 feet out in Rural America." (source tri-state engineering)
I would guess your best bet would be to buy/rent a metal detector. Find your most likely central coordinate and attempt to sweep out in spiral pattern radiating away from your central coordinate point (ie your most likely last position)
As others have said your phone could be anywhere within the circle of a radius 20meters.  There is really no way to limit it down any further with the type of GPS reciever your phone came equipped with.
Answer: I would log in to Samsungs page and see if it shows the last position thereunder find my phone. Can also have the option to wipe it or ring it.


15v to 3v LED - resistor vs regulator

Question: I've been reading about resistors vs. voltage regulators, but can't settle on which would be better in my case. I have a power supply for a mic preamp that has 15V and 48V. I want to add an LED to the power switch. Would it be best/most efficient to use an appropriate 1/2 Watt resistor, or a voltage regulator? I have both so I'm not worried about cost, but which is the "right" way to do something simple like this? The regulator I have on hand is the LM317T. I also have a 7805CV, and I think any of the 3 options will work fine with the 15V, but if someone could briefly explain which works best here or point me to some literature on the topic, I would appreciate it!
Comment: The part that confuses people is that your title is "15V to 3V". If you were trying to create 3V from 15V, then you would use a regulator. Since you are trying to light a single LED from 15V, then the resistor is a better choice. Even if you used a regulator, you would still need a resistor too.
Comment: And this is why I'm having trouble...the first 2 answers are opposing...and if voltage regulators are the way to go, is there a better one to use than what I listed? I don't mind ebay-ing a bunch of new ones if something works more efficiently.
Comment: Here's the power supply to help clear things up: http://imgur.com/an3C88Q. The switch you see the back of it I will change to a double so it can also turn an led on when I switch the power on. I'll come off of that +15V line into my resistor/VR
Comment: Bear in mind you may only need 2 to 5 mA rather than the full 20mA for a useful "power on" indicator. A regulator would be overkill.
Comment: The LM317 does have some snags .         It is featured in the  www .badbeetles.com website .
Answer:
I want to add an LED to the power switch.

Any linear regulator or any resistor will "lose" the same amount of power when dropping a higher voltage to a lower voltage. If the input voltage is 15V and the output voltage is 2V then the power dissipated as heat is 13V x current. If the current is 20mA (standard red LED) then the power given off as heat is 260 mW. If you are happy to dissipate that power to activate a LED then a resistor is by far the superior choice because it current limits the LED naturally.
Comment: Heck, size the resistor for 10mA at the led Vf, bright enough for a power indicator, and use a 1/4th W resistor.
Answer: It depends.
What are the characteristics of the 15V supply? is it a nice stable 15V or does it vary? If the supply voltage is unstable is corresponding instability in the brightness of the LED a good thing (because it indicates a problem to the operator)? a bad thing (because it's a distraction to the operator)? or something you don't care about?
The resistor solution is simpler. The linear regulator solution isolates the LED from variations in the supply voltage which may or may not be a good thing.
The linear regulator solution and the resistor solution are both very inefficient (approximately equally so). The efficient solution would be a switched mode LED driver but that comes at a significant cost in terms of extra complexity and is probablly not worth it for a low current indicator LED.
Comment: Here is the power supply: imgur.com/an3C88Q. There's not much to it.
Answer: If you are just driving an LED, you want to control the current, as the LED will set the voltage, so a resistor is most suitable.  For almost anything else, where you want to set a fixed voltage, then a voltage regulator is required.
Answer: Resistors Vs Regulators ...They waste the same amount of power as does an analog constant current source .The expected efficiency is 3/15 or 20% of the options so far.In fact this will make your LED less efficient than the incandescant lamp of last century.If efficiency doesnt bother you then stick to the resistor .If you think a SMPS is an overkill you are probably right.Well you have volts to burn in your circuit so place the LED in series with something that doesnt mind losing 3V and already has a sensible  LED current already flowing .Double check that there wont be big current surges and now you have actually powered the LED for free .I have used the input of a lightly loaded 7805 so the idle current + the load current runs the LED .Remember that the human eye responds in a logarithmic way to brightness just like the ear registers sound .This means that the current doesnt have to be precise.

15v to 3v LED - resistor vs regulator


Can I pursue an MA and MBA simultaneously?

Question: I am pursuing a masters degree in Economics (correspondence). I also want to enroll in a MBA program (correspondence). Am I allowed to do that?
Comment: Same school or two different schools?
Answer: It all depends on the education system of the country in which you are studying; besides to the universities you are going to apply.
Some countries do not allow the university students to study two majors during their higher education period. Despite the case that the student is top student or qualified as a student with outstanding academic activities. For instance, some students who are ranked first or second among similar majoring students, have the chance to study in two majors.
Even if there is no restriction, some universities do not allow their students to study two majors simultaneously because they afraid this affect their progress.
Despite the things mentioned about regulations, it may be allowed but be restricted and students may only have the chance to choose their second major very similar to the first one. I mean, the engineering student may not be allowed to choose law as his second major. Or the chemical Engineering student can only apply for a BSc in chemistry sciences.
Some universities encourage masters students to study in MBA alongside their own major; specially the engineering students as they become familiar with some non-engineering topics and be prepared to accept management roles in their future careers.
In your case, I have to say these things:

You need to ask the university in which you are studying in whether they allow you to study a second major simultaneously.
You need to asses your own ability if you are prepared enough to study a second masters or not. Because an MA in economics has its difficulties and this will get worth when you start your research and thesis. Sometimes, studying a second major will not either help you improve your knowledge and do a better research; or even because of lots of courses and lack of time; you may lose your way for the first major.
You may need to consult your supervisor if he allows you or encourages you to do so besides your masters research thesis.
If you have to pay for MBA, you also need to think about how to pay the fees or find a good fund or scholarship.

If you are not sure about those difficulties, I encourage you to finish your first MA, work for two or three years and then apply for a MBA. I know some good business schools that require the students some job experience before assessing their applications. This way, you may gain most of your academic studies.


Composite Rest Salesforce

Question: Can we use composite(tree or batch) rest to send multiple POST request to third party(non salesforce endpoint) in a single send call ?
Answer: Composite API is for Consuming Data in Salesforce and not for posting data out of Salesforce to a 3rd Party System.
What you are looking for is a custom Apex Callout, You can make callouts from SF via Button, Lightning components, batches, Triggers(via any Async) etc. It depends on your use case.

Composite Rest Salesforce


On page fault, how does Unix determine if the faulting address is in swap space?

Question: When a page fault occurs for a virtual address for any process how does the linux/unix operating system determine whether that page (of that virtual address) was swapped previously present in memory and swapped out to disk (i.e. that page is currently present in swap space) or that page was never loaded to memory before (i.e. that page is not present in swap space)?
Answer: First we need to look at what happens at the hardware level. A page fault happens when the MMU attempts to dereference a virtual address and finds an invalid descriptor for that address. When this happens, the processor executes a trap: it switches to kernel mode, jumps to a predefined address (the trap vector) and fills in some registers to indicate that a page fault happened, and enough information to allow the kernel to determine what the requested address was, what instructions caused the fault, and in what task. I'm giving the general idea here, the concrete details vary between processor architectures.
The trap handler code, which is part of the kernel, examines registers and memory to determine the nature of the fault (the same handler may be invoked for different types of exceptions), the requested address and which process that was previously active. It then consults some data structures that indicate what is supposed to be mapped in that process at that address. Here again the nature of the data structure varies between processor architectures, and also between Unix variants. Some processor architectures have enough bits in an invalid descriptor that aren't interpreted by the MMU to store a swap sector number, in which case the kernel doesn't need to consult any other data structure. If this is not the case, the kernel will consult a data structure that's attached to the process and describes its memory mappings.
The same mechanism may also determine several other things, such as:

The page needs to be loaded from a file, for memory-mapped files.
The memory is mapped but the operation was not authorized, e.g. it was an attempt to write to read-only memory. In this case, the kernel arranges to switch control to the process's SIGSEGV signal if it has one, and otherwise the process is terminated.
An attempt was made to write to a page that is marked as read-only for the CPU, but marked as copy-on-write. In that case the kernel makes a copy of the page.

If the kernel manages to obtain a page in RAM that has the content that the process expects, it updates the process's memory map to reflect that. Then the kernel transfers control back to the process, like on a context switch; but instead of returning control just after the instruction that the process executed, it returns control just before this instruction, so that the faulting instruction is executed again, this time successfully.
Comment: Thank you for the answer, but accepting the other one as it more accurately answers my question.
Comment: You did not mention the most common case: The MMU detects a reference to an address for which no address translation (Page Table Entry) exists inside the registers of the MMU. This is called a "descriptor fault" or a "minor page fault" (this is the related name in the statistics from `struct rusage`) such faults happen at least for those MMUs that do not implement auto-loading of PTEs. MMU management happens in the HAT (Hardware Address Translation) layer driver that is called by segment driver.
Answer: The low level page fault handler in the OS (that is listed in the trap table from the CPU) get's the fault address from the CPU and uses this fault address to check the entries in process's address space description table.
This table contains a list of segment descriptors that each contain a base address and a size. If the address is not in that list. the OS sends a SIGSEGV (segmentati violati).
If the address could be found, the segment table entry that is responsible for the address range that includes the fault address also holds a pointer to the driver functions of the related segment driver.
A segment driver manages the VMEM to background memory actions. If the address is related to swap space, then the name of the responsible driver is anon.
There are many segment drivers, e.g. a segment driver for every filesystem as basically all filesystem data I/O operations are handled via mmap().
Comment: by segment table do you mean Global descriptor table and local descriptor table? As I remember it traverses `mmstruct` to determine if its a SIGSEGV or not.
Comment: The global list is in `struct as`, see usr/src/uts/common/vm/as.h and each entry is of `struct seg`, see usr/src/uts/common/vm/seg.h. I edited my original text, to make it better understandable. The original handler is called "as_fault()"


How can I install a smart switch with only a white and black wire

Question: I have an existing switch that has a white wire at the top, a black wire at the bottom and I'm trying to replace it with a smart switch that requires 2 black ( hot ) wires and a white ( neutral ) wire how do I proceed ? There is an extra neutral wire coming from the bottom of the box as well this is a 4 switch box
Comment: If there is a real neutral, not whites being hot.switch hot, in that box, and all are on the same breaker, you can use the neutral wires.  There are a few buts and ifs.  There are also a few smart switches that do not need neutral.
Comment: There are also 'no neutral' smart switches now made by companies such as Lutron.
Comment: Chantal, wires with white insulation were formerly used not just as neutrals, but  also as always hot or as switched hot in a so called switch loop to connect a switch to a light controlled by that switch. A mechanical switch does not need a neutral; a white wire attached to a switch is not a neutral but is one of the two hot wire that must be connected to a switch. Modern smart switches do require a neutral and so they will have to have a (white) neutral connected to the neutral contact. The two "hots" would be the line hot (from panel)  and the switcched hot going to the light.
Comment: Are the black and white wire going into the same cable and leaving the box?
Comment: A larger photo, and/or multiple photos from different angles, may help us see better what's inside your box.
Comment: Is power to all four of these switches turned off with a single breaker?
Answer: Presuming that the existing switch has worked as expected (turns the light on/off without tripping the breaker), you have a switch loop and no neutral in the box (for this circuit).
It's possible (but unlikely*) that the other neutral wires in this box are on the same breaker and could be used.

If the power to these other white wires goes off when you turn off the breaker that turns off the light, then you're in luck and you can proceed to wire up this switch.

Connect the black from this switch to one black of your new switch
Connect the white from this switch to the other black of your new one.

Note that some smart switches differentiate between "Live" and "load". If yours does (check the instructions and the labeling on the switch), you'll have to determine which wire on this switch (white or black) is the unswitched hot and connect it to the "Live" on the new switch, connecting the other to "Load".

Connect the white neutral from the new switch to the bundle of whites in the back of the box.

If the power remains on to the other wires in the box while the breaker turns off just this switch & light, then you do not have a neutral on this circuit that you can use. (Also, be very cautious of this situation as you may think you have all the power off to a box you're working in but make the painful to fatal discovery that you did not! If this is the case here, assume it's the case in other boxes you work in and double check everything before sticking your fingers in there.)

Take the new switch back to the store and get one that's labeled "No neutral required" and follow the instructions for wiring it.

*I can't imagine why an electrician would have wired power to the light, a switch loop to this box, then carried on unswitched power on the same circuit to the same box - it makes no sense to me, but I'm no licensed electrician. A homeowner doing DIY work may well have ended up in this situation, though, so who knows...
Comment: They not only need to be on the same circuit, but taking the *same path back to the panel* as the unswitched hot -- the chances of that are nil


youtube tracking you though TOR

Question: Recently while browsing on tor I visited a shop on google maps. Later using you tube out of tor it appeared to me a propaganda of that shop.It is something very specific so nothing about coincidences.Does then google let any residue on your computer to track you later? I appreciate your comments , many thanks for the support.
Answer: Any - literally any tracking script - it just tracking you, that's what it's built for! So it's nothing specific related to Google etc... To avoid this things to happen use a disposable VM's fully routed through Tor and do not login anywhere like Google unless you have to. If you've logged in - like in your regular browser using Tor - you will be tracked because Google knows that it's you and it does not care at all how exactly have you reached anything it spotted you on. To have an out-of-the-box solution for disposable VM's try using VirtualBox with a VM templates/overlays or - for an OS-wide scale - QubesOS
Comment: Thanks for your prompt reply,could I ask how to achieve a"VM's fully routed through Tor ".Do you mean setting a VM and then browsing on tor throught the VM?
Comment: exactly like that!

youtube tracking you though TOR


How to understand the meaning of 愛{いと}しさ

Question: I know that from adjective we can make adjectival noun like: 高{たか}い -> 高さ - means high and hight. But how to understand/translate the word 愛しさ? I heard it in one of C-ute songs.
Comment: Since I can't find さ in the J-E dictionaries provides by yahoo and goo, here's the entry from the GG: -さ (-sa)〔接尾辞〕 (性質) -ness; (その程度) (the) degree [amount, extent] of…. EXAMPLES: 静かさ quietness; quiet [⇒静かさ] , 自然さ naturalness, セクシーさ sexiness, 眠さ sleepiness, 重さ weight [⇒おもさ], 困難さ the degree of difficulty, スポーティーなデザインで商品の新しさを表現する express the product's newness [novelty] through its sporty design, あまりのとんでもなさに読むのをやめた. It was so ridiculous I quit reading it.
Comment: Have you looked up さ?  What did you find?
Comment: I can find one relative English translation - `darlingness` - but it is not present in my English dictionary. So it is hard to understand even in English, and after that - my native language is Lithuanian..
Answer: I think I've figured out what you are asking about.
Mental adjective + さ can refer to one's feeling as well as quality invokes the emotion.
I'm not sure I'm able to tell their difference using English words, but you can paraphrase it with 〜と思う気持ち when it means the feeling.
Maybe what you encountered was this kind of usage, where in this case 愛しさ = 愛しいと思う気持ち → あなたが愛しいと思う気持ち ≈ "earnest love for you".


How long it takes to hear from a APS journal

Question: I have submitted my paper to a reputed APS journal. It has been 65 days, and I still did not get any response. Should I contact the editor regarding this? I have two papers published in this journal and last two times it only took around 45-50 days. However, I am in a dilemma, if I contact the editor will he get mad at me. Hoping to hear useful thoughts from you.
Comment: The difference between 45-50 days and 65 days is only two to three weeks. It's summer in the Northern Hemisphere. Many people take days off or in the slow mode. I would wait another two weeks before doing anything if I were you.
Comment: For PRC, PRD, the review time for me and my supervisor was about 2 months for a round (I also have 2 papers published with APS last year). So, I believe you can wait 2 3 weeks before contacting the editor.
Comment: @ user50724 I am curious what is the paper about if you don't mind.
Comment: @MikeyMike its about controlling energy transfer rate/optical switches based on quantum theories. And good news, I got the response and the paper got accepted with minor revisions :)
Comment: @MikeyMike thanks. I think I should wait few more weeks then :)
Answer: As an author, I have had to wait anywhere from three days to seven months to get referee reports back from APS journals.  The time lapse is highly variable, although two months is a typical time.  I wouldn't even start to worry until it has been at least three or four months.  The APS editors are also generally pretty good about letting authors know if there has been an extended delay (most commonly caused, I understand, by a difficultly in finding willing referees).  If there's going to be a really long delay (over five or six months), they will probably send you an e-mail.
As a referee for the same journals, I can tell you that the editors like to hear back from referees within two weeks, but that doesn't necessarily mean the referee needs to submit a report within that time.  Often, a potential referee will take the whole two weeks just to let the editor know that they are not available.  And if they do promise a report, it may arrive another two to four weeks later.
In any case, if you are curious about the status of your article, you should consult APS's Author Status Inquiry System before contacting the editor.  The system (located at https://authors.aps.org/Submissions/status/ ) provides automated information about the workflow status of your paper.
Comment: thanks for your useful comment.  In my case, one referee has submitted the report in two weeks and other referee has not submitted it yet, which makes the delay in the process. Last two times editors waited only two months (or less than two months) for the delayed report and concluded that report will not be received. The decision was made based on one referee report. Anyway, I guess i should not be worried this soon then :) Thanks anyway
Answer: The average length time in review differs between journals but also depends quite a bit on the reviewers themselves. I once had one held up 4 months due to one reviewer, who was ultimately replaced, which then took another 2 months, and that was just the first round.
It is totally acceptable to contact the action editor to ask for a status update, and I don't think he/she will get 'mad'. It's probably common and part of their role to field such questions.
Reviews do often get held up; this will also serve as a reminder to the action editor to make sure everything is proceeding as it should.
Comment: Thanks all I just received the response. It has taken around 70 days.
Comment: Unfortunately that's about average. Hopefully it's positive!
Comment: thanks. That's what exactly my supervisor says. I will wait few more weeks and contact the editor.
Comment: that's true. yeh its very positive :)


What is the execution time spent in the database for an DML or SOQL or SOSL?

Question: Is it possible to find the execution time for a DML or SOQL or SOSL? What are the factors on which the execution time of these queries depend?
Comment: This question is very broad and shows little research effort. Have you looked into any of the official documentation on these three separate topics?
Answer: Set your profiling to "finest", and you'll get items in your log that tell you how long things take.
Here's some examples from some code I wrote in Execute Anonymous:
<code>CUMULATIVE_PROFILING AnonymousBlock: line 1, column 1: [select id from account]: executed 1 time in 27 ms

CUMULATIVE_PROFILING AnonymousBlock: line 3, column 1: Insert: Account: executed 1 time in 1001 ms

CUMULATIVE_PROFILING AnonymousBlock: line 5, column 1: [find 'test' in all fields returning account]: executed 1 time in 100 ms
</code>
To set your debug levels in the Developer Console, go to Debug > Change Log Levels. To set the debug levels in a log, you can also go to Setup > Monitoring > Debug Logs and create a new user trace.
Note that all of these different operations depend on a number of factors, including system load, system cache (recently queried records will return faster in subsequent calls), number of fields requested, complexity of filters used, number of rows found, complexity of triggers, process builder, workflow rules, validation rules, etc processed, number of rows processed for a DML statement, rollup summary calculations, the level of logging that's enabled, and more.
The debug logs can shed a lot of light on performance when you set up profiling, and by checking the profiling information, you can determine which parts are the most inefficient and work towards optimizing your configuration.