Is system administration easier than programming? Does it pay the same?

Question: I have worn a lot of hats in my career and I am beginning to think that Infrastructure and Administration are equal in complexity to the programs running on those components.  Are the pay rates nearly equal?  What does the market say?
Comment: What kind of system administration?  What kind of programming?  What levels of experience?  Which countries?
Answer: Being a sysadmin is one of the fields where, under the proper circumstances, you can set it up so that the better you do your job, the less work you need to do.  The value of this should not be underestimated.
Sometimes you can achieve the same thing as a developer, but it's rarer.
Comment: Sadly I've been at alot of places that think that a sysadmin putting out fires (rather than fixing the root problems) is actually a good sysadmin.
Comment: As a systems guy, if I've done my job correctly I should be able to play games and goof off all day without issue.  If I'm my job wrong I'm putting out fires all day long.  Paying for good sysadmins when nothing is broken is like having insurance.  It's costly to have, but you are glad you have it when you need it.
Comment: A cynic might say that the better you do your job, the more disposable you become. Consequently, you see a lot of sysadmins who don't document anything. They would rather spend all day putting out fires than design the system well enough to run itself.
Comment: problem is alot of company have effort tracking and if you are not logging time doing some ticket resolution or building new server you are consider under utilized and this make someone that keep firefighting everyday the one with highest productivity
Answer: A developer is someone who gets noticed when things go right.
A sysadmin is someone who gets noticed when things go wrong.
Comment: I always said that about installation and testers.
Comment: +1 Very true. More stress being a systems admin.
Answer: I think sys admin is very difficult.

You generally need to maintain programs that you have not written, and with little or no documentation.
Often you have to say no, I find that very difficult.
Instrumentation, or good error message is hardly ever done well enough to be useful (especially the custom software)
Your expected to keep an environment running on the bare minimum and then when recovery is going to take 4 hours everybody is unhappy
Your knowledge needs to be incredible broad
Being able to associate a small change to a failure on a seemingly unrelated section is usually to blame for outages
Usually very strong permissions, that means that you could break a lot of things

I think developers have it easy, and don't take their jobs seriously enough.  I would like to see myself as a software engineer, but that would be an insult to the really good software engineers out there.
In engineering you don't guess at the possible cause of the problem.  You look at the facts / error logs / things that you can use to identify the problem.  Make a hypothesis and test your hypothesis for truth, then and only then do you make a recommendation to resolve the issue that you having on a production server.
I too often see people making wild assumptions, and justify their outrages claim with, that is how I think it works.  Is that an opinion or a fact?  I think that is dangerous and irresponsible.  If you want to go and think about something and give an opinion on it, go do philosophy or something similar.  But when you're working on sites with thousands of users, I don't give a hoot about what you think, tell me what you know for a fact.
I have worked with brilliant server people before, and most often if you as developer say to the server admin, I think the following is the problem, and this is how we can prove in a different safe environment that, this is in fact the problem.  Then we spend some time fixing the problem based on this assumption in a safe environment, and we can then with confidence say that this is in fact the problem.  And follow these steps to resolve the problem on the production systems.  It takes a certain amount of guts, and honesty I think to admit this, and generally people don't want to admit they don't know something.  I think not knowing something is a given, but people that imply that they know something and don't, is lying and dangerous.
I also think that there is an aspect of creativity to software development, however I think good code is often tedious and boring, and above all predictable, simple, and consistent. And those characteristics are generally not associated with creativity.  Software engineering is a science and I wish we can find a better way for developers and the guys and gals that keep development systems going to understand more about each other's jobs.
Rihan
Developer that had the privilege to work as sys admit for the first part of my career.
Answer: As far as I'm concerned I'd rather be paid penuts doing something I love than earning a lot doing something I hate.
Infrastructure can be exceptionally complex, just as complex as the programs, and just as important. A programmer may be responsible for ensuring that his/her application runs as efficiently as possible, but if the infrastructure is sub-standard then it doesn't matter how good their skills are. You can't run an application if your router goes offline every 20 minutes.
If you want to compare markets, then jump on your local job board to see what's avaliable. We've been looking to hire someone in Sydney for a few weeks and there's been precious few applications, which to me says that the IT sector has not suffered downturn from the economic 'crisis' nearly as much as other industries have. Which makes job searching difficult, but security pretty good, so if you have a position you're happy in, and you enjoy it, stay there while you can ;)
Answer: As luck would have it, my boss just wrote an article comparing operations to development: What is web operations? as well as addressing that ops isn't (or shouldn't be) something for failed developers, as it is sometimes presented.
Comment: Maybe not the most popular answer but the one that addressed the specific issues that lead to the question.  Thank you for sharing this link.
Comment: Agreed, excellent article. I find it describes my job pretty much exactly.
Comment: +1 This is a really good, deep article.
Answer: Sys admining and programming have different challenges.
Whether one is easier than the other depends on your personality, strengths and weaknesses and on the environment.
I used to be a programmer, I'm a sys admin now.
Lots more multitasking as a sys admin.
Probably less kudos too. Programmers have easily visible successes.
They add a feature, or fix a bug.
Sys admin's for the most part only have noticeable failures.
The mail stopped working.The shares when away.
On the other hand as a sysadmin, you normally don't have to keep the state of an entire program in your head - at least not as often.
Although in some sysadmin roles there is a lot to keep in your head, especially in complex environments with apps with lots of interconnections.
Sys admins depending on role, environment and disposition, do get to program if they want.
They often write tools for themselves and for other staff to use.
E.g. where I work we have a database with a web front end for managing DNS and generating DNS and DHCP files.
As far as I can tell most places the pay is about even.
In some places I suspect programmers might get a slight edge, but those will be places like banks where the programmer is writing bespoke apps that have billions of dollars going through them. I don't think that applies to "average" (whatever that is) programming jobs.
Answer: I don't think it is fair to compare both fields. They are covering different aspects of the complete process.
Comment: @ Robert : Good example. I am telling the same.
Comment: People get to choose careers so its a pretty fair question to compare them.
Comment: @ Ian: Would you compare a fireman to a plumber? Or either to a diver? After all they both work with water.
Answer: In terms of easier, I think it depends on what/how you go about doing the sys admin. lets say you manage infrastructure for a large corp - it might be easier if you purchase an off the shelf package and configure it vs custom inhouse make it.
And it also depends on how big the getup is - if you work for a small company, where you are the only IT guy, it might be hard to wear so many hats at the same time, where as in a large corp, you are most likely part of a large team, with a few discrete responsibility. And if you work for a big corp, most likely you will be paid "more" doing your job, where as in a smaller shop, you would be paid "less" doing more stuff than - i.e., the responsibility to pay ratio is high in a small shop*.
(*) but the big plus with a small shop is you tend to control things, and the environment tend to be more friendly/family like, where as in a big corp, you would just be a fish in a big lake
Answer: Nothing worth of good pay, or success is easy.
If I can elaborate, it depends on what your goals are.
Finding a meaningful, fulfilling, satisfying role that stays that way is a challenge.  There are some things money can't buy (but can help with though).
The one thing I've found over and over with people happy in their life's work/work in life is that if you do something you love, the money comes.
If you look for the money first, you are not guaranteed happiness, because we all know lots of people with money that have no clue of how to treat others or themselves, before they had money, or after.
I think each can be fulfilling in it's own ways, and they share qualities as well as have their unique parts.  One thing is true for sure.  If you don't do either in your own time, you don't truly love it, and that means you won't get really really good at it, which means you will be less likely to find the great opportunities of success.
Answer: Sysadmins don't get paid monstrously differently to developers, as far as I've seen.  There seems to be some differences in career progression, but if what you enjoy is the doing, rather than the career ladder, then that shouldn't be a big problem.
Answer: There's not much different between salary for a sysadmin and a developer... But about which one is easier, I think system administration is based on experience while programming is based on creativeness. That's why you might find good programmers who can do sys admin well but not vice versa ;-).
Yes, I'm a coder :-)
Comment: If I had a dollar for every programmer who thought this I'd be living a life of leisure. :-)

Yes, I'm a sysadmin.
Comment: I would argue that they are creative with a different set of tools.
Answer: The question shouldn't be which is easier, they are both equally "hard". What really matters is what the individual contributes to their profession. Software developers will not for the majority make good system administrators and vice versa.
What I can say is that both career paths become a bit easier if you understand a small piece of what your counterpart is doing i.e. a system administrator being able to look at code and do rudimentary debugging on it.
A second set of eyes with a different skillsetted brain can spot problems or suggest potential solutions to an entire team of highly skilled developers by simply knowing the extra information that is underlying to the operation of that page/program, etc. and vice versa, a system administrator should be able to take advice from programmers on why a certain aspect doesn't work, etc.
It's not a competition to see who is smarter, who works harder, etc. Everyone brings different things to the table, and it is only by communication and team work that things get done and programs get written.
Answer: Mind you that it are programmers who create the software/tools that make the lives of sysadmins easier... although one could say that about the developer tools programmers use as well ;-)
Actually a good programmer is a lazy programmer... See this answer (on stackoverflow) for an explanation.
Maybe that can be said from a sysadmin as well?
Concerning the pay: I'm a programmer myself (but I think you already figured that out ;-) and inside programming there's already such a big difference in pay (between e.g. a web developer and a embedded c++ developer), I suppose that's the same in system management. It's all dependent on your field of expertise and your experience in general.
Answer: I believe the personality and work ethic of the individual determines which is easy/hard.  I have worked with sysadmins who seem to have nothing to do because they always plan, script, and document as part of their work progress.  Same with programmers... unfortunately I have been fused at more for being "out of work" programming cause I got my stuff done early more than I have ever been fused at being late or behind on a project!
It seems if a project comes in on time or early, the mentality is either we didn't give person X enough work for the time or they missed something... LOL!
Oh well, I guess Scotty had it right, always exaggerate the time it takes to complete something so they think you are a miracle worker!
Both jobs have their challenges and rewards... just do what you love and everything else will fall into place.
Answer: The complexity for a Sys Admin is based around many complex components created by others, all of which have to be understood to a certain level to get them to work together.  I found with hardware and networking components, there has to be a lot of understanding of what's in each and every box.
Whereas the bulk of the complexity of a developer is focused on the section of code he is writing, and he just has to work with interfaces (using the term generically) that others give him, he doesn't have to understand a lot of the nitty-gritty details of their code.
I've seen the pay as being equivalent.
Answer: I'm still at the nascent end of my career, but already I have experienced a role as Junior Programmer and Junior Sysadmin.
I generally agree with the responses presented here, and would like to reinforce the opinion that you should go for a job that aligns with your strengths and minimizes your weaknesses. My tract has been from Programmer to Sysadmin, and am generally enjoying it.
So I wouldn't exactly call one "easier" than the other, it just depends on your strengths.


How to reduce test cases for testing verilog circuits

Question: I have a verilog combinational circuit and I have written a testbench which uses a test vector containing 32,768 testcaes. At the moment I am performing exhaustive testing. How can I reduce the number of testcases while ensuring the circuit is properly tested.
Answer: This depends a great deal on what your circuit does, and what kind of a test you are trying to create.
If what you really want to do is verify that the design is correct then you need to think about what the design is really supposed to do. Look for "don't care" conditions in the specifications for the circuit, and avoid running tests for all of the "don't care" cases.
If you are instead trying to create a manufacturing test, to verify that a device was manufactured as designed, then you need to think about fault coverage. That is, if a particular fault occurs in my circuit will I be able to observe a difference in the outputs? A fault is usually modeled as some node in the circuit that is "stuck" at logic 1 or logic 0. This is a broad area of research and design work, and you would probably want to use a fault simulator to give you quick answers. If your circuit is small enough there are manual ways to devise a minimal set of test vectors.


How strong can multiple encryption be?

Question: Suppose I encrypted a homophonic substitution cipher at the level of syllables, trigrams, digraphs, and individual letter with a Vigenere cipher using the keyword cryptography. I would then encrypt the resulting complex ciphertext with an ADFGVX cipher in addition to using a code. How strong can a multiple-encryption be?
Answer: If the ciphers are different, with independent keys, you can say that it is at least as strong as the first cipher. If the ciphers commute, like with stream ciphers, you can even say that it is at least as strong as the strongest. See Cascade Ciphers: The Importance of Being First.
That's really all you can say in general.
In practice, the combinations you suggest are not cryptographically secure. You would need at least one secure cipher in the mix to have reason to believe it would be. (Though that's not strictly required in theory: a particular combination of insecure ciphers could be secure.)
Answer: In general, all you can say is it can be as weak as the weakest encryption layer, if you're lucky. Edit: It can also be even weaker, for badly chosen components that cancel out some mathematically desirable properties, as pointed out in the comment.
Comment: Couldn't it be even weaker? For instance mathematically, combining two different operations could cancel out terms that provide security.  Also, things like one layer could provide known plain text that is passed into the next layer.

How strong can multiple encryption be?


using unpaired t-test when differences not normally distributed

Question: Suppose I have paired data. The differences are however not normally distributed (i.e., we cannot use paired t-test), but the individual data for the two groups are normally distributed and they seem to have equal variances (result from doing a test). Is it better to use unpaired t-test then (since we seem to meet all the assumptions), or is Wilcoxon signed-rank test the better option? I am not sure if I may use paired data for the unpaired t-test.
Comment: Since you seem to be very flexible in what kind of hypothesis to test, you will be most probably better off with a test that uses paired information (higher power). A Wilcoxon signed-rank test is an option, or a permutation t-test.
Comment: "since we seem to meet all the assumptions" -- except independence, right?
Answer: No data are ever normally distributed. Statistical model assumptions are idealisations, and if model assumptions really had to be true, we couldn't do any statistical analysis ever. So it's not true that you "cannot" use the paired t-test. For large samples the t-test can be justified referring to the Central Limit Theorem, and in general there are specific deviations from normality that cause problems, such as outliers or strong skewness, whereas other deviations from normality are harmless. Without seeing the data we cannot tell whether the paired t-test is problematic here or not.
If the data are really paired, using an unpaired t-test is quite certainly worse than using a paired one; the assumption of independence for an unpaired test is usually a bigger problem than the normality assumption. As Michael M. wrote in the comments, The Wilcoxon signed rank test is an option as well as a permutation t-test, but note that the latter (as the standard paired t-test) is based on statistics that are sensitive to outliers, so if there are strong outliers I'd prefer Wilcoxon.
Comment: Since the CLT is a limit theorem that applies to type I assertion probability $\alpha$ but not to type II assertion probability $\beta$ (one minus the power), it is not usually useful in real data settings.  For example the CLT can't fix a problem where you should have taken logs but didn't.  But the assumption of independence is key as you said.  I recommend a better replacement for the Wilcoxon signed-rank: the rank difference test exemplified [here](https://hbiostat.org/bbr/nonpar).
Comment: @FrankHarrell There is probably not that much of a disagreement. There are non-normal  distributions for which the t-test will work well even for small $n$, some where it won't do well for small $n$ but better for large $n$, and some for which $n$ may even be large and things don't work out. The role of the CLT in this is maybe not very central, but where things work one can at least cite it to give some theoretical justification to what is done.
Comment: @FrankHarrell If you specify a fixed alternative with finite second moments and i.i.d. the CLT will apply indeed. There are situations (for example with outliers) where inference about the mean is misleading and the CLT argument won't work to justify the test, but from a theoretical point of view this is as much a problem with the null as with the alternative. (The only difference is that under the null with outliers chances are we'll have overconservativity, which may not be seen as a problem in itself.)
Comment: I hate to bring up an old argument but "apply" doesn't mean "it works".  The accuracy of the CLT may be completely inadequate, and power is more an issue because if you should not be using a standard deviation for example, because of skewness, $\alpha$ may still be OK using the SD but $\beta$ may be destroyed.
Answer: You do not meet "all the assumptions" of an unpaired t-test. One assumption is that the data are independent and yours are paired.
In addition, an unpaired t-test on paired data is almost always going to have much lower power than an appropriate test.  Let's use the example from R help:
sleep2 <- reshape(sleep, direction = "wide",
                  idvar = "ID", timevar = "group")
t.test(Pair(extra.1, extra.2) ~ 1, data = sleep2)

which yields:

t = -4.0621, df = 9, p-value = 0.002833

if we use unpaired instead,
t.test(extra~group, data = sleep)

We get

t = -1.8608, df = 17.776, p-value = 0.07939

But if we follow the recommendations to use Wilcoxon:
wilcox.test(Pair(extra.1, extra.2) ~ 1, data = sleep2)

we get the much more reasonable result:

V = 0, p-value = 0.009091

albeit with warnings about ties making it impossible to get exact p values.


Why isn't ~/.profile sourced when I start the terminal app?

Question: I have created some busybox aliases in the ~/.profile file, but when I open the terminal app, that script isn't sourced and the aliases aren't available. However, when I manually run source ~/.profile, it is run and then aliases are available. What should I do to source this script automatically each time the terminal app is started.
Comment: What term app are you using? Jackpal's Terminal Emulator does allow you to set what commands are executed at startup, so it could be a workaround.
Comment: Yes, I'm using the Jackpal's terminal emulator! Where exactly should I place the commands that can be executed at startup?
Answer: Jackpal's Terminal Emulator has an option that allows you to set what commands are executed at startup. Go to Preferences - Initial command and put the source command there.
Extra tip: you can't execute more than one line of command from there, but if your command requires su, shortening it with su -c should work.


has chrome eliminated the classic avatar menu?

Question: Like many web developers, I maintain numerous profiles in Google Chrome so as to test web applications.  When doing these tests, it is essential to rapidly determine which profile I am in when interacting with Chrome.  I depended on the classic Chrome avatar menu to signal the current profile.  For months now, Chrome has defaulted to a newer profile menu that only showed the current user's name in text (no avatar image).  Until today, it was possible to go back to using the classic avatar menu by navigating to chrome://flags and then disabling Enable New Profile Management System.  Now, doing this has no effect. I was wondering if perhaps there is some other way to enable the classic avatar menu so that my web development tests can proceed as before.
Answer: This is unfortunately a design decision by Google, and it looks like they're sticking to it. When it initially happened, I (like you) set the flag & was able to use legacy icons, but as of this morning the flag itself has been disabled.
Further reading (follow the links to related issues): https://code.google.com/p/chromium/issues/detail?id=512699
I have no idea how much good it will do, but starring the issue and leaving a polite, detailed comment on issue #451920 is a good place to start.


Calculate Current Through each resistor

Question: I am currently attempting this question and I feel like I am over complicating it and previously done questions much more complex than this. Is there any other method to gain the current through each resistor Than using Kirchhoff current law ( loop analysis)?
Comment: Did you ever heard about superposition ?
Comment: No not in relation to this type of circuit?
Comment: For each voltage or current source in turn, short-circuit all other voltage sources, open-circuit all other current sources, and solve for that single source configuration. Then add all the solutions together.
Comment: 1. Loop analysis uses KVL, not KCL. 2. You should be able to solve this problem just by writing and solving the two equations for loop analysis.
Comment: @Neamus here you have an example https://electronics.stackexchange.com/questions/299596/can-anyone-explain-me-how-the-voltage-divider-network-works/299611#299611
Comment: @ThePhoton That the method i usually use, and would like to know if there is any other method.
Comment: You could also do Modified Nodal Analysis. Or just write the KCL equation at the "T" node (calling the "bottom" node ground, and knowing by inspection the voltage at the other two nodes).
Comment: Four options: Superposition, Loop Analysis, Nodal Analysis, Source Transformation.... I suppose the next easiest thing to loop analysis is nodal analysis. It  (almost) works the same way but then you'll be solving for voltages instead. Probably just apply Ohm's Law afterwards.
Comment: @KingDuken, 5. Write ad hoc KVL equations for some other pair of loops than the ones shown. 6. Do MNA with a different choice of ground net than the obvious one.
Answer:
Is there any other method to gain the current through each resistor Than using Kirchhoff current law ( loop analysis)?

First, loop analysis uses KVL, not KCL, so it's not clear which method you think is the "default" way to solve the problem.
Some ways to solve this problem include:

Use modified nodal analysis. Since there are 4 different nets you might choose as the ground net, there's 4 different sets of equations you might get for this method.
Use mesh analysis
Just write the KCL equation at the "T" node (calling the "bottom" node ground, and knowing by inspection the voltage at the other two nodes). This is, of course, just MNA but short-circuiting a few steps that are obvious by inspection.
Use parallel/series combinations to find the current due to each of the two sources individually, and use superposition to find the total current.
Answer: Find the voltage at the tee using superposition formula where || = Parallel resistance.
\$V_{tee} = 12 * \frac{2||6}{4 + 2||6} + 6 * \frac{4||6}{2+4||6} = 6.54545V\$
Then use ohms law to calulcate the currents from there.
Full description of that formula is G36's answer here.
Answer: If all you know is how to compute Thevenin equivalents for voltage divider pairs, if and only if one end is already grounded, then you could follow this recipe:

simulate this circuit – Schematic created using CircuitLab
The first step is to pick a convenient node and to assign it to "ground" as \$0\:\textrm{V}\$. The next step is to continue getting rid of some of the clutter in the schematic, so dumped the voltage sources and just replaced the node end points with voltage values, instead. Nothing has changed at this point, except to simplify what you are staring at visually and to remove unnecessary distractions from the schematic.
At this point, you need to start applying the voltage divider rules. Just break \$R_2\$ from the node for a moment and compute the Thevenin equivalent voltage and resistance for the \$R_1\$ and \$R_3\$ pair, replacing the pair with the new voltage and resistance. When that is done, you now have things made a lot simpler but now you have two node voltages neither of which are grounded. If you already know how to compute the value for \$V_X\$ directly, then you could stop at this point and compute:
$$V_X=\frac{7.2\:\textrm{V}\:\cdot\:2\:\Omega+6\:\textrm{V}\:\cdot\:2.4\:\Omega}{2\:\Omega+2.4\:\Omega}\approx 6.545\:\textrm{V}$$
And you'd be done.
But I went a little further here, in case it helps you, by then subtracting \$6\:\textrm{V}\$ from the two nodes, so that one of them becomes "grounded" again, then computed the voltage divider voltage for that, and then finally added back the \$6\:\textrm{V}\$ I'd previously subtracted. I get the same result this way, as well. Depending on your mental preferences, one may be easier than the other to remember for now.

If you learn nodal analysis, then you would write out the following single equation from merely glancing at \$V_X\$:
$$\begin{align*}
\frac{V_X}{4\:\Omega}+\frac{V_X}{6\:\Omega}+\frac{V_X}{2\:\Omega} &=  \frac{12\:\textrm{V}}{4\:\Omega}+\frac{0\:\textrm{V}}{6\:\Omega}+\frac{6\:\textrm{V}}{2\:\Omega}\\\\
&\therefore\\\\
V_X &=\left[\frac{12\:\textrm{V}}{4\:\Omega}+\frac{6\:\textrm{V}}{2\:\Omega}\right]\cdot\bigg[4\:\Omega\:\vert\vert\: 6\:\Omega\: \vert\vert\: 2\:\Omega\bigg]\\\\
&=\left[3\:\textrm{A}+3\:\textrm{A}\right]\cdot\bigg[2.4\:\Omega\: \vert\vert\: 2\:\Omega\bigg]\\\\
&= 6\:\textrm{A}\:\cdot\: 1\frac{1}{11}\:\Omega \approx 6.545\:\textrm{V}
\end{align*}$$
Solved as shown above.

Calculate Current Through each resistor


What is the origin of the hard drive light?

Question: In practically every computer I've had, there's always been a light to display hard drive activity. What's its origin and original use?
Comment: To my recollection, going back to the late 60s, there has (almost) always been an activity indicator light on the hard drive.  The one case I can recall there not being one was on the HP head-per-track disk in a HP 2000B time share system.  In that case, since there was no arm actuator there was nothing to indicate activity for.
Answer: Well, I can say, as an engineer for MiniScribe (later Maxtor), it's exactly what it appears to be. It's an "activity" light. It was a way for us to tell that a command had been received through the interface and was underway. It was a debugging tool for those of us who, you know, built disk drives.
Comment: @RCIX, as opposed to what, *growing* drives?
Comment: You mean, they arn't delivered by a stork? ;)
Comment: People **build** those still? ;)
Comment: Stop this silly talk. We all know that harddrives are baked from the finest ingredients.
Comment: @Synetech: i thought all of our equipment was assembled by nanodevices in vats of mineral-rich fluid!
Comment: @RCIX Watch out for that [goo](http://xkcd.com/865/)!
Answer: Floppy drives always had activity lights too, as you did not want to accidentally eject the disk while it was still being used.
It was also useful to see if your shell command was being executed as expected.  Hard drives just continued to include what everybody was used to having on floppies.
There was a HDD activity light on the 20MB HDD for my Amiga A500.
Also, if you think about early mainframe computers, the only realtime feedback the operator got was all the activity blinkenlights.
Comment: I also add that if you think about early mainframe computers, the only realtime feedback the operator got was all the activity blinkenlights.
Comment: Can I +1 a comment?! The word *blinkenlights* demands an upvote!
Answer: Sometimes it's useful to know if the hard drive is active. For example, if the machine isn't responding in any way, but the hard drive is active, it may be that the system is overloaded and swapping physical memory to swap, but hasn't actually crashed. If this is the case, it may be best to wait for the slow operation to finish, rather than rebooting the machine.
These days, Windows is more stable and multi-task scheduling tends to work better, so there are probably fewer cases where it is useful.
Answer: Long hard drive operations usually occures when user is waiting for something, for example loading game - when a screen can be black. I think this is some indicator, that have to tell user, that computer doesn't hang up, and some task will be completed after a while.
Also when there is too few ram memory, old computers lose lot of speed and because of swp file and not that stable and complex OS's like today - it can appear to be hanged, it's helpfull to user to tell him that computer is working on some data and be ready soon.
Answer: As a side note, and some extra historical information, the HD LED on cases and motherboards is an overall (ie, aggregate) activity indicator for all of the (IDE, SATA, SCSI, etc.) drives in the system except floppies—watch the LED when burning a CD/DVD; it shows the activity for the HDD and the optical drive.
However, as seen below, most hard-drives in the past had a 2-pin connector on the circuit board (and even today, some may have them, though likely without the actual pins in place, thus requiring some soldering) that could be connected to an LED. That means that each hard-drive could have its own activity indicator (optical drives don't generally have the LED connector). That said, in those days, (consumer) systems were generally limited to two (or at most four) IDE drives anyway.
It was quite cool to have multiple LEDs to show the activity for each drive and was a sort of "mod" at the time.

These days, software is more suited to showing the activity for each drive.
Answer: Need for Hard-disk LED lights

The hard-disk LED normally flickers on when the hard disk is being accessed.
Hence it gives you a visual indication of how active your system is, and can help ensure that you don't shut off your system while the hard disk is active

In older Computer this LED was connected directly to the hard-disk.
Now-a-days they connected to the motherboard which is preferred in-case
you have more than one hard disk so that the system can activate the light whenever any of them are accessed.

Just to inform that if your hard disk doesn't have an led indicator then you may simply use this software http://www.hddled.com/
Comment: $20 for a program that does just as much as a $1 LED _and_ only on Windows?
Comment: FloatLED ( http://www.stone-oakvalley-studios.com/index_software.php ) does the same thing as HddLed and is free
Comment: People on the ThinkPad forums have been buying it for their X100e netbooks (very nice for a netbook, but not a proper ThinkPad, like a T or X series).  I'd probably get that program if I bought an X100e.
Answer: The disk activity light looks like a cylinder because early hard disk drives for mainframes consisted of large cylinders of platters and corresponding sets of read/write heads. The disk stacks themselves on those drives were designed to be physically interchangeable. Shown here is an IBM 350 disk unit used with the IBM 305 RAMAC computer, which dates back to the 1950s.

The main purpose of the light is to allow the user to determine if the system is busy due to disk activity. Before the advent of solid-state drives, long load times for the OS and applications were the norm, and while one could hear the hard disk seeking, the light was a much more reliable indicator of disk activity since sequential I/O is not noticeably noisier than disk idle. If the system seemed stuck but the disk activity light was on, chances were good that the system was just waiting for the disk rather than actually hung.
This still holds true for modern PCs that are configured to boot and run applications from a electromechanical hard drive, but with the increasingly widespread use of solid-state drives which can access data in a matter of microseconds rather than milliseconds, the amount of time the system spends waiting for disk is far less, and the disk activity light is of less value on systems with SSDs. In fact, many newer PCs, especially thin-and-light laptops, omit the light altogether. A more comprehensive way to monitor disk activity is to use Task Manager, which as of Windows 8 can show disk activity.
Even so, the light is still of use to determine if the system is loading data from disk or is completely hung. A computer in normal operation will have intermittent disk accesses; if the system stops responding and there is no disk activity whatsoever for several minutes, chances are very good it needs to be forcibly rebooted. In fact, on my custom-built desktop, there is a disk activity light on the motherboard itself so one could see if the disk(s) are busy (assuming a windowed case) even if the PC is on a table and the case's own disk activity light isn't as readily visible.


Basement toilet Gurgling

Question: I just bought this house. The toilet in the basement water jumps a d gurgles whenever the toilet upstairs is flushed. All fixtures, including the gurgling basement toilet flush/drain good. I also looked into the main cleanout into the main pipe leaving the house and the water is leaving fast and is not pooling up. This problem appears to have existed a long time because I can see the radiator by the basement toilet rusted from water splash.
Answer: Sounds like a problem in the venting.  I don't grok drain venting well enough to know if it's the upstairs toilet or the downstairs one that's not properly vented (maybe both), but the rush of air getting pushed ahead of the flush needs to go somewhere, and that's what the vent stack is for.  If the vent is clogged or nonexistant, the air will find the outlet it can (in this case, the downstairs toilet).
Comment: Hello, and welcome to Home Improvement. Good answer: keep 'em coming!

Basement toilet Gurgling


I need to create a second Google Account

Question: I need to create an additional Google Account for a new business. What is the best way to structure it?
Comment: This does very much come under: Why do you need another account? Do you mean a separate Google login? Or a separate Ads account? Or do you want an account _for_ your new business separate from your personal Google account? You've tagged this for Ads, but not mentioned it in your question itself, could you clarify that you mean a new Google Ads account or not.
Comment: I voted to close this question because it appears to be about using Google and not about running a website.
Answer: If your original Google Ads account got suspended/shutdown due to violations of some kind, then I don't fancy your chances.
There are limited circumstances in which Google will allow the creation and use of 2nd Google Ads account, however you will need to contact a Google Ads support rep or contact a 3rd party Google Ads partner (they offer paid assistance), in order to have it all setup correctly and not end up in violation of their policies resulting in the new Google Ads account ending up with a suspension too.


How is critical rating calculated in Wizard101?

Question: I have around 30 critical rating in Wizard101. Is that the percent of chance of critical?
Or is it how much extra damage?
Comment: How accurate is this as of Nov, 2015?
Comment: This information is no longer accurate. Critical chance decays as level increases.
Answer: The way critical rating is calculated is that 500 = 100% of critical.
So, 30 would be a 6% chance.
Its basically like this:
500 = 100
30  = x
where x is the % of critical.
If you get a critical, you deal double the damage you would have normally done.
Answer: Divide your critical strike rating by 5 and that is the percent chance you will critical.


How do I have a Cognos 8 Report use data from another Report as a filter?

Question: I'm working with a lot of reports that use the same data parameters in filters. Periodically that data changes and I have to go through every report and change the one parameter so that the filter functions properly. Is there a way I can make my reports reference either another report or file for this filter so that I only have to change the source, rather than going through every report and modifying the filter?
I've tried a few things with the report parameters, but I'm not sure how to have the parameters set to anything other than data from a prompt.
If I wasn't clear enough, please tell me and I'll try to make my question clearer?
Thanks.
Answer: Get your modeler to standardize your filters in Framework Manager, and make them available in your package. Then use the package based filters in your report. When the filter criteria changes, change it in the framework and republish the package. Then all reports inherit this change.


Changing freewheel singlespeed cog

Question: I bought a Soma flip flop singlespeed and the free side cog is a piece of junk. I've ordered a White Industries freewheel cog to replace it and my question is, how is this done and what tools are required? Well, actually two questions. Thanks, JB
Answer: You need a freewheel remover tool which fits the cog you have. Park Tool makes a lot of these, and has some excellent directions for replacing the freewheel here (and in the unlikely event you can't get a remover tool which works, there is a destructive way of removing freewheels, which is a last resort - we will assume you have the tool). Sheldon Brown also has some directions here.
Roughly speaking what you'll do is you'll look at the freewheel you have, buy the appropriate freewheel remover tool and a large crescent wrench or similar. Then, you'll put the freewheel remover tool into the notches on the freewheel and snug up your quick release skewer / axle nut to hold it in place. Then, using a crescent wrench or vise, turn counterclockwise for 1 turn of the freewheel remover tool, and then remove the QR skewer / axle nut. Then, use the crescent wrench / vise to remove the freewheel the rest of the way (still counterclockwise).
Installing the new freewheel is straightforward - apply anti-seize, thread it onto to the mounting threads (take care not to cross thread) all the way, and you're done. It will feel weird at first, but as you ride more, the freewheel will tighten down on the hub. You can also use a chain whip (clockwise) to tighten it down all the way if you want, before you ride (this will prevent the weird feeling).
Comment: Thats why using a vise or a large (like 2 feet long) crescent wrench is useful. Vise is easier since you have less chance of busting your knuckles.
Comment: I actually did this a couple of years ago but couldn't remember exactly what I did. I do remember that the old freewheel was a total nightmare to get off, just down to how tight it had become. But you just need to brute-force it - I think I resorted to a mallet. White is a good choice btw - top drawer.

Changing freewheel singlespeed cog


Is there a way to Increase the "Thickness" of an Empty?

Question: The empties are really thin and hard to see sometimes. Is there a way to increase the thickness of the empties?
Answer: AFAIK you can't increase the thickness per se but you can use another object as a proxy easily with the collection instance feature.
Create a new collection, add an object inside it eg a simple Icosphere, reset its location with ALT + G, add a Wireframe modifier.
In the empty object properties, expand the Instancing panel and select your newly created collection.

You can also use a Grease Pencil object, or any other type of object.

Don't forget to disable rendering it you don't want it to appear in your renders.


What is the SSMS option "Execute stored procedure shortcuts without additional execution options"?

Question: This is a wordy option; there is no documentation and web searches are no help. When I'm executing queries, I don't notice a difference with the option checked or not checked. What does this setting control?
Answer: This is certainly a wordy option and it seems a bit ambiguous to me. You could take "stored procedure shortcuts" a number of ways; initially, I did not reach the conclusion that these were actually referring to the "Query Shortcuts" panel in Tools > Options > Environment > Keyboard, mainly because I was asked a question about them when I wasn't staring at the dialog (the option is, of course, on that very panel).
The option was added in response to the following Connect item (which has been orphaned because Microsoft killed Connect due to GDPR):

Connect #266994 : Allow shortcuts to be configured with specific execution and results options

There, Simon Sabin pointed out that if you execute a stored procedure using a keyboard shortcut (e.g. Alt+F1 for sp_help, or Ctrl+1 for sp_who), that execution would obey any query options you had set for the underlying query window (e.g. SET STATISTICS TIME ON;). This isn't always desirable (the example Simon used was getting a bunch of graphical execution plans when hitting Alt+F1).
So:

If you expect these query shortcuts to execute with all of the same options as the current query window, leave the box unchecked.
If you expect these query shortcuts to ignore any existing query options, check the box (and open a new query window, as it doesn't affect current windows).

Unfortunately there isn't a way to customize this per shortcut, as Simon requested, so you'll have to take it all or nothing.
Comment: Thanks Aaron. Such a little enhancement to such a wonderful feature.
Comment: Part of me wants to ask, "why on Earth would they expand the usage of a clearly incorrect term -- _Stored Procedure_ -- which is the unfortunate header for that column, when they had the opportunity to fix the column header to instead be _Query_ (which it very clearly is) and then use that correct term for this option -- _Execute query shortcuts without..._?". But, then another part of me doesn't really want to know ;-).


Who compared developmental biology to crystallography?

Question: I need to find out the name of a nineteenth century biologist who compared developmental biology to crystallography. His idea was that crystals are formed from 'cells' (defined molecular units) that bond together to form arrays. In living organisms cells are bound together but the rules that form the structures change as the organism grows, especially in animals, which is why we have different organs. In both cases you have units that coalesce undirected but according to rules to form structures. I remember finding out about this biologist from a documentary which also showed illustrations from the book he wrote on the subject. I can't find his name or that of his book using a web search because it's too obscure and that would only work with the correct terms. Does anyone know anything about this?
Answer: The idea to compare biologic cells and crystal is mostly related to a German physiologist Theodor Schwann (1810-1882):

His work "Microscopic researches on the Conformity in Structure and Growth Between Animals and Plants, 1839 relates to this idea.

He believed that new cells form principally outside pre-existing
  cells, and wanted to draw an analogy to crystal formation.

another source:

The cell is the unit of structure, physiology, and organization in
  living things. The cell retains a dual existence as a distinct entity
  and a building block in the construction of organisms. Cells form by
  free-cell formation, similar to the formation of crystals (spontaneous
  generation).

(other related scientists are Schleiden, Virchow, Muller).
Comment: I think that's him, his main book was Microscopical Researches on the Similarity in the Structure and the Growth of Animals and Plants. But the analogy with crystals breaks down when it comes to their origin - cells don't spontaneously generate, which he helped to prove.


php redirect based on information after .com/THISINFO

Question: I have researched previous questions and either I don't understand the answers or I'm too tired.
Either way. I want to do this..
someone enters blahblah.com/STUFF into their browser
There is no blahblah.com/STUFF file in the directory, but I want to pass STUFF to a file in the directory.
Just thinking out loud here, someone does blahblah.com/STUFF how do I post STUFF to a php file in the directory? Then with that posted variable of STUFF I can redirect within the PHP file to another page.
Some posts say have .htaccess in the directory, but I don't understand their syntax.
Thanks
Answer: RewriteEngine on
RewriteRule ^STUFF /index.php


Autocorrelation and trends

Question: What is the relation between the autocorrelation and the trend? Can a trend exist in a time series of independent variables? And in time series with a non-zero autocorrelation, does a trend always exist?
Comment: Auto correlation has a precise definition. As far as I know, "trend" does not. So, the answer will depend on how you define trend.
Answer: The autocorrelation(acf) function summarizes the correlation of different lags and is a descriptive statistic. If there is a "trend" in the data then the acf will suggest non-stationarity. However a non-stationary acf does not necessarily suggest a "trend". If the series is impacted by one or more level/step shifts the the acf will suggest non-stationarity (symptom) but the cause is simple a shift in the mean at one or more points in time. "Trends" in time series can sometimes be adequately handled by incorporating a deterministic structure. There are a few forms ( the software package needs to help here and/or the skilled analyst ) to determine which form is the most adequate. One form is to incorporate a predictor series(x1) such as 1,2,3,4,..n which would imply one and only one trend. Another might be to incororporate two input series (x1 and x2) where x1=1,2,3,4,,..n and x2=0,0,0,0,0,1,2,3,..n reflecting two trends where the second trend starts at period 6 in this example. Of course there could be multiple "trends" or breakpoints in trend.
An alternative way of incorporating a "trend" is to model the data as some variety of a differencing model of the form (1-B)Y(T) =  constant + [theta(B)/phi(B)]*A(T) which suggests one and only 1 trend . Good analytics will suggest the "most correct" approach to an individual data set. If you have exogenous/causal/supporting/input series then the "trend" in Y could well be explained by one or more of these series. The acf is of little or no help in helping you decide which "trend model" is appropriate.
Comment: If there is a trend then for any of the possible cases that I mentioned there will be a correlation between sucessive values which is also called auto-correlation
Comment: Not necessarily so ! ... Because if there is a "trend" AND there are unusual values (pulses) or other Gaussian Violations ( e.g. time varying variance/time varying parameters et.al. ) the variance is inflated. Since the acf is the ratio of the covariance to the (possibly inflated) variance there is a downwards bias to the acf causing one to incorrectly accept the hypothesis of a non-significant(null) acf. This is called the "Alice in Wonderland effect" where everything looks rosy BUT it is not because the glasses your are looking through are not opaque.
Comment: Thanx, I have a question about your answer. What exactly means "If there is a "trend" in the data then the acf will suggest non-stationarity."? That there is a correlations in acf?
Comment: So, in few words, we can states that no auto-correlation, then no trends. Isn't it?
Comment: oops.. I meant to say the glasses you are looking through are opaque and consequently your view may be (is) distorted.
Answer: Autocorrelation function (ACF) is an theoretical object related to the population moments. What happens when these moments do not exist as finite?
Sample autocorrelation function (SACF) is a descriptive statistic and is a function of sample moments, mainly sample mean. What is a breakpoint value for the sample mean? Is it small or large? If you know these then you would know what are dangers related to inference from these sample values.
Objects calculated from the sample always exist, though it will be probable that these estimates do diverge when underlying population moments are not really finite or process goes through somekind of change.
Regards,
-A

Autocorrelation and trends


Is the Dassault "ministop" related to the Dunlop Maxaret ABS?

Question: Dassault fighters e.g. Ourargan and Mystere had Anti-lock devices called "Ministop" on main landing gear brakes.
Anybody has a picture / drawing / detailed description ?
Is the Ministop related to the Dunlop Maxaret ABS ?
Comment: It has been built by Messier. On page 141 and next of [this book](http://www.eurosae.com/pdf/comaero/Veaux_Trains_d_atterrissage.pdf) in French, dedicated to landing gears, the author compares Messier and Dunlop systems: "*Ministop consisting of an accelerometer driven in rotation by the wheel and controlling an electrical contact releasing or cutting hydraulic pressure when the deceleration exceeded a defined value (on/off system). Used on Mystère IV, Super Mystère B2, Mirage III, Mirage IV. In 1962 the Ministop was the subject of a testing campaign On Mirage IIIC n°01 at Brétigny CEV*"
Answer: This 1953 issue of Flight International mentions the Messier Ministop, it seems it was shown publicly for the first time at the Salon de Paris, July 1953:

A particularly interesting development was the new anti-skid device which is being marketed under the name of Ministop. The device consists of an accelerometer—a free mass rotating with the wheel—together with a centrifugal governor and an associated electrical circuit. The general principle of operation is very similar to that of both the Dunlop Maxaret and the Westinghouse Decelostat ...

From that wording I'd say Ministop is unlikely to be a license-built version of Maxaret.


Sound Engeneering and it's true colour

Question: Could you please give some information about sound engineering? What does a sound engineer do? What kind of profession is it? What are the pros and cons of it? I've always wondered about how it is like to be a part of entertainment business!
Comment: Welcome, Efe! There are many ways to define "sound engineering": Live sound, post-production sound, music recording, etc. Can you be more specific?
Answer: I'll talk about the facets of audio engineering that I have experience with. There are a lot more facets though, like radio.
Live sound
This is where I started. It takes quick work periodically, and then usually just staying on top of volume levels as the night goes on. Sometimes bands will have cues for you to follow. But not so much at the shows I worked (fairly small).
Post-production
Most sound for movies is added afterwards. If dialogue can be recorded as the scene is filmed, that's great. Often you are just getting scrub audio to help people voice act it later.  There's also sfx, ambience, and music that needs to be placed. When I say placed, as an engineer, I mean both in time (synching the audio with the visual cue) and in the mix (reverb amounts, volume, EQ curves for distance and whatnot).
Foley
I am separating this from post-production because it's a field I love. Google Foley to watch some amazing videos of it.
Foley is recording sounds for things like walking, doors opening/closing, tire squeels, etc.
The technique involves watching a scene and recording (for example) shoes clapping on concrete in time with the person on screen. Then you go back and rub cloth together in time with a person moving their arm, rustling their clothes. You do this over and over catching each element, then move to the next scene.
Studio recording
You place mics, test the sound, adjust the mic, test again, and repeat. Then try to set up headphone mix, good luck.
All joking aside, there is a lot of minutia (like mic placement) to keep in mind. You also have a band (most often, for me) that you need to be courteous and patient with.

Sound Engeneering and it's true colour


RPi can't get IP address

Question: my RPi using Raspian, connected to a switch using DHCP, and I remote it by SSH. the first time I found RPI's IP by switch IP table and accessed successfully , but after reboot, I can't connect to my RPi  anymore, and it's IP not in switch ip table as well. After many try, unplugg to connect and nmap to find ip, I figured out that : RPi have IP address when  power on RPi without connect to switch for 10 -20s and then connect it to switch,  I nmap to find it's IP. This problem is so annoying :oops: , I can't access it after reboot.
Comment: have you considered trying different switch or connect directly to the router?
Comment: can you clarify why you think the switch is relevant at all in this context, and can you let us know what DHCP server you are using? many offer "reserved" IP addresses that can guarantee to always provide the same IP address to a specific device, even after reboots.
Comment: Did any of those answers help to solve your problem?
Answer: In terms of networking the first thing i would check in the following order:

Check the physical connection.
Check if the router is registering the raspberry pi connection.
(If it isn't restart your router)
Check if the raspberry pi can directly connect to the switch or router (as close to the desired destination)
If you are still experiencing problems, just do a general connectivity test without any advance settings, and if it works apply the relevant network connection changes while monitoring the connection on the router/switch.

(Doing a trace route can also solve a lot of problems troubleshooting wise)
Answer: Are you sure that your switch has DHCP? Not all switches have DHCP.
Posibles solutions:

You can create a script to ping all posible IPs.
Also yo can conect a monitor and a keyword to RPi and see the output of ifconfig command in RPi.
Other posible solution is connect direct to RPi and asign a fixed IP, then when you connect to switch the RPi have the fixed IP.
Answer: You can use a dynamic domain name server like DynDNS if there's internet access to keep track of the IP address. Alternatively, your router may do this automatically. On my network a simple "ssh raspberrypi" almost always works because when the DHCP lease is requested, the Pi sends it's domain name along, which the router then puts in its local DNS service.
Answer: Please check /etc/hosts and /etc/hostname for the name of your system or set it to your wishes. Preset values may differ with the flavour of your OS (e.g. "raspberrypi"). Within your own subnet, that is behind your switch/router (assuming reasonable hardware and software on all parts within that network), you should be able to connect to your RPi using that hostname.
Further reading:

man hostname
https://www.movealong.org/hostname.html

RPi can't get IP address


Comparing two numbers without using a calculator

Question: I need to compare $\frac{3}{2}$ and $\ln 3$ (which is the same as $\log_e{3}$). But I need to do it without any computer etc. Thanks in advance!
Answer: Hint: $e* \sqrt e > 2.5  *1.5 >3 $
Answer: Exponentiate both and compare the results.
Note that $$e^x=1+x+x^2/2 +...$$
Therefore $$e^{3/2} =1+3/2 +9/8+...>3$$
Thus $$3/2>\ln 3$$
Answer: This is the same as comparing $e^{1.5}$ and $3$ by exponentiating both terms.  But $$e^{1.5}=e\cdot e^{0.5} \gt e\cdot 2^{0.5} \gt 2.7\cdot 1.4 \gt 3$$
Answer: Hint: compare $e^{1.5}$ and $3$. Should be able to do it knowing that $e \approx 2.7$
Answer: Use the beginning of Taylor's expansion for $\mathrm e^{\tfrac32}$:
$$\mathrm e^{\tfrac32}>1+\dfrac32+\dfrac12\,\dfrac94=\dfrac{29}8>3.$$


Superposing waves to create visible light

Question: I have a question: Is it possible to create visible light using two other non-coherent waves from the electromagnetic spectrum for example superposing infrared and ultraviolet to create visible light?
Comment: No. Visability depends on the wavelength. Superposition of two waves in classical EM-theory does not alter the wavelength of the resulting wave.
Answer: Color vision is based on the response of cone cells in the eye to different frequencies of light.  For humans (with full color vision) there are three types of cones sensitive to different frequency ranges at different levels.  Each individual photon in your superposed wave will be of a specific frequency, which for your question you've assumed is outside the visible range, i.e. outside the sensitivity region of any of the cones.  Hence even if one of those photons hits a cone cell, it will not generate a response at the cellular level and will therefore not be perceived by the brain at all.  It doesn't matter how many different frequencies of photons you superpose - if none of them are in the visible range then none of them will stimulate any of the cones.


What documents should I have when entering Kuwait on a visa?

Question: Should an Indian passport holder carry the original visit visa documents or is a copy of the valid visa enough while travelling from Canada to Kuwait?
Answer: To board the plane, you need to show a copy of the visa. The original visa should be deposited at the airport by the receiving party (there is desk for this in the arrivals hall).
You don't need a return ticket or hotel reservation.
On arrival, walk to the visa desk. Give the officer the copy of your visa, they will then confirm your arrival and hand you the original. Walk to the immigration counters and get stamped into the country.
Answer: These documents are needed

Kuwait Visa
Hotel Reservation / Stay details (You need to provide that address in immigration form)
Return Ticket

If you are transiting, make sure transit visas are there, if applicable (esp Heathrow).


Why does air vibration produce a spherical wavefront and not a plane wavefront?

Question: I want to know why the back-and-forth vibration of a material produces a spherical wavefront, for the produced sound wave, and not a plane wavefront.
Comment: You don't say which material object you are talking about! Some may produce plane wavefronts, others spherical or even more complex shapes.
Answer: Assuming that the question is related to sound waves in air, then when an object sets air into vibration, it sends out sound waves in all directions away from the point of vibration.
This creates spherical wavefronts because the sound spreads out evenly in all directions, forming expanding spheres.
Plane wavefronts, on the other hand, arise from the vibration of large, flat sources (like a large speaker) or from viewing spherical wavefronts from a great distance, where they appear flat due to the vast scale.
Answer: Introduction
The assumption that the vibration of objects (the shape of the resulting wavefront is not dependent only on the material but other factors too) produces spherically expanding waves is wrong. Spherical waves constitute a, rather convenient, mathematical model of the resulting wavefield of a monopole source. Complex sources (in shape and characteristics, such as non-isotropic materials) do not radiate spherical waves and have complex radiation patterns. Below are some radiation patterns of various objects as found online.

Simulated loudspeaker.

Studio monitor and Flat loudspeaker prototype radiated pressure per frequency and angle.

$\mathbf{3}$D radiation pattern of an iPhone.

Why?
So, as you can see, most (if not all) real sources do not radiate omnidirectionally (spherical waves). At frequencies where the wavelength is way longer than the largest dimension of the source, spherical wavefronts are a rather good approximation of the actual radiation pattern, since all vibrating particles are positioned are pretty much the same phase of the wave, resulting in vibration with all particles moving with the same amplitude and phase. However, for higher frequencies the modal behaviour of sources makes particles of the source vibrate with different phases and amplitudes at different positions on the source surface. Below is an image with vibration patterns of a square plate where you can also see the frequency for which the pattern occurs. More complex surfaces with complex boundary conditions may exhibit more complex patterns.

Now, when a source vibrates in patterns like those shown above, neighbouring areas with vibrations that are of opposite phase will "cancel" each other out, resulting in what is known to be evanescent waves (see Wikipedia's page) where there is energy stored in the system and the air molecules oscillate back and forth between the two areas, close to the source. You can see an animation below of a vibrating plate. Notice the movement of air particles/molecules close to the source.

In evanescent waves, no energy propagates far from the source. Of course, this is an approximation and almost always radiation is achieved, but in the evanescent waves case the efficiency is extremely low.
Furthermore, the radiation patterns resulting from sources with complex geometries, such as those shown in the first figures, are non-isotropic and frequency-dependent. As you can see, the radiation of sources is anything but omnidirectional.
Answer: "Why" it expands spherically is because that's what it does.  Science has equations to describe it, and they can be used to show spherical wavefronts, but fundamentally it does because it does.
You can get some intuition with a sandbox.  Use your hand as a speaker, and shove some sand forward.  Sure, at first glance the sand moves forward.  But look closer at the edges.  You'll see that when you move your hand forward, the sand doesn't move forward per-se.  It moves in the direction of least resistance.  For some of the particles, that is indeed forward, but if you look at the edges, its easier to move out of the way.  Indeed, if you repeat this with a pile of sand rather than a sandbox, and push it far enough with a flat surface, eventually all of the sand will have moved out of the way, leaving a snail's trail of sand that moved sideways rather than forward.
Now that analogy has its limits.  Sand doesn't move all that similarly to sound.  And our hand is really big compared to the space we're looking at.  Speakers are typically small compared to the area (if you put a speaker in a tube, the sound waves will indeed be planar).  We need something that's closer to the situation you're thinking of.  But it is nice to start with because sand particle are visible.  It's harder to think of sound waves because the particles are tiny and their motion is even tinier.
It turns out ripples on a pond and sound in a room behave similarly.  They both get captured using "wave equations."  Go find a pond or a pool, and bring a small piece of flat wood, like a discarded piece of 2x4.  Put it in the water and gently push it forward to create a ripple.  Watch how that ripple moves.  For a short while, the ripple will be planar in front of the wood, but starts to curve near the edges, where the path of least resistance encourages particles to move sideways instead.  As they peel away, particles closer to the center start to get a path of least resistence that's a bit sideways as well, so they start to deviate.  At some reasonable distance from where you made the ripples, that curve has gotten so similar to a circular wave, that we just call it circular. (pond waves are circular -- two dimensional.  sound will be spherical in 3d)
Incidentally, we call this the "far field effects" of your source.  The far field effects are what you get when you're far enough away that the size of the original source doesn't really matter much.  In the far field, waves are all spherical (well, I'm sure there's some analyses where we don't treat them that way, but hopefully you get my meaning).  We also study "near field" effects, where the size does matter.  Near field would capture the reality that the wave was almost-planar when it was close to the block of wood.
When you hear "Near Field Communications," NFC, in the cell-phone and bank card world, that's actually what they're talking about.  NFC is designed to transmit information using signals that vanish towards 0 in the far field.  They're only detectable in the near field.  That's why the card reader can't detect your card until it's right up near it.


Why do my Chilli plants have curling leaves, falling flowers, and ants?

Question: My Chilli plant leaves are curling, the flowers are falling, and a lot of ants are traveling all the way to the place where the new leaves and flowers are shooting. I have tried burying banana peel pieces in the soil, but no go.
Any help appreciated.
Comment: Hi Sachin! We can help you better with some more details. Would you please post some pictures of your plant, especially a close-up of the sick leaves, and the stalk with ants? Is it in a pot? Indoors or out?  Anything you can think of would be great! You can [edit] it right into your question. Also, if you press on the tag [tag:chili] you'll find a number of questions which might help you. Welcome to the site!
Answer: Inspect the plant closely - its likely its infested with aphids (blackfly, greenfly, whitefly) of one sort or another, and ants like to collect the honeydew the aphids produce. The ants are a symptom of infestation. Spray with neem or a suitable insecticide for edible plants available where you are.
Comment: Definitely aphids. Weather and predators seem to keep them at bay when outdoors during the warm months, but as soon as I take them indoors to overwinter them, the aphids come and make the plants life miserable. If you don't want to use insecticide, showering the plants with high pressure water every once in a while will get rid of most of them and clean the honey dew.


Reward always Zero

Question: Again I need your help. I created a fork of Monero. In the first version I only changed the crypto name, but all other values are the same as Monero. My problem is, I found around 300 blocks, but the reward is always zero. My wallet has its balance and unlocked balance as Zero. Could you help me? What did I do wrong? Thank you!!
Comment: Nobody can tell you what you did wrong without seeing your code. You clearly changed more than just the name. Did you change the pre tail emission supply or emission curve? Does your payout address for mining rewards match the address of the balance you are checking?
Comment: Thank you Jun Li...I will fork again and begin from the start again...Thank you very much!!
Answer: A bug was recently fixed in Monero, which causes wallets created on chains with very low amount of blocks to mistakenly skip blocks. This will be corrected in the coming release, and is already fixed in Monero master, so if you update and recreate your steps, it should now work. You can also use your existing wallet by running "set refresh-from-block-height 0" in monero-wallet-cli after updating.
See https://github.com/monero-project/monero/pull/2542 for the fix.

Reward always Zero


The differences between BNF and JSGF in NLP?

Question: I wonder what the differences are between the BNF(Backus-Naur Form) and JSGF(Java Speech Grammar Format)? The former is a kind of context-free grammar taught in CS224, but I learned that the latter is also being used. Could anyone tell me which one is better and what are their differences?
Answer: BNF (Backus normal form) is a general framework that can be adopted to a variety of contexts.
JSGF stands for Java Speech Grammar Format, thus is designed to work the Java programming language.
If I wanted to leverage a larger community of knowledge and have my work compatible with as many systems as possible, I would use BNF. If I was coding in Java, I would use JSGF.


Magento - percentage discount for shipping

Question: I'm looking for extension or way how to set up cart price rule in magento. I need to set up 100% discount on shipping when total price of cart is higher then.. Why I need this? Because I'm using function which calculate (maximum) shipping distance by google matrix api.
Does anybody know how to do it? I have seen some shipping extension where I would be able to do it but it costs 99$ and it too much since I use just this one little function.
Thank you in advance.
Answer: Please use promotions - shopping cart rules. And set up free shipping discount type for your cart conditions.
Comment: Thank you for your answer but I'm unable to set percentage discount only for shipping. I can set it as percentage discount for products price but not for shipping. Am I missing someting?
Comment: Set amount to zero and select the free shipping option at the same form.
Comment: With this solution I can set free shipping, that's true but I need to set discount for my regular shipping method because I need to check if customers are in our 10 km distance area or not, my extension does by google api matrix..


Horizontal swiping for wide tables with too many columns in mobile

Question: working on a size chart for a apparel e-commerce app. there are some extreme cases were some products seem to have so many sizes. the layout of the table isn't changeable. so i think the best solution would be introducing a horizontal scroll. which of these options to you think is most intuitive to the user
Comment: Of course, you'll want to keep the left column sticky so we can see those labels as we scroll to our own sizes.
Answer: I would go for something like option 3 or 4.  Both of them are pretty clear.  Options 1 or 2, I think, have a greater risk of being misunderstood.
Option 1 looks like an indicator for multiple pages, not scrolling the table.  (I'm assuming that the screen will have more than just the table visible, in which case these dots might make the user expect the entire page will change when they swipe).
Option 2 looks like a progress bar.  Also, even if identified as a scroll bar, it might not be clear that it applies to the table, rather than something else (such as content below it).
Answer: If we're talk about UX, then why do you even need a size chart? Buyer doesn't care about all these letters and numbers, he's looking only for his own size. I'd ask him his sizes (I mean the numbers, 'cause the letters sometimes mismatch with sizes) and offer only apparel with that size.


Uninstalling skype

Question: I installed skype on my ubuntu 12.10 computer, but after opening the program I discovered that I can't log in with facebook, witch is my skype account. so i'm trying to uninstall it. I followed this guide to install it
http://www.tecmint.com/install-skype-4-1-in-ubuntu-xubuntu-linux-mint/
and used the 12.10 option
Comment: Please [edit] the question to use proper capitalization on `i` and replace `witch` with `which` so that English translating software can parse this question accurately.
Answer: You need to know the name of the package that skype was installed as part of. Enter the following:
dpkg -S skype

This should list all the files installed from packages containing the word skype. The name at the beginning of the line before the colon is the package name. Once you've identified the package name you should just be able to run
dpkg -r package-name-here

Comment: I used `apt-get purge remove skype`, which seemed to uninstall everything.  However, when I list packages using `dpkg -S skype` I see about 100 entries... I'm confused about what's happened.  Even after purging / uninstalling the skype window has popped up again.
Comment: if u got 'ubuntu requested operation requires superuser privilege', then simply add 'sudo' before command, and it will be done.
Answer: This worked on 12.04 LTS.
sudo apt-get remove skype

Answer: I am sure the terminal commands in the other answers work, but if you prefer a gui way:

If you don't have already install synaptic package manager via the software center.
Now open synaptic package manager, and enter your password.
In the quick filter search bar type 'skype' look for a package which is currently installed with skype in the name.
Right click on it and click 'mark for removal' or 'mark for complete removal' (if you also want to delete the configuration files).
Now hit 'apply' and skype will be removed
Answer: Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:
sudo apt-get remove skype skype-bin
rm -rf ~/.skype

Answer:
gksudo gedit /usr/share/applications/skype.desktop

Exec=skype %U
Exec=env LC_ALL=C skype %U

Use these commands. It is gonna work.
Answer: My case is something different, here i run two commands :-
dpkg --get-selections | grep 'skype'

output is :- skype-bin:i386 install
So, to remove i run :-
sudo apt-get --purge remove skype-bin:i386

and after that i remove ".Skype" from home directory

Uninstalling skype


How does Hamilton's Principle give us the path taken?

Question: We defined the action as:
$$\mathcal{S}(t)=\int_{t_1}^{t_2}\mathcal{L}(q_i,\dot{q_i},t) dt$$
where $q_i(t_1)$ and $q_i(t_2)$ are known and fixed.
Hamilton's principle states that the path that is followed has minimum action. Suppose we know just the initial coordinates of a system i.e. $q_i(t_1)$ and not its final coordinates. How can we find out the path followed by the system using the least-action principle (Hamilton's Principle)? As it seems to me that it can only be used when both end points are known.
Answer: This is a subtle point. In principle, $q(t_2)$ (as well as $q(t_1)$) is indeed held fixed at its unknown final value. However, in practice, to a apply Hamilton's principle you don't actually directly fix those path endpoints and calculate any actions, as you might expect you would.
In practice (for classical systems - things are different in quantum mechanics), you always solve the general problem first, by ignoring your initial condition and requiring that the action be stationary for arbitrary fixed initial and final positions. (By "arbitrary fixed", which may sound contradictory, I mean that you are requiring the action to be stationary over the space of trajectories with fixed endpoints, but you're separately solving the problem for all possible choices of fixed endpoints, rather than just solving it for a single specific choice of endpoints.)
This gives you the Euler-Lagrange equation, when turns out to be independent of those endpoints. Then you forget about the action entirely and just work directly with the Euler-Lagrange equation, which is a differential equation that can be tackled as an initial-value problem. In practice, this second step ends up being completely independent from the initial step of varying the action - the action formalism gets you the E-L equation, but then you can forget about it and jump directly to the E-L equation.
So it's this weird conceptual two-step, where you hold the trajectory endpoint fixed to an unknown variable (literally just the dummy variable "$q(t_2)$", with no fixed value assigned). Since the value of $q(t_2)$ ends up not entering into the differential equation that pops out, you don't actually need to know it ahead of time.
Comment: So we assume we've found the final coordinate, get the EL equations, solve them as IVP and get the trajectory ?
Comment: @Kashmiri Yep, exactly. The reason why this works is that the E-L equation usually ends up not depending on the final endpoint, so it doesn't matter that you don't actually know it.
Answer: OP is correct: The stationary action principle (SAP)/Hamilton's principle(HP) needs$^1$ boundary conditions (BCs), i.e. both initial and final conditions. This is because we need the
$$\text{boundary-terms}~=~\left[\sum_{j=1}^np_j\delta q^j \right]_{t=t_i}^{t=t_f}~=~0\tag{1}$$
to vanish when we vary the action $\delta S$ to find stationary paths.
In conclusion: The SAP/HP can not be applied directly to solve an initial value problem (IVP).
(Of course the SAP/HP can be used indirectly in a certain sense: 1. First use SAP/HP with pertinent BCs to establish the EOMs in the first place. 2. Next use the EOMs to solve an IVP.)
See also e.g. this related Phys.SE post.
--
$^1$ Note that if the Lagrangian $L(q,t)$ does not depend on velocities $\dot{q}$, i.e. the system is static, then we don't need any BCs.
Comment: Respectfully, this is nonsense. The stationary action principle is almost exclusively used to solve initial value problems (in classical mechanics). You just need to be a little cleverer in how you apply it. The fact that it's not *directly* formulated as an IVP doesn't meet that you can't indirectly use it to solve IVPs.
Comment: I updated the answer.
Comment: I don't mean to beat you over the head with this, but the indirect usage isn't just some parenthetical curiosity; it is in fact essentially the only way that Hamilton's principle is *ever* applied in classical mechanics. The direct usage is pretty much completely useless because you rarely know both path endpoints.


How long does ad lib. sim. last

Question: I have a piece of (bass guitar) music with some repeats in it, and a direction "last time ad lib. sim.". For how long should this direction remain active? Until the end of the bar? The end of the phrase? Something else?
Comment: Until the fade ;)
Answer: Since it states 'last time', it'll be until the piece is no longer audible, either finished with double bar line/pause/fade.
Answer: Until something more specific is notated, or the piece ends.

How long does ad lib. sim. last


Bead Separated from Fabric

Question: The metal bead on my tire seems to have come out of the fabric in one spot, and so the tire no longer stays in the rim. Is it possible to fix this, or do I need to get a new tire?
Comment: Since you took time to post this, I assume you are not stranded and need a way to get back home any way possible. Get a new tire. If you ARE stranded, you could try to stitch it up, or I have used duct tape to fix this problem in the past. Fold a section of tube, longer than the slice, in half and wrap it a couple times with tape. Then tape that over the hole as close as you can to the bottom of the bead, maybe slightly over lapping. Let the duct tape wrap all the way to the tread, pump the tire, then rip the tape off at the rim. Get home and buy a new tire!
Comment: Sewing with fishing line has worked for me in the past, very well actually, but I would not use it anymore, I think it's not worth the hand labor and the risk of problems. Anyway, it's a possibility for large-volume, low pressure tires.
Answer: Unfortunately, if the bead is popping out, you're going to need a new tire. Your tube could have a blow out through the gap. You may want to inspect your brakes and make sure they were not rubbing on the tire.  This could be causing pre-mature wear around the edge of the tire near the bead.
Comment: This can happen if the (as you surmised) the brakes are rubbing against the tire. make sure your brake pads are centered on the braking surface and don't touch the tire. If they don't fit on the braking surface, err below rather than touching tire (but you should also swap out the pads if this is the case).
Comment: If the tire is new, ask for warranty on your shop!
Comment: Take it back for replacement *if* the failure's not due to the brake blocks rubbing on the tire.
Comment: Darn, was hoping that wasn't the answer ;) Not sure if it was the brakes, the tire is brand new and this happened within the first hour of riding. Might just be me being a dumbass and not putting in the tire properly, or maybe just a defective tire.
Comment: Yeah. It's going to be obvious that it was premature failure of the tire. Take it back for a replacement.
Answer: Patch from inside with thick strip of inner tube with rubber cement, stitch the patch in place with heavy duty nylon thread allowing @ least 1/4" to 3/8" clearance so as to not provide the tear any additional "path of least resistance" on which to travel, (grow). Ensure your stitches are tidy, evenly spaced and going the same direction as opposed to zig-zaging. When finished, your handwork should resemble the inside of a Jordan sneaker without the insole (as far as the stitches are concerned.

Bead Separated from Fabric


What mount would fit a bare 50mm diameter, 2mm thick filter?

Question: I have a 50mm diameter, 2mm thick unmounted optical glass filter that I want to attach to my camera.  I haven't been able to find a resource that describes the size of the optical glass used in standard photo filters.  Would a 52mm mounting house a 50mm filter?  I could do this by trial and error but I'm hoping someone already knows the answer.
Comment: Not posting as an answer since I don't know for sure that it is true, but I'm not sure how a 52 mm mounting would hold a 50mm filter as the filter would not be large enough to reach from one side of the mount to the other.
Comment: From wikipedia..."The specified diameter of the filter in millimeters indicates the diameter of the male threads on the filter housing."  So the filter may be a different size, I don't know.  Maybe a 49mm would be closer.
Comment: Yes, but the filter holder also needs something to hold on to without going in to the field of view of the lens.  That's not likely going to happen with a 50mm filter on a 52mm mount.
Comment: What size lens do you want to mount it on anyway?
Comment: I would use it on lenses with the following normal filter sizes, 49mm, 52mm, 55mm and maybe 62mm. Normally the lens will be stopped down enough that I won't care about vignetting or worse.  I have step up rings already.
Answer: For such project, I would use a step-up ring (e.g. 49-52mm to maximize usable filter area, or 46-52mm to have more leeway during mounting). The glass is guaranteed to fit in the 52mm inner thread and slimmer part with outer thread is guaranteed to provide support for the glass. To fix the glass into mount and fill the remaining gap, I'd try out silicone sealant first.
Disclaimer: I have made some DIY equipment, but not fixed glass to metal.
Comment: good shout on the step-up ring! i hadnt though of that!
Answer: The answer is that a standard 52mm filter holder takes a 50mm diameter piece of glass.  I used a 52mm Tiffen UV filter holder and the 50mm glass filter fit perfectly.
Answer: The diameter of the thread on the back of a filter, and the diameter of its front thread (for stacking multiple filters) are almost always the same, however the inner design/diameter of the filter holder ring may differ between manufacturers.
Unfortunately this means it is a matter of trial and error to find a suitable filter mount.
Exact details are not published by manufacturers, because it is expected that a filter will remain in its original holder/frame.


How can I list all cookies for the current page with Javascript?

Question: Is there any way to, with help of Javascript, list all cookies associated with the current page? That is, if I don't know the names of the cookies but want to retrieve all the information they contain.
Comment: Yes. I'm talking about the page the user is currently on.
Comment: OK. I edited the title and question to reflect that. DixonD's answer is appropriate here.
Comment: Please clarify if by "certain page", you mean "the page the user is currently on". DixonD's answer is spot on for current-page cookies. All other domains are offlimits for security reasons.
Comment: Note that this is something that you actually probably want to disable with `HttpOnly`. This is because it makes XSS attacks a lot less powerful.
Answer: You can list cookies for current domain:
function listCookies() {
    var theCookies = document.cookie.split(';');
    var aString = '';
    for (var i = 1 ; i <= theCookies.length; i++) {
        aString += i + ' ' + theCookies[i-1] + "\n";
    }
    return aString;
}

But you cannot list cookies for other domains for security reasons
Comment: Also this does not work when the cookie has been set value ```httpOnly=true```.
Comment: Nicer output via `aString += i + ' ' + decodeURIComponent(theCookies[i-1]) + "\n";`
Comment: I must have been clumsy in my description of the problem. What I wanted to do was to get a list of all the cookies created by any html-documents in the same catalogue.

In the html-document I simply added the following code:

var x = document.cookie;
window.alert(x);

...and I could see all the cookies I had created.

Sorry if I expressed myself in an unclear way. Thanks for all the quick answers though. I already like this site :)
Answer: Experimental Spec (poor browser support as of Apr 2023, use 2022 answer):
const cookies = await cookieStore.getAll()
// Then...
Object.fromEntries(cookies.map(({name, value}) => [name, value]))
// OR
cookies.reduce((cs, c) => ({...cs, [c.name]: c.value}), {})

Read more here: https://developer.mozilla.org/en-US/docs/Web/API/CookieStore/getAll
Updated for 2022
tl;dr - Here's a one liner:
Object.fromEntries(document.cookie.split('; ').map(c => c.split('=')))

Note: You cannot get http-only cookies in browser code.
Here's the same thing, explained:
const getCookieMap = () => {
  // Cookies are generally separated by a "; "
  // https://stackoverflow.com/a/4843598/2968465
  const cookieList = document.cookie.split('; ');

  // A key-value pair in the cookie list is separated by a "="
  // We pass a function to cookieList.map that will return
  // an array of tuples, like [key, value]
  const cookieToObjEntry = cookie => cookie.split('=')
  const cookieEntries = cookieList.map(cookieToObjEntry)

  // Such an array can be passed to Object.fromEntries to
  // obtain an object with all cookie key-value pairs as
  // the keys and values of an object
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/fromEntries
  return Object.fromEntries(cookieEntries)

  // So, for a cookies stored as "c1=v1; c2=v2", you'll get
  // an object like `{c1: v1, c2: v2}`
}

Older answers
Many people have already mentioned that document.cookie gets you all the cookies (except http-only ones).
I'll just add a snippet to keep up with the times.
document.cookie.split(';').reduce((cookies, cookie) => {
  const [ name, value ] = cookie.split('=').map(c => c.trim());
  cookies[name] = value;
  return cookies;
}, {});

The snippet will return an object with cookie names as the keys with cookie values as the values.
Slightly different syntax:
document.cookie.split(';').reduce((cookies, cookie) => {
  const [ name, value ] = cookie.split('=').map(c => c.trim());
  return { ...cookies, [name]: value };
}, {});

Edit: Someone correctly pointed out that you'll face issues if your cookie key or value has an = in it. Maybe consider using escape sequences to mitigate this?
Answer: var x = document.cookie;
window.alert(x);

This displays every cookie the current site has access to. If you for example have created two cookies "username=Frankenstein" and "username=Dracula", these two lines of code will display "username=Frankenstein; username=Dracula". However, information such as expiry date will not be shown.
Comment: This doesn't work if you have set the cookie with `httpOnly`, which is recommended, since it helps to diminish the negative consequences of an XSS attack.
Comment: Nothing on the browser side can let you do that, Flimm. This is a basic bit of security, so it does not diminish the value of the answer.
Answer: For just quickly viewing the cookies on any particular page, I keep a favorites-bar "Cookies" shortcut with the URL set to:
javascript:window.alert(document.cookie.split(';').join(';\r\n'));

Answer: No.
The only API browsers give you for handling cookies is getting and setting them via key-value pairs. All browsers handle cookies by domain name only.
Accessing all cookies for current domain is done via document.cookie.
Comment: This doesn't work if you have set the cookie with httpOnly, which is recommended, since it helps to diminish the negative consequences of an XSS attack.
Answer: Besides document.cookie you can use the cookie store API, mainly getAll() method of CookieStore.
Here's a simple example, you can do something like:
const cookies = await cookieStore.getAll(); //Array of all available cookie info
cookies.forEach(c => console.log(`${c.name}: ${c.value}`));

Please note that this API is still experimental and not supported by all browsers (e.g. Firefox) as of the time of writing this.
Answer: function listCookies() {
    let cookies = document.cookie.split(';')
    cookies.map((cookie, n) => console.log(`${n}:`, decodeURIComponent(cookie)))
}

function findCookie(e) {
  let cookies = document.cookie.split(';')
  cookies.map((cookie, n) => cookie.includes(e) && console.log(decodeURIComponent(cookie), n))
}

This is specifically for the window you're in.  Tried to keep it clean and concise.
Answer: Some cookies, such as referrer urls, have = in them. As a result, simply splitting on = will cause irregular results, and the previous answers here will breakdown over time (or immediately depending on your depth of use).
This takes only the first instance of the equals sign. It returns an object with the cookie's key value pairs.
// Returns an object of key value pairs for this page's cookies
function getPageCookies(){

    // cookie is a string containing a semicolon-separated list, this split puts it into an array
    var cookieArr = document.cookie.split(";");

    // This object will hold all of the key value pairs
    var cookieObj = {};

    // Iterate the array of flat cookies to get their key value pair
    for(var i = 0; i < cookieArr.length; i++){

        // Remove the standardized whitespace
        var cookieSeg = cookieArr[i].trim();

        // Index of the split between key and value
        var firstEq = cookieSeg.indexOf("=");

        // Assignments
        var name = cookieSeg.substr(0,firstEq);
        var value = cookieSeg.substr(firstEq+1);
        cookieObj[name] = value;
   }
   return cookieObj;
}

Answer: I found this code on https://electrictoolbox.com/javascript-get-all-cookies/, which worked for me better than the other solutions:
function get_cookies_array() {

    var cookies = { };

    if (document.cookie && document.cookie != '') {
        var split = document.cookie.split(';');
        for (var i = 0; i < split.length; i++) {
            var name_value = split[i].split("=");
            name_value[0] = name_value[0].replace(/^ /, '');
            cookies[decodeURIComponent(name_value[0])] = decodeURIComponent(name_value[1]);
         }
     }

     return cookies;
}

Answer: No there isn't. You can only read information associated with the current domain.
Comment: Damn :) Ok...Follow up questions:

1. Is there any way to check if a specific cookie exists (with a certain name that you know)?

2. Is there any kind of manual for JavaScript where for example the document.cookie class is desribed in detail?
Comment: I think so too.

However, I would like to get hold of something equivalent of this: http://download.oracle.com/javase/1.4.2/docs/api/overview-summary.html
Answer: Simple solution that converts all Cookies to JSON:
    let output = [];
    document.cookie.split(/\s*;\s*/).forEach((pair) => {
      var name = decodeURIComponent(pair.substring(0, pair.indexOf('=')));
      var value = decodeURIComponent(pair.substring(pair.indexOf('=') + 1));
      output.push({ key: name, val: value });
    });


Why is the secondary winding of a current transformer shorted?

Question: I understand that the secondary circuit in a current transformer cannot be left open, as it will result in a very potential difference being induced in the core of the transformer and permanently damage it.
However, I'm having trouble understanding why the secondary winding is always shorted. Shouldn't it actually have a high resistance, since the voltage is high and current through it is low? Or is there perhaps a definition of 'shorted' which refers to something other than a low resistance path?
Comment: Why did you decide that "the voltage is high and current through it is low" in a secondary of a current transformer?
Comment: According to my textbook, a current transformer is essentially a step up transformer (it steps up the voltage). It's used for the purpose of measuring high values of current using low range ammeters.
Comment: OK, fair enough. I would expect your textbook to also mention that shorting the secondary is exactly what makes the difference, if not that's indeed misleading.
Answer: Any resistance on the current tranformer secondary will be transformed into resistance on the primary by a factor of \$ \frac {1}{n^2} \$ where \$ n \$ is the turns ratio. To minimise the primary impedance you need to short the CT secondary.
You may find it helpful to consider CTs as complimentary to VTs.

VTs are happy with secondary terminals open-circuit. They are then unloaded.
CTs are happy with secondary terminals short-circuit. They are then unloaded!
VTs do not like short-circuits on the secondary.
CTs do not like open-circuits on the secondary.

Or is there perhaps a definition of 'shorted' which refers to something other than a low resistance path?

Nope. Use the best short-circuit you can make.
Comment: No, what I'm saying is that adding a CT and, for example, an ammeter on the secondary adds impedance (resistance) into the primary. The energy to power the meter has to come from the primary circuit. So, the idea is to keep the secondary resistance very low to minimise the effect on the primary circuit.
Comment: Why would we want to minimise primary impedance? Isn't the entire point of the CT to step down primary current so as to measure it easily?
Answer: For any transformer with AC we have
$$
\dfrac{N_p}{N_s} = \dfrac{V_p}{V_s} = \dfrac{I_s}{I_p}
$$
When using a transformer for voltages we apply a voltage to the the primary and get one on the secondary.  The current in the the primary is \$I_p = I_s \cdot\dfrac{N_s}{N_p}\$ plus a bit for the magnetising current.  We can model the real transformer as above with an inductor in parallel with the primary winding to represent the magnetising inductance.
Now consider the action of a current transformer.  We want the primary to look as much like a short circuit as possible so it does not change the current being measured.  For this reason the load across the secondary wants to be low impedance. The secondary voltage reflected back to the primary is then very small and the magnetising inductance appears to be shorted out meaning primary current is not affected by adding the current transformer.
In practice the secondary usually has a small value resistor across it so you can sense the primary current as a voltage on the secondary.  If this resistance is too big the primary voltage increases and the current transformer affects the primary current.