Why must all magic teachers master the basics of forbidden dark magic?

Question: In the school of fine magic, all magic teachers must undergo a course on forbidden dark magic such as witchcraft and voodoo curses and achieve a satisfactory result in the exam before they are qualified as a teacher. It is forbidden so they can only do theory but they must also swear never to teach their students anything on dark magic. Why bother getting into dark magic when you can neither use it nor talk about it?
Comment: Where do teachers learn about dark magic if teaching dark magic is forbidden?
Comment: Why do engineers study collapsing bridges? Why do accountants learn about money laundering? Why do Shakespeare actors watch Marvel movies? Because "*here is what not to do.*" OK, the latter was unfair. To the bridges.
Comment: This seems like a question of character motivation and idea generation where pretty much every explanation will be valid.
Comment: It's close, but I see a question of *societal* motivation.  OP wants to know: My society is structured like so.  Here are reasons this might not make sense.  Why do things have to be this way nonetheless?  I.e. the OP is really asking: why will society fall apart if this is not the way things are done?  This seems be a question about culture (explicitly listed as on topic) and is likely to "inspire answers that explain "why" and "how"" as defined in the help center.
Comment: Know your enemy
Answer: This is quite simple... Teachers of magic are taught about the forbidden dark magics so that they will recognise when a student asks about or practises dark magic.
Every teacher needs to be able to recognise when a student is starting to head into forbidden territory, or worse, has strayed into the forbidden.  How else would they be able to know when to discipline the students or deflect their questions that threaten to stray into forbidden territory?
Comment: Don't forget that as a teacher, it would be important to _also_ know how to counter the basics in dark arts, perhaps more than the basics. Students are likely to discover some basic dark arts, as it is forbidden there will always be those that deliberately seek them out. So it will be important for the teacher to be prepared to counter any mischievous or nefarious activities perpetrated by those students actively pushing the boundaries
Comment: "Sir, I wondered what you know about . . . about Horcruxes?" "Dunno, never studied it, but you can learn about it in such-and-such books in the library. My, my, what a bright student, asking about such advanced topics!"
Comment: Teachers also need to be well rounded. All that trivium and quadrivium. Among which surely nestles the snakey dark magics of mathematics!
Comment: +1 I was going to answer this exactly, so I'll just add something to this: to be able to learn magic habilities to defend against/counter forbidden dark magic, one must know the basic of them
Comment: @Randal'Thor "He sure seems like he has a healthy interest in Defence against the Dark Arts. Definitely defence against them… right??"
Comment: Additionally, the same reason as bomb disposal teams have to learn how bombs are made – to disarm them, should students accidentally or stupidly start doing something bad.
Comment: To give another real-world example of this: Most competent chemistry teachers probably know how to make some basic explosives, narcotics, poisons, and other illegal substances.  They know this so that they can tell when a student is doing something illicit.
Answer: To counter a danger you must first know its nature i.e. what it is, what it does and how to recognize it. Only then, knowing that, can you fight it.
So all mages are taught to at least detect and recognize black magic, including what traces it leaves when cast (both on the person and the place) and what counter spells are effective (or at least what basic counter spells are anyway).
This in turn means any mages deemed experienced and reliable enough to become teachers have to be exposed to dark magic, because otherwise they cannot teach others the basics of detecting black magic and protecting yourself and others from it. That said this 'exposure' is only done under strictly controlled circumstances by the most experienced/senior mages using dark tomes that have been seized over the years and then carefully secured out of harms way.
So the course covers the following;

History of dark magic, its theory, symbology and tools (no dark tome required)
Exposure to dark magic and its traces, (what it feels like). Tome required.
Spell Types (Examples explained and demonstrated). Tome required.
Detection of DM and counters to DM. This includes not only white magic spells but also common dark magic spells that DM practitioners might use to detect, attack or counter white magic practitioners. So basically both types of magic at the more common level. Plus importantly spells black mages can use to try and avoid detection (and how to counter those). Tome required.

Passing the course does not grant access to a dark tome. Only the most elite agents of the Guild or whatever tasked with policing dark magic get advanced training in all aspects of dark magic and full access to dark spells. And even then only under supervision and as required for specific missions.
Comment: Real world example - military forces that are signatories to the Ottawa Treaty are still permitted to teach soldiers how to lay a minefield in order to enhance the soldiers' abilities to deal with antipersonnel minefields that they encounter.  Personal experience here - went through the whole minefield laying process from planning to laying training/dummy mines.  Then we "switched sides" and went through lane clearance techniques, with a much better understanding of the characteristics and limitations.
Comment: ALL Teachers are trained in the dark arts. Just not to the highest level because that's not required for their job.
Comment: By this reasoning, not all teachers would need to know the dark arts.  Like other students, they would only need to know how to recognise the dark arts, unless they're teaching the dark arts defence course.  That's not what the OP asked.
Comment: (Rule number one: Never let the kids play with hand grenades!) As I said, if such tomes are treated as deadly weapons and secured away, guarded and audited as such?
Comment: Part 1)  No I think all teachers would have to know enough about the dark arts to train others in detecting black magic (BM), protecting yourself from common BM attacks (by knowing what those attacks are and how they work) and what spells BM casters use to hide/disguise their presence. Its a hierarchy of BM knowledge.
Comment: Its basically a 3 tier system. The top tier are the senior magicians (teacher trainers & hunters) who have to be broadly across most aspects of BM to do their jobs. Would be teachers are the middle tier. They have to know enough to teach the basics i.e. the detection of BM, BM 'cloaking' spells and common BM attack spells. (Which means they have to know how to do the most common BM attacks etc)
Comment: Part 3) The bottom tier are the general practitioners who just need to know how to detect and protect themselves and others from BM i.e. its not their job necessarily to hunt it down. Just report it to those whose job it is. The idea is to keep the number of mages with full knowledge of BM to the absolute minimum necessary to protect everyone without basically giving any practitioner who wants to practice BM the ability to re-write (and teach) most if not all BM magic spells known to the guild.
Comment: Again, the OP asked why *all* teachers would be trained in the dark arts, not just some as you suggest.
Comment: Because keeping dark tomes restricted to your highest power members is never a bad idea......
Comment: This breaks the prohibition of _using_ dark magic.
Comment: Depends how you define 'using' Dark Magic (DM). Firstly I would argue that  the intention of the practitioner in part defines the morality of the magic. Performing a (limited) number of dark spells to familiarize a student with what DM feels like, how it works, then teaching them how to counter some of the more more common DM spells is not in and of itself an evil act. The intention of the user saves (or taints) the act itself. Since DM exists and is clear and present danger to both students (and others)  it would be morally reprehensible not to teach students how to defend themselves.
Comment: Part 2) I would also assume BTW that the casting DM spells comes at a potential cost i.e the risk of 'tainting' the user. For that reason Teachers would need, as I argued to be limited in the number and strength of DM spells spells they can teach. Obviously they would also have to be 'rested' between classes and given the appropriate counseling (or magical warding against DM taint) on a regular basis.
Answer: So-called "dark" magic is really just the fundamentals.
When you're learning how magic works, you need to learn how to shape and channel flows of woo. Woo flows through everything, so to learn how to affect anything you need to learn the rules for how it flows and how to affect it.
From there, there are some easy and obvious shortcuts, like killing things to use all their woo. The problem isn't that the "dark" arts are inherently dark knowledge, it's that direct application of any of that knowledge is evil. Most of the remaining curriculum is about how to avoid manipulating woo. That also lets you have white magic as the super-advanced learning that lets you manipulate woo in helpful, healing ways (like the difference between a gladiator and a surgeon: both know enough anatomy to put a blade in the right place, but the outcomes are fairly different. )
Answer: Because you need to be ready to counter people who do use it and don't have your scruples or common sense
This isn't specifically for teachers, it's just higher-level magic. Consider it degree level, or black-belt level. Most people with degrees or black belts don't teach - but getting that degree or black belt is naturally a prerequisite for teaching.
I used to do a little jiu jitsu. Part of jiu jitsu is learning how to apply chokes, and as a student you also learn to tap out when you're in a choke and can't escape. But the brown and black belts occasionally practised fully choking each other out, because at that level you're working on skills beyond just what happens in the dojo, and your average pissed-up Friday night brawler isn't going to tap out nicely or let you tap out. The person applying the choke learns how to actually make it effective, how long you have to hold it on for, how to tell the person is out, and the first aid required to keep them safe when they're out. Meantime the person being choked learns how to process this mentally so that they don't panic and can respond when someone grabs them from behind in a pub car park.
The same applies here too, especially if your worldbuilding allows for combat magic. (And really, who's going to create a fantasy world with magic and not have magic duels?) The first steps in teaching anything dangerous are always very carefully judged so that the trainee doesn't seriously endanger themselves or other people, whether that's in woodworking, tree surgery, hang gliding, scuba diving, weapons skills, or anything else. Until the student can show they're working safely in a sandbox environment, they aren't ready to be let out.
And once they get to that level, they're ready to deal with the rest of what the real world can throw at them. Their basics are solid, but more than that, they've been drilled with a respect for how they can hurt themselves or other people if they screw up.
It doesn't mean people won't still dick around - drivers speed all the time in spite of being taught the dangers, for example. It's illegal, and you know you might be caught and fined, but it's mostly harmless and a good driver knows when it's safe. Mild witchcraft is likely to be the same - if you've got a problem with weeds in your garden, why not hex the plant so it dies, for instance. But if you accidentally hex the farmer's field next door, prepare for a big fine. So your magic users also need to be ready for clean-up operations when people don't use common sense and dick around without adequate skills. Hanlon's Razor still applies: Never attribute to malice that which is adequately explained by stupidity. Or more to the point, whatever someone could do intentionally, a suitably incompetent person could also do just by being a bit crap.
As with other crimes, there's a difference between minor accidents happening and major injuries or deaths. We already have many ways people can deliberately or accidentally kill themselves and other people. Magic merely adds another way to that long list.
Comment: `And really, who's going to create a fantasy world with magic and not have magic duels?` Lovercraft :) (It would be weird in his storytelling style :D )
Comment: @Jan'splite'K. Fair point, although I don't think Gandalf's fight with the Balrog was purely physical.  Tolkien also "forgot" that Gandalf uses fire magic against the goblins in *The Hobbit*, basically turning pine cones into WP grenades, which is never mentioned again in spite of the many times it could be useful.  The Witch-King backs down in the book too.  Gandalf does duel Saruman though, but only when he's powerful enough that the result is an instant win.
Comment: @Jan'splite'K. I did see this in terms of duels between wizards, but I guess it does also apply to non-wizards fighting wizards.  Which is often a win for the magic user, of course - as Stephenson memorably said in *Snow Crash*, in a fight between a swordsman and a non-swordsman, the winner is normally the one holding the handle. :)  But they also represent the Big Bad in a lot of fantasy (Conan, etc.) because they provide an actual challenge for the hero who's physically more capable than anyone else.  So it's also realistic to have similar training for non-magicians to know what they can do.
Comment: `And really, who's going to create a fantasy world with magic and not have magic duels?` -- J.R.R.Tolkien? (heh, well, it depends what do you imagine as "magic duels".)
Comment: It's notable that magic duels are *possible* in Tolkien's works (and a few actually do happen in the Silmarillion), but in LoTR Gandalf (the main magic-user of the Fellowship) avoids using magic because even small things like lighting a fire say "GANDALF IS HERE!!!" to anyone within several hundred miles.
Answer: How can you test bullet proof armor without also creating guns and bullets?
To use Harry Potter as an example, there is the Dark Arts as a subject. Defence against the Dark Arts.
One of the teachers demonstrates the 3 unforgivable curses in class. One of which is, basically, mind control. The Defense against it is having a strong will. How can you know how to defend against it without knowing about it and, possibly, practicing against it?
There are weapons we have that we'd never realistically use against each other. We have schools and scientists creating defenses against those weapons "just in case". How can you create defenses without learning about, researching and even creating mock - or real - weapons to defend against? How can you create a vaccine against a bug that doesn't exist? Bullet proof armor without having bullets?
So TL;DR: You have to know and use within controlled and safe circumstances the tools and weapons against which you have to protect against.
Comment: Of course, the teacher that demonstrated those curses wasn't completely lily-white innocent...
Comment: @JamesK and the teacher that wanted to do it - Snapes - wasn't either... You don't have to be "innocent" to use "dark arts" for good (IE: Training for defense)
Comment: @JamesK But no-one knew quite how far that went.  (Avoiding spoilers for anyone who somehow is here and hasn't read it.)  All the staff and all the students were totally on board with his teaching methods.  The only thing anyone actually disagreed with was the "bouncing ferret" incident, and that was only really mild disapproval.
Answer: Magic is analogous to a computer system, and each spell is a program.  Beginners know only how to use spells made by others, and beginner-level spells have a myriad of safeguards built in.  More trusted spellcasters are taught spells without as many safeguards, and masters can write new spells.  What the general public describes as "forbidden dark magic" are merely spells with no safeguards built in.  Any master can make these "forbidden dark" spells, simply by leaving out the safeguards altogether.
Consider your basic "Cut Bread" spell.  It functions by destroying all matter within a thin flat region, but has safeguards to ensure that it is only being used on bread.  Those safeguards verify that the target region only contains bread, and shrinks the target region as necessary to avoid harming anybody.
The combat spell "Blade" operates on the same principle as "Cut Bread", but without those safeguards.  It continually destroys solid matter within a narrow region, which may includes somebody else's body.  It's a more dangerous spell, but is also much more efficient as it doesn't need to check the safeguards.
Master spellcasters can take this even further.  Even "Blade" has some safeguards, to restrict the region of destruction and to avoid harming the operator.  A master spellcaster could create a generic "Destruction" spell, with no safeguards whatsoever, which is limited only by the energy provided to the spell.  These are the forbidden dark spells, which every master knows how to make, and every master knows not to.
Answer: Dark magic requires you to tap dangerous forces and contract with deadly beings.
It's not just a matter of casting an evil spell. Curses tend to involve binding an evil being to a person to hurt them, and that requires negotiation with very dangerous and hostile magical forces that can hurt society.
Knowing the theory helps but it's not a very small first step. Actual dark magic requires contacting these beings and negotiating a price. This contact means a lot of higher level spell crafting with kinder and better entities is now impossible.
If you start casting dark magic, you won't be able to cast the super epic light magic that requires negotiation with good entities.
As such, more powerful people have less incentive to go evil. They'd lose their most powerful powers, and it would require months or decades of negotiation to gain the same level of faction relationships with the dark side.
Do you want to be able to cast a boils on the penis of your enemy dark spell, or a spell that will resurrect a friend light spell? A spell to make your enemies have mildly bad luck, or a spell that lets you burn a village down with holy fire?
A student can go dark, and they'll lose nothing, except their lives when they turn evil. Teachers lose more. Teaching teachers the theory helps them keep student on the light side.
Answer: Dark magic is the exploitation of mistakes - teachers must learn about it to teach students which mistakes are particularly dangerous
A dark magic user isn't actually much of a threat to people who use no magic- instead their power lies in the ability to corrupt the spells of others to do them harm.
Essentially, magic is hard: everyone makes small mistakes from time to time, and these mistakes cause your spell to do something that you didn't want, where the exact outcome initally seems random. For example, a student messes up when transforming a teacup into a cat, and the cat comes out with pink ears!
However, the unwanted outcomes aren't actually random: they depend on the exact magical circumstances where the spell is miscast, and these circumstances can be subtly manipulated.
Dark magic users learn to exploit these mistakes to make your spell do their bidding- instead of the cat just coming out with pink ears, this allows everything from stealing your thoughts to stealing your powers!
As a result, it is crucial even for a beginner to learn the kinds of mistakes that are exploitable by dark magic users, so that they can be much more careful about them. In particular, if a student makes a charm they intend to wear in public, it is wise to first show it to a trusted teacher who can check it for mistakes that would make the student vulnerable to any dark mage they come across.
(All of the above is true in our world if you replace magic with programming and dark magic with hacking. Real world computer science curricula have to make difficult choices about how to teach computer security while convincing students not to go practice their new skills against public websites)
Answer: Dark Side is Built in
Understanding Magic as a system requires a good knowledge of both white and dark magic. Studying dark magic is more than a purely defensive act, instead, understanding both sides, including the darkness is vital.  As you complete your education, and go on to your professional calling as a sorcerer, watch out.
At the elementary level, it is known that a spell controls both a negative and a positive force like magnetism or electricity.  At an intermediate level of magic casting, you may learn attack spells which require negative emotions, and it may take concentration not to let the take over.  Human fight or flight mechanisms may be required for an attack spell, but also can push a spell out of control. Depressed or bitter intermediate magic users are dangerous.  It gets worse. At an advanced level of magic, the power that is accumulated increases the temptation of going to the dark side and become a world eating super villain.  "Absolute power corrupts absolutely."
The teachers have responsibility to keep the students safe, and also come up with good lesson plans that show the risks in each branch of magic.
The fine print:
Divination:  Divination requires understanding of future problems so it has a dark side.  Wanting to know the future on a low level may not have a big dark side, will there be good food in the meal hall tonight? beans. but consulting the fates on future problems can lead to visions of extreme darkness. *What is the worse thing that will happen next year? demons will attack the school and possess the head teacher and you will die in the battle.
Abjuration:  Although it is defensive, magical barriers can pose dark problems, such as locking beings in magical prisons, or depriving people of their magic powers just when they really need them.
Enchantment:  Tempting to give an artifact too much power.
Necromancy:  Reviving the dead party members might be useful in certain situations but creating Liches and Undead armies can pose problems.  Enough said.
Illusion: Sounds harmless, but illusions can blur the difference between reality and perception, such as creating a dense carpet of spiders or snakes - a gateway to madness.
Conjuration: When some giant demon arrives with a proposal to lose your soul it is probably a result of a conjuration.
Evocation:  Evoking guardian angels sounds OK.  If evoking Tidal waves, Infernos, Rolling thunder, or Whirlwinds, there are lots of possibilities for things going wrong.
Transmutation:  Altering somebody into a goat or a frog for an hour sounds OK, but for longer it might be a problem.
Comment: @Vikki true.  Those agreements have some pretty fine print.
Comment: [Simple defense against demons with proposals to lose your soul](https://www.xkcd.com/501/)
Answer: Forbidden Dark Magic Drills
First, let's hopefully try to lighten the mood a bit, because this is about to get dark.
Forbidden Dark Magic often requires specific materials in their rituals, or if cast as a spell, you need to use a wand - can't cast a forbidden spell just by speaking its name - you need wand movements and an actual wand. So when practicing the basics as a teacher to get familiar with what to spot, you simply don't use those materials needed, or make sure your wand is safely stored away; worst cast, you end up avada kedavra'ing your desk drawer.
So if you use scented candles (Or if those work as well, glowsticks) during a summoning ritual, it doesn't work, or if you use a lead bar as your casting implement, it doesn't actually cast magic out the far end. Teachers can learn what doesn't work, and practice a bit both to be able to spot others trying to practice the forbidden arts, but for additional, potentially darker reason.
So, what happens if Forbidden Dark Magic is more commonplace than preferable?
A lobbying group in the magic community for the manufacturers of the materials needed for the forbidden rituals, and wandmakers, doubles down on the belief that their materials are not at fault. "Candles are a perfectly fine light source as long you're handling them safely" and "The only thing that stops a bad guy with a wand is a good guy with a wand" become known phrases among political groups in the Ministry of Magic in charge of writing the regulations on said materials.
Fire Drills aren't just regular drills in the Magic world - teachers are tasked with creating fake summoning ritual areas with scented candles or glowsticks out of sight, and if no student comes across them and repots them - or takes them down, they end up starting a controlled burn throughout the school, as kids learn to single file and exit the building, or cast fire extinguishing spells on reflex.
The main reason for the practical approach? Sometimes, actually Forbidden Dark Magic is performed at school by kids as a prank or by accident, and having to handle actual outbreaks of ritual summoning turns out to be a known source of danger.
As would Forbidden Dark Magic spells...sometimes there are actual Forbidden Dark Magic users on school grounds causing a whole lot of danger. So teachers are required to practice the timing of forbidden magic and incantations with lead rods instead of their spell casting implements so that they can simulate fake users, to teach their kids to learn the Unforbidden Lighter Magic spells that provide protection against these spells, or how to dodge said spells based on the reflexed of a teacher who's practiced and has reflexes prepared such that, if you can dodge the line of sight for a teacher using a Dark Forbidden Magic spell in your direction, you can dodge it in real life - or learn to take down the caster in a non-Dark Forbidden Magic way, to stop them from being able to cast the spell.
To that end, teachers need to know where the limitations are, specifically to prevent themselves from actually putting kids at harm - as well as potentially having practiced against lead bar targets so that they can evaluate if students would have actually gotten out of the way of someone casting Dark Forbidden Magic in their direction.
Answer: Maybe the only (or best) way to teach Magic is by controlling a student's mind, guiding them through the use of Magic.
Similar to a driving school car or training aircraft with two sets of controls where the teacher can always take over if things get dangerous. Except in this case the teacher sits in your head instead of the co-pilot seat.


Relation between Search results and Inventory data / settings? Some things work, some don't

Question: I have a ton of items I imported via REST API.  They don't show up in search.  For this test I'm just using the LIKE operator.  Magento 1.8
What works:

Manually edit a single product
Set qty=1 and is_in_stock to yes/1
If prompted, redo search index

The problem is this doesn't scale; I have tens of thousands of products.
What doesn't work, attempt 1:

System -> Configuration -> Catalog / Inventory -> Stock Options
Display Out of Stock Products = Yes
Redo search index (all indexes, just to be safe)

This is the purported fix that I found on Google a while back, but annoyingly doesn't work.
What doesn't work, attempt 2:

Run SQL command: UPDATE magento.cataloginventory_stock_item SET qty = 1, is_in_stock = 1;
Redo search index (all indexes, just to be safe)

I know you're not supposed to do this, but this is a dev system and I wanted to try.
Use REST API?

I believe I tried this some time back and it didn't work.
Even if it did work, it'd be too slow.  We're moving away from the REST API because it takes days / weeks to complete for a large data-set.

Questions:

When I manually edit a product and set qty=1 / in-stock=yes, it's clearly doing something "special", above and beyond tweaking the cataloginventory_stock_item table.  What else is it doing?
Is there some way to simulate whatever that is?
What the heck is the point of the "Display Out of Stock Products = Yes" option if it doesn't affect search?

Magento seems to do a lot of internal filtering... I'm guessing that something in my data doesn't quite match.
Answer: The fastest method you're going to find for fixing this issue would be to use an extension such as uRapidFlow. I've seen and had similar issues before with various methods of importing products, normally opening and saving the product repairs the issues because something is not set during the import. This is normally the attribute set, sometimes the stock, but the end result is the fix is always tedious and not adequate. I've had a lot of success using uRapidFlow since then for importing mass products and having them work exactly as intended. You can also use it to export your current set, add any missing data and update all of your current products very rapidly. Just make sure to enable the indexes when setting up the profile.
The alternative to all of this is trying to find exactly what piece of information is missing from the import you did through the API. This would require more information to troubleshoot and answer, such as the exact API method used for your import.
Comment: Thanks for the suggestion.  And for other readers, there also an open source tool called Magmi (https://github.com/dweeves/magmi-git)  I'm not going to do the checkmark here since it's not a direct answer to my question, but it is appreciated, hope you don't object.


Why Do Computers Use the Binary Number System (0,1)?

Question: Why Do Computers Use the Binary Number System (0,1)? Why don't they use Ternary Number System (0,1,2) or any other number system instead?
Comment: This is a question about electrical engineering. Apparently binary gates are easier to implement. IIRC some ternary-based computer had been built at some point.
Comment: What research have you done?  When I type the title of your question into Google, I get back search results that provide several answers to your question.  Also, the Wikipedia article on [binary numbers](https://en.wikipedia.org/wiki/Binary_number) and [binary code](https://en.wikipedia.org/wiki/Binary_code) has a short explanation.   We expect you to do [a significant amount of research](http://meta.stackexchange.com/q/182266/160917) before asking here, and it looks to me like you haven't done even basic research before asking.  Searching Google and Wikipedia is a bare minimum.
Comment: I'm going to put this as a comment because there's already an accepted answer.  It is extraordinarily difficult to build electronic devices that reliably discriminate among ten values because of manufacturing tolerances.  It is relatively easy to build electronic devices that discriminate between two values.  So, the short answer is that computers use binary representation for *reliability*.  I've written a more detailed answer for those who may care: http://bbrown.kennesaw.edu/papers/why_binary.html
Comment: Larger bases did not turn out to be useful overall.
Comment: @Raphael: Ternary did
Comment: In 1958, the Soviets built a ternary computer: [Setun](http://en.wikipedia.org/wiki/Setun)
Comment: a lot of this has to do with shannon who was the 1st to show the advantages of boolean logic for general computation and its natural connection with electronics. one might say its a widespread _engineering convention_ with lots of good/ natural design reasons behind it. might try to work this into answer sometime. however in general consider the problem of _noise_ in electrical circuits and how well binary circuits can suppress/ reject it.
Comment: There are indeed a great many places in computing where more than 2 states are used: Harddisks, SSD, networking, (A)DSL.....
Answer: Since we're in Computer Science, I'll answer this way: they don't.
What do we mean by a "computer?" There are many definitions, but in computer science as a science, the most common is the Turing machine.
A turing machine is defined by several aspects: a state-set, a transition table, a halting set, and important for our discussion, an alphabet. This alphabet refers to the symbols which the machine can read as input, and that it can write to its tape. (You could have different input and tape alphabets, but let's not worry about that for now.)
So, I can make a Turing machine with input alphabet $\{0,1\}$, or $\{a,b\}$, or $\{0,1,2\}$,
or $\{\uparrow,\downarrow\}$. It doesn't matter. The fact is, I can use any alphabet I choose to encode data.
So, I can say that $0001001$ is 9, or I can say that $\uparrow \uparrow \uparrow \downarrow \uparrow \uparrow \downarrow$ is 9. It doesn't matter, since they're just symbols we can distinguish.
The trick is that binary is enough. Any sequence of bits can be interpreted as a number, so you can convert from binary to any other system and back.
But, it turns out unary is enough too. You can encode 9 as 111111111. This isn't particularly efficient, but it has the same computational power.
Things get even crazier when you look into alternate models of computation, like the Lambda calculus. Here, you can view numbers as functions. In fact, you can view everything as functions. Things are encoded not as bits, 0s and 1s, but as closed mathematical functions with no mutable state. See the Church numerals for how you can do numbers this way.
The point is that, 0s and 1s is a completely hardware specific issue, and the choice is arbitrary. What encoding you're using isn't particularly relevant to computer science, outside of a few subfields like operating systems or networking.
Comment: You may want to add the point that going from unary to binary cuts down the size of your numbers to their logarithm, which is a serious improvement, while going further doesn't gain as much (only a linear factor).
Comment: "So, I can make a Turing machine with input alphabet". I think you should write "tape alphabet" here instead of "input alphabet". The interesting part is what is used for computation and not for input. Furthermore I disagree with unary being enough. A TM with unary tape alphabet is almost useless, because the tape is constant.
Comment: What about input encoding in 2-counters machines. It seems to matter. Are you sure you can dismiss so radically encoding issues? And I would hardly agree that complexity is a non-issue; but is lambda calculus a proper way to address it?
Comment: I'll admit that there are complexity problems when you use unary. But the choice of binary vs ternary or anything like that is somewhat arbitrary. It's not like the choice of encoding doesn't matter, but there's not some law dictating why we use a particular one. It's dictated mostly by either convenience or by hardware requirements, which are somewhat outside of computational science.
Comment: Regarding the last sentence: design and study of computer hardware and architecture are also part of computer science.
Comment: In principal, yes, but in practice it falls more into the field of Electrical Engineering. Most people with a CS degree wouldn't be qualified to design a microchip.
Comment: I'm pretty sure that bases -1 through 1 don't actually work in the same way that all other bases work.  You have to "fake" the math to make them work.  I can't find a source for that though.
Comment: I should hope the most common machine is a RAM machine. Otherwise all those `O(N)` algorithms go right out the door.
Answer: Some other things to consider:
Part of the reason for using a binary number system is that it's the lowest-base number system that can represent numbers in logarithmic, rather than linear, space.  To uniquely distinguish between $n$ different numbers in unary, the average length of representations must be proportional to at least $n$, since there is only one string of length $k$ where $k < n$; $1 + 1 + ... + 1 = n$. To uniquely distinguish between $n$ different numbers in binary, the average length of representations must be proportional to at least $\log_2 n$, since there are $2^k$ binary numbers of length $k$; $1 + 2 + ... + \frac{n+1}{2} = n$. Choosing a larger base improves on the space requirement by a constant factor; base 10 gets you $n$ numbers with an average representation length of $\log_{10}n$, which is $\log_{10}2 \approx 0.3$ times the average length of a base two representation for all $n$. The difference between binary and unary is much greater; in fact, it's a function of $n$. You get a lot by choosing binary over unary; you get much less by choosing a higher base, by comparison.
There is some truth to the idea that it's easier to implement digital logic if we only have to distinguish two states. Electric signals are analog and, as such, can be interpreted to represent as many discrete states as you'd like... but you need more precise (hence expensive and finicky) hardware to reliably distinguish more states over the same range. This suggests choosing as low a base as you can.
Another potentially important consideration is that logic has classically been understood to involve two distinct values: $true$ and $false$. Now, we have fancier logics than this, but a lot of mathematics and science still rests on pretty foundational notions. When you consider that computers are used to compute, and that logic is important for computation, it suggests having good support for at least two distinct states... but logic doesn't really require more than that.
Answer: There do exist quantum computers in research labs that use q-bit as the basic unit of information that can be both 0 and 1 simultaneously.
http://en.wikipedia.org/wiki/Quantum_computer
There have also been ternary quantum computers built as per this reference http://en.wikipedia.org/wiki/Ternary_computer
So, It is indeed possible to build alternative computing devices that do not rely on the binary number system.  Fiber optic systems for example use 0 for dark and two different orthoganal polarizations of light as 1 and -1.
The reason why I mention these things is because I want to show that although binary numbers are sufficient for computing, there are alternative number systems that can be used for computing.
The binary number system is nice in these sense we can encode all integers $x \in \mathbb{Z}$ by using radix representation of numbers. http:// en.wikipedia.org/wiki/Radix
These values can represent the ASCII code A=0x41=01000001, or the value could represent a machine instruction nop=0x90=0x10010000.
Comment: But they are still using a binary system, in quantum computing the state of superposition is not a third possible value. Also throwing out a quantum computing example is not helpful to the question asked.
Comment: I didn't know about this..
Comment: "q-bit as the basic unit of information that can be both 0 and 1 simultaneously." This is nonsense. Qubits are fundamentally different from normal bits, in that they represent a non-discrete (complex) value. They are incomparable for all practical purposes.
Answer: One of the big reasons that most computer circuits use two states is that the quantity of circuitry necessary to distinguish between n different voltage levels is roughly proportional to n-1.  Consequently, having three discernible states would require twice as much circuitry per signal, and having four would require three times as much.  Tripling the amount of circuitry while only doubling the amount of information would represent a loss in efficiency.
Note that there are some places in computers where information is stored or communicated using more than two states per element.  In a flash memory array, hundreds or thousands of memory cells may be serviced by one set of level-sensing circuitry.  Using four levels per cell rather than two when storing a certain amount of information might more than triple the size of the level-sensing circuitry, but would cut by half the number of memory cells required.  When communicating over 100-base-T or faster Ethernet, the cost of the circuitry necessary to detect multiple signal levels on the cable will likely be dwarfed by the cost of either having to use a cable with more wires or use cables that can handle more signal transitions per second without an unacceptable level of distortion.
Answer: At the heart of the digital computers processing power is a transistor, which works like a switch.  By raising the current at at the "gate" of the switch, it allows current to flow between the "collector" and "emitter" - the switch is turned on.  The transistor will be designed to operate in one of two modes - fully on or fully off ('saturated') - with a clear division of what those states are.  The transistor can switch between the two states quickly, will remain in the state with very limited errors.
This circuitry forms the basis for logic devices, such AND, NAND, OR, XOR and other functions.  The NAND function being the most basic of the building blocks. These logic devices are assembled to provide processors which remain in a predictable state, and lots of transistors can be packed in a small space to provide the functionality needed.
A transistor can manage multiple, or varying states, but when operating in that manner they do not produce conventional "digital" computers - they do not tend to stay in a predictable state and they are prone to interference, saturation, osculation, etc - so they have limited applications in terms of computational abilities.  Op-amps could be considered analog computers.
Answer: We only use binary(1,0) because we currently do not have the technology to create "switches" that can reliably hold more than two possible states. (Quantum computers aren't exactly on sale at the moment.) The binary system was chosen only because it is quite easy to distinguish the presence of an electric current from an absense of electric current, especially when working with trillions of such connections. And using any other number base in this system ridiculous, because the system would need to constantly convert between them. That's all there is to it.
Comment: This is true but isn't it all already included in the existing answers?


Why are bacteria and archaea in different domains?

Question: As I understand it, the main difference between the Bacteria and the Eucaryota domains are that eukaryotes have a nucleus and bacteria don't. I understand that bacteria and archaebacteria have enough of a genetic difference to be separate kingdoms, but why are they separate domains?
Comment: It is told that *archaea (former archaebacteria)* though showing prokaryotic cells like *bacteria (former eubacteria)* ; *archaea* have more evolutionary affinity with *eukaryote* (eukaryote's main cell, i.e. excluding chloroplast and mitochondria) instead *bacteria(former eubacteria)*.
Answer: The reason that Archaea were determined to be a separate (and only the third) kingdom so late (1977 according to this reference) was because archaea often completely resemble eubacteria.  They are unicellular and have no organelles and appropriately they were grouped with other prokaryotes because of their morphology and cellular physiology.
But by the 1970s phylogeny becoming based on the sequence of DNA and RNA which were just becoming more available.  Based on a simple comparison of the sequences of 18S rRNA of 13 fungi, bacteria and archaea, Woese and Fox showed that the bacteria and the archaea were about as different from the eukaryotes than from the bacteria.  (see table 1).
Since then, the differences between bacteria and archaea have continued to be great.  The wikipedia diagram below is not to scale- the divergence of the three kingdoms is so far back that they pre-date the emergence of eukaryotes entirely. But you can see that fungi and other eukaryotes are more similar to archaea than the bacteria.
BTW, the idea that archaea are extremophiles is not entirely true - they are pretty much exclusively the only kingdom found in these conditions, but archaea have been found to coexist with bacteria and eukaryotes in the open sea and their detection heretofore in most environments may be only due to the fact that archaea are difficult to grow in the lab.
Just found this retrospective from Woese himself, who passed away recently.
Comment: Wikipedia entry for Archaea has a heading *Relationship to other prokaryotes*. Wikipedia entry for Prokaryote has: *The division to prokaryotes and eukaryotes reflects two distinct levels of cellular organization rather than biological classification of species. Prokaryotes include two major classification domains: the bacteria and the archaea.*
Comment: I think the three kingdoms are prokaryotes/bacteria, eukaryotes and archaea...


Will Shaitan receive the worst punishment in Jahannam?

Question: The hypocrites and shirk committers will receive the worst punishments in hell. Will shaitan recieve a worse punishment than them?
Answer: From Surah Al-Maeda Verse No:60:

Say, "Should I tell you who will receive the worst punishment from
  God? Those whom God has condemned, afflicted with His anger, made apes
  out of them, swine and worshippers of Satan, will have the worst
  dwelling and will wander far away from the right path."

this and The matter of punishments is for Allaah to decide, and we know nothing about it except that which He has told us.


Are light socket to outlet adapters safe for outdoor holiday lights?

Question: We just moved into a split level house about 40 years old.  This will be our first Christmas and I cannot figure out how to put up lights because we don't seem to have any outlets outside.  I could buy socket adaptor and put it on one of my outside lights but I don't know if this would be safe or not.  Suggestions welcome.  Not enough time to get an electrician out to put in some outside sockets.
Comment: solar holiday lights would be easiest
Comment: @Jon, solar outdoor lights are dim and pretty terrible in my experience.  They might be easy, but not a direct substitute.
Comment: If you have outlets in your garage, then run the extension cord under the garage door.
Comment: you can plug a few strings of lights into a socket adapter. You can also run extension cords from garage outlets under the garage door.
Comment: You generally want Christmas lights running at times when the sun is *not* shining.
Answer: As long as you don't overload the fixture or the circuit, those socket adapters would be OK, especially for a temporary setup like Christmas lights. The key is making sure you're not overloading anything.
Figure out what else is on the circuit with the outside light, and what size breaker protects that circuit. Figure out what size wire is used inside the light - this will typically be smaller than the #14 used in lighting circuits. Determine the current capacity of that smaller wire, and keep the total load less than that capacity. Using LED bulbs will allow you to run more lights this way.
Of course, using an actual receptacle is the preferred option, so make sure you don't have any outside. Check around the AC unit for a receptacle, and near each entry door. Check in your garage (including on the ceiling, where an opener may be plugged in). Running extension cords all over is quite normal during the holidays.
You may prefer to run an extension cord from inside; just make sure that it isn't crushed when closing the window or door it passes through.
Comment: I took the liberty of emphasizing the critical point here. It's too common that folks rely on breakers for wire protection in these cases, and a 15A breaker is not going to adequately protect 16 or 18 gauge wire with 14.9A of current running to a web of lights. (It's worth noting that stranded wire has a higher capacity than solid, but still....)
Comment: I would want to use an extension cord with a GFCI since the light is probably not on a GFCI breaker and outdoor outlets usually are GFCI protected.
Comment: Those socket adapters (and the sockets, generally) are listed for 660 watts, or 5.5 amps.  If you are series stringing Christmas lights, you will find their plugs have fuses, and I'll bet those are 5 amps.
Answer: First of all talk to either an license electrician, an electrical inspector, or even an electrical engineer instead of asking the average person about wiring. And I would never  put an extension cord under the garage door  for it being pinched by the closing of the door. I went to electrician school, back in the 80's and had an electrical engineering with a bachelors degree in electrical engineering teaching the course, who had his own business with residential wiring. I am also a electronic engineering technologist with a background in residential wiring too.    And my extensions cords that are made for the outside are water resistance to a certain point , they stand up to snow, rain, and if they would get to wet the GFI would trip shutting off the ground fault. Check with somebody who actually works in the field.
Comment: Welcome. Can you sum up your answer in one sentence?
Comment: Hello, and welcome to Home Improvement. This is interesting, but doesn't answer the original question. Please [take our tour](//diy.stackexchange.com/tour) so you'll know how best to contribute here.
Answer: Another thing is that any electrical outlet according to the US Electrical Code has to be a ground fault circuit interrupter receptacle under the NEC (National Electrical Code, article 210-8 for it to be accessible to grade level, or the ground. Now most homes have GFCI  breakers in the garage for several decades since that law was passed. But I still wouldn't put it under a garage door before checking with an electrical inspector in your local area where you live.
Comment: Please use the edit feature instead of adding a new answer.


Make 'All Items' my default location in Google Docs

Question: I'd like to make 'All Items' my default location when I load up Google Docs instead of 'Home'. Clicking to remove the 'Home' label or having to navigate to 'All Items' every single time I want to search all items is getting somewhat annoying. Also, I'd rather not bookmark Google Docs since I'll be on shared machines at school. Is there a setting for what I want?
Answer: There is no setting for what you want, but you can do it by opening https://docs.google.com/?authuser=0#all instead of docs.google.com
The best thing would be to Create a Bookmark for https://drive.google.com/?authuser=0#all and open it whenever you want to open Google Docs.


What is the background story of Hatsune Miku?

Question: I do understand it is a fictional character, and so I feel there must be a story behind this virtual Diva. I am interested in learning "how" Hatsune Miku became interested in singing.
Comment: Sure, Hatsune Miku does not appear in an anime, but she exists firmly within the "anime-o-sphere", however you construe that. The meta post you linked to is very old (like, two days after the site was created) and does not really reflect current consensus about how inclusive we should be with regard to peripheral anime-related topics (cf. Touhou, KanColle before the anime, and so forth). As such, I'm unilaterally reopening this question.
Comment: AFAIK there is none. It was all left to the fans community to decide.
Comment: I guess there's no real "background story" of Hatsune Miku, unless you are talking about how her concept was created.
Comment: @Mindwin, since there are manga that have been published which use the character of Hatsune Miku as the protagonist, she is on-topic for this SE (as compared to questions about vocaloid software, which are off-topic).  (^_~)
Comment: @KousakaKirino I sure woule like to know any details that I can get my hands on.
Comment: @SakuraiTomoko If the fans are allowed to decide, I am sure we would have seen atleast a few spinoffs published over the web. But my search so far has been elusive of such information.
Answer: As is the case with most vocaloids, the company that invented 初音ミク (Hatsune Miku), Crypton Future Media, released an official personal data sheet for Miku; however, this contains her physical and technical traits rather than personality or back story, which intentionally allows the fans to take a role in developing the characterization of the character.  She is referred to as a "beloved collaboratively constructed cyber celebrity with a growing user community across the world." Some fans have been allowed to create officially-sponsored costumes for Miku through a design competition for the Sapporo Yuki Matsuri (Snow Festival).  It could be said that the clothing design becomes a part of the character's personality (i.e. this is the sort of fashion that Miku would wear).
『メーカー非公式 初音みっくす』 (Meekaa Hikoushiki Hatsune Mikkusu) is a manga about Hatsune Miku which ran in『月刊コミックラッシュ』(Gekkan Comic Rush) magaizine published by ジャイブ株式会社 (JIVE Ltd.). It is licensed in North America by Dark Horse Comics under the title Hatsune Miku: Unofficial Hatsune Mix.
『週刊はじめての初音ミク』 (Shuukan Hajimete no Hatsune Miku) is a yonkoma gag manga that ran in 『週刊ヤングジャンプ』(Shuukan Young Jump) magazine published by 集英社 (Shuueisha).
Additionally, some mangaka of 『りぼん』(Ribon) shoujo manga magazine published by Shuueisha have drawn illustrations of Miku that were included in a 付録 (furoku = freebie) included with an issue of the magazine, and on some special pages printed in the magazine.
Each of these portrayals have different aspects and storylines for Miku, in keeping with the collaborative, undefined nature of vacaloid characters. There is no one background story for Miku. Crypton intentionally encourages fans to create their own songs, music videos, visual novels, doujinshi, fanfiction, fanart, etc. and basically anything is fair game; portrayals that strike a chord with many fans rise in popularity, where fans adopt another fan creator's rendition of Miku into their own image of her character. Miku is who each person wants her to be, which includes limitless options for coming up with her backstory.
Answer: Like I said in the comment, official background story for Hatsune Miku doesn't exist. Like pointed by @seijitsu in his answer, Crypton Future Media released only his physical and technical traits. This applies to most other Vocaloids too if not all.
There are various stories about Hatsune Miku on the net. She even have 2 visual novels namely, Mirai no Kimi to, Subete no Uta ni and Mirai no Uta to, Tsunagaru Hitomi. If I remember correctly, one tells about how she got interested in singing. Those visual novels, however, are not official story from Crypton. They are fan made stories released on Comiket.
Depiction of Miku's personal item (ultimate weapon?) the Leek (in Western community) or Negi (in Japanese community) is also based on fan-made videos. It started from the song "Ievan Polka", which is a composer-made song, not a song from Crypton.
You can try checking Nico Nico Douga to find videos of Hatsune Miku daily conducts made with MMD. It has story of her and other Vocaloids like the Kagamine twins, Luka, and Kaito.
Answer: Miku is a product. She is made to sing, she has no other purpose in life but to sing. Before being a singing superstar, she didn't exist.
Miku has a version number, she is character version 01 of the singing software Vocaloid. Her tattoo is much like a serial number on a factory product. Factory products don't have back-stories :(

If Miku did have a background story, it would probably be fan-driven and non-canon, as the creators of Miku & Co left their stories purposefully open so that creators could write their own stories - Similarly, they didn't mention what style of music Miku likes or what her aspirations in life are.


Finding duplicate files?

Question: I am going to be developing a program that detects duplicate files and I was wondering what the best/fastest method would be to do this? I am more interested in what the best hash algorithm would be to do this? For example, I was thinking of having it get the hash of each files contents and then group the hashes that are the same. Also, should there be a limit set for what the maximum file size can be or is there a hash that is suitable for large files?
Comment: It's ironic that a question about duplicates is duplicated.
Comment: You don't say what the files are.

If the files you are looking at are of varying length, then you START by partitioning on length, since two files cannot be identical if their lengths are different.
Comment: Perhaps the duplicate has a different hashcode.
Answer: The fastest way is just to compare hash code of files having same size.
This is the idea of of this answer on SO (see the second command line and its explanations).
There is no security issue while detecting duplicated files, therefore I would recommend a fast hashing code. For instance the project ccache uses MD4:

ccache uses MD4, a very fast cryptographic hash algorithm, for the hashing.
  (MD4 is nowadays too weak to be useful in cryptographic contexts,
  but it should be safe enough to be used to identify recompilations.)

If two files have same size and same hash code, they are probably equal. But there will still be a little chance these two files are different (except if file size is less than hash code size).
As you imply in your question, false positive can happen more frequently as the file size is larger.
There are two options to fix the large files issue:

Use a second hash code for large file (e.g. MD4 and MD5).
Use a dynamic-length hash code

The limit to consider a file as enough large to require a second check depends on how critical is your application.
Finally, the safest way to proceed is:

Detect files having same size
If same size => compare their (already computed) hash codes
If same size and same hash code => compare the full content
Answer: If you are optimising for developer time, you are along the right tracks; if you choose a decent enough hashing algorithm, collisions should be extremely unlikely (see Yanis' link; but aside from those, people typically use MD5 or SHA1 for hashes, although MD5 is not recommended if you are security conscious).  I would go with  something that's available out of the box in your programming environment, since implementing and maintaining a hashing algorithm might not be worthwhile.
If you are worried about runtime performance, there are some things you can do to optimise the process.  There are likely to be two areas which are slow - the reading in of all the data, and the actual hashing process itself.  To give you an idea, most hash algorithms (even the slower, cryptographic ones) can typically go through a few hundred MB per second.  So, unless you are using a (very fast) SSD, the bottleneck is more likely to be disk IO, so you should try to minimise that first.
One idea would be to group files by size first, and exclude any files with unique sizes.  Then hash the first few kB of each remaining file, and using that to produce a list of potential matches (again, only compare against files of the exact same size).  You would then only need to get the full hash of these potential matches, as opposed to every file on the drive.  Depending on the exact characteristics of the drive, this may be faster than simply reading everything in (unless there are a very large number of duplicates, and we're wasting our time trying to exclude them - a worst case scenario).  This should work fairly well for typical workloads, with more knowledge about the actual environment, you could probably tune it much more.
Comment: Is there a software doing your suggested solution on runtime performance?
Comment: @benni I'm not aware of anything doing this particular algorithm, though I'm not very knowledgeable on the existing solutions out there.  On the positive side, the algorithm itself could be implemented in a few dozen lines of code, if one needs a quick solution.

Finding duplicate files?


Which online course for beginners can be completed in the smallest number of hours?

Question: I'm looking for a course where the projected time to read through the text and work through the exercises has been estimated. Ideally it should cover the basics for beginners from A1 to B2.
Comment: I do not think that this post is too broad because 1) it asks for courses where the expected completion time has been estimated, and not for us to decide what we think the time will be, and 2) it specifies the level the course is designed for and the level the course is designed to bring its user to.
Comment: In what language(s)? Duolingo for example is available only in English, and possibly Spanish very soon. So even if it would be fast, it would work only for people that speak English (or Spanish).
Answer: The best approach is to use Zagreba Metodo. It is a course which is especially created for teaching of 500 basic words.
Here is the best course which uses Zagreba Metodo.
Answer: My students use "Kurso de Esperanto" created by Karlo Pereira from Brazil. Most of them complete all the lessons in less than 20 hours.
La Zagreba Metodo should be faster. It teaches about 500 word-roots, which should be enough to get some fluency.
It has sound. You can listen while you read.
A book scanned:  (with sound)
http://esperantofre.com/zagreb/zagreba.htm
It has links to the corresponding interactive lessons.
Interactive. Touch a word to find its meaning:  (with sound)
http://learn.esperanto.com/en/
Answer: I found ikurso 10 lessons enough straightforward and give a pretty good foundations of the language in minimum amount of time:

http://www.kurso.com.br/ (English version)
http://ikurso.esperanto-france.org/ (French version)
Answer: I used the approach with Duolingo and Lernu to do a lesson or course everyday, in that way i used like 20 minutes for day but like at school I didn't forgot what I learned.
Do a little bit every day is helpful to remember because everyday you use the words. I tried with Kurso4 but was to most fast.


Change computer name in elementaryOS

Question: Can anyone tell me how to change the computer name in elementaryOS, please?
Answer: You can easily rename your computer by editing the /etc/ hostname file.
In Terminal, type sudo nano /etc/hostname, press Enter, type your password and press Enter again. Delete the old name and type the new one. Press Ctrl+O to save and then  Ctrl+X to close the editor. The new name will enter into effect after a reboot.
Answer: in terminal: hostnamectl set-hostname new-hostname
Comment: Your participation is much appreciated Let me inform you that we love informative answers with step by step guide. Please try to post detailed information. Have a nice day!

Change computer name in elementaryOS


Why do engines get louder with age?

Question: My engine (Ford Escape Hybrid 2006) has gotten noticeably louder over the years. Not to the point that I'm concerned, but it has gotten me wondering why exactly engine noise gets worse with time. I've heard about piston slap, but if that's not occurring then what else? Do the belts get louder? Bearings? I am just curious.
Comment: What part get's louder? Just the general engine noise? I mean, if there is fiberglass in the muffler, this could deteriorate as well.
Answer: I take it that you're referring to the noise of the engine in the engine bay rather than the exhaust.
I'm personally still amazed by the number of parts that go together to form an engine (and a car in general). Over time of course, almost all of these parts will wear. Serpentine belts will wear. Non OEM air intakes can be very loud (modifications are often not wife-acceptable). Timing belts will wear and extend, putting camshaft timing out. Timing chains will also do the same, creating more noise especially if the tensioner is not working properly.
In my experience, most of the noise is usually generated by the valvetrain. It tends to go out of adjustment over time and will be the noisiest when it is cold - which is usually when you decide to inspect the engine. I would check to see whether your vehicle requires a valve adjustment if it seems excessively noisy. I rebuilt an inline six cylinder Ford engine once and the valvetrain went completely off 2 weeks later. The noise was incredibly loud when driving it.
Comment: Thanks, this is exactly what I was asking. So I would guess though that a moderate increase in valvetrain noise is no need for concern?
Comment: Correct. And usually it will be on cold starting that the noise will be at it's loudest - cars will often 'tick' before they warmup. I would check the maintenance schedule for your car and see what they recommend. Also if you're chasing peak power and economy, you also might want to get an adjustment if the noise seems to have increased over time.
Comment: Does this apply to only motor engines? What kind of motor would start making more noise over time?  AC, DC, brushless,brushed, induction, etc..?

Why do engines get louder with age?


In an Aquaponic system, can grow beds drain into each other?

Question: Relatively straightforward question: In an aquaponic system with multiple grow beds, can one bed drain into another (series), or do all beds need to flood/drain independently (parallel)?
Answer: Grow beds can drain parallel or serially but in the latter case a failure anywhere affects the whole system and not just a single bed.  So, if for example you were using bell siphons, and one of the siphons stopped working, then water could potentially all dump into one grow bed and never leave.
There's also the issue of solids which accumulate inside the grow beds.  You would probably find that the first grow bed in the system would accumulate all the solids if they haven't been prefiltered, and that could affect the drainage.
And finally the plants presumably get less and less nutrient as they pass through the beds so that the bed at the end of the series has the least nutrient present which may not be what you want
Comment: Well, there's no guarantee without regular analysis of the water what is present and what is absent.  So, you may find that some elements which are not in abundance such as iron and potassium in particular are removed early and lost to those at the end of the run.  If you look at those doing vertical hydroponics, often the plants at the bottom grow less well than those at the top.
Comment: I am less concerned with the mechanics of it (ex. ensuring drainage) than I am with the nutrient flow. Presumably, not all, or even most, of the nutrients are absorbed by a single bed during a flood period; otherwise, the system would be severely depleted in just a few hours. I am interested to know what is, or isn't, done and why.
Comment: This is hydroponics, yes Graham?  Boy, I think one would have the best chance controlling parallel 'beds'.  If you got a disease in one bed it would be transferred to all.  One of the biggest draw backs to hydroponics.  Fertilizer should not be called nutrients.  It is not food.  We humans think when we hear 'nutrients' the more the better.  Not at all the truth.  @GrahamChiu do these systems ALWAYS have fertilizer chemicals in the water?  Is there a way to test for excess or too little chemicals in the water?
Comment: Commercially they test for chemical concentration or just run to waste. Home growers might use a meter to test pH, and EC.


Sales Tax not added to total when memberships include donations that are separate transactions

Question: We are having a problem with sales tax calculations when letting the user add an optional donation to a membership purchase or renewal. We need to separate the membership and donation into two transactions (selecting "Separate Membership Payment" on the membership tab of the contribution page) so that the the charitable donation receipt will be generated.  If we don't separate the payment, the sales tax is computed properly -- but then we can't generate a charitable donation receipt.
When we separate the transactions, the sales tax is not added to the membership purchase, but it does appear on the receipt but is not added or charged.
On the contribution page:

Financial type is set to Donation - that type will generate a charity receipt, but no sales tax
"Contribution Amount section enabled" is selected to let the user enter a donation with membership, with "allow other amounts" selected so that they can enter what they want
"Separate Membership Payment" is selected, as described above

For example, if we select a $90 membership that needs $11.70 sales tax with an $100 extra donation:
Receipt 1 (for membership), shows sales tax but it is not added to the total:

Receipt 2 (for donation) shows no sales tax and is correct:

I have tried the patch but that didn't make a difference.
I am using WordPress 5.5.1 and CiviCRM 5.29.1 with CiviMember and CDN Tax Receipts extension.
Answer: Looks a bug - can you log an issue in gitlab - https://lab.civicrm.org/groups/dev/-/boards
Comment: https://lab.civicrm.org/dev/financial/-/issues/154


Drop zones for skydiving in China

Question: I would like to know about drop zones for skydiving in China.
What is average cost here in China for skydiving?
Answer: A quick Google yields the forum site DropZone which lists 2 drop zones.
Normally the best place to start searching for things like this would be national associations though China seem to lack such a body

Drop zones for skydiving in China


Can a client use my designs on products I do not provide?

Question: I've developed several designs for military units over the past few years for one particular store on a military installation which is a not for profit entity.  Most of the designs were developed for collector coins and t-shirts which involve military units.  My company used to provide many items for this client.  Now my client has found services cheaper.  I noticed the designs used on the t-shirts, cups, mugs, etc... are the designs I've developed and created.  Since we were providing a retail item for this client, they were only charged hourly for the labor involved in developing artwork for that specific item.  I did not think it would be fair or reasonable to sell the rights to the artwork at that point.  I have no written contract with this client.  After noticing the logos on most of the clients retail items in their store, I've asked for a sit down meeting.  What kind of advise can you give me relating to the written contract?
Comment: Thanks for the input.  I understand this but was not aware of the fact that all of my designs were being sent all over the world for reproduction until I paid a visit to the shop.  Even though the shop is not for profit they do make a lot of profit from the merchandise they sell.  The issue on the table right now is that they'd like to have me develop several other pieces of artwork for a specific item.  Now that I know that they are sending my designs out and making profit from them, I feel it would be foolish of me to consider creating any further art without addressing rights of new and old
Comment: Are you asking what you should put in the contract? Because this is so far after the fact that I can't imagine how you're going to convince the client that they now have sign a contract agreeing to pay you for artwork which they've been using for free. You have no written contract right now. If you had some verbal agreement, and you have a really good lawyer, you *might* be able to bully them into signing, but I wouldn't bet the house on it. You basically have to hope that they're more moral than greedy.
Comment: And since this is a "not-for-profit," my guess is that they're taking advantage of not having a contract to use the designs (for free) at every possible opportunity because they don't have the money to pay you. More than likely they will refuse to sign a contract and refuse to pay you; the best you can probably hope for is that they'll stop using your designs without permission.
Comment: Yes, I'm asking for input for a contract based on the situation at hand.  I'm most certain I'm not the only graphics company that's had to deal with this situation and can only hope I get some good input and can save the client.
Comment: The shop is coming back to you for more work? That's a *very* salient point which you didn't include. Now you have them more or less over a barrel. *They* are coming to *you* for more work. You have complete leeway to set (fair) terms for the fair use of your work, previous and to be commissioned.
Answer: You should consult a lawyer if you want to pursue this, but the general rule of copyright is that unless you have explicitly, in writing transferred the copyright for these designs, they remain yours.
This is one of those points that comes up quite frequently in the field of identity design, and I've more than once run into clients who wondered why I insisted that they must accept and sign a written transfer of my copyright to them, when I've created a logo. Savvier clients make sure that's in the contract before we start.


Is it a sin to vacuum cobwebs & ants while cleaning?

Question: I vacuum away cobwebs, ants & any other small insects I find while cleaning the house. My intention is to clean the house but I still feel bad about those insects.  And most of the time I don't clean the vacuum cleaner bag on the same day & even if I do so some insects are already dead. I'm unable to use brooms or anything to clean the cobwebs due to medical conditions. Is it a sin to do so?
Comment: Maybe try those soft-feather dusters and wearing a mask if you have allergy? They don't kick up as much dirt as the electric vacuum, save you some electric bills, and they also save the lives of those tiny poor beings. Give it a try. Less effort and more benefits!
Comment: Thanks a lot for the idea. :)
Comment: The fact that you feel uneasy and ask this question indicates that you know the answer. Which method of cleaning would a spider prefer you to use? Perhaps you could compromise by gently sweeping the cobwebs away from the spider's hiding place and then vacuuming the brush. The trouble with vacuums is they suck the insects out of their nooks and crannies in a way a brush does not, .
Answer: Buddhism doesn't deal with sins, it deals with consequences of our actions (karma).
Your example seems like a trade off between feeling bad for the insects on one hand, and having a dirty home on the other. The former, being merciful towards other living beings (karuna) is considered a virtue in Buddhism as it can save us from feeling bad.
Sometimes life is about choosing the option giving us the least bad consequences for everyone involved, out of all the options. The effort to balance our actions (upekkha) is considered yet another virtue in Buddhism as it unifies others wellbeing with our own, saving us from destructive self-sacrifice on one hand and selfishness on the other.


"Thousands of thousands" vs. "Thousands upon thousands"

Question: Is "thousands of thousands" grammatically correct? Why does it seem that "thousands upon thousands" sounds better, even though the former is closer to the logical truth? Is there any difference at all?
Comment: The answers by _AUAnonymous_ and _pavium_ hit on the crux of the matter. I might also add, that to me "thousands upon thousands" has a stronger connotation of compounding, and possibly even of indefinite _thousands_. I would be inclined to use the former in a literal sense and the latter in a more figurative sense.
Comment: I have never heard "thousands of thousands". Only "thousands upon thousands" and "thousands and thousands".
Comment: @tenfour The phrase "thousands of thousands", is in the King James Bible. It means "Millions".
Answer: I realize this is an English language question site, but to answer this question in terms of math:
<code>"Thousands of thousands" = 1000 x 1000 (or more)
"Thousands upon thousands" = A x 1000 (where A is any relatively small number)
</code>
So in simple terms, "thousands of thousands" is a lot more than "thousands upon thousands", although I do agree with you the latter does sound better.
Comment: Well, actually your first equation should be `X * 1000 x 1000` where `X` is greater than 1. But, strict math aside I think this would be a normal interpretation of `of`. Consider an easier example like "5 bags *of* 5". Or consider expressions like "the 3rd daughter *of* the 5th son". So I would say *of* tends to always refer to multiplication or sets of some kind.
Comment: nitpicking version: `m x 10^3 x n x 10^3` vs `m x 10^3 + n x 10^3` where `m, n ∈ {2,3,4,5,6,7,8,9}`
Answer: To my ears, thousands of thousands is a really large number (possibly a million) at a specific moment (as already indicated in other answers)
However, thousands upon thousands might imply a progress in time: a thousand followed by another thousand later followed by yet another thousand even later and so on.
Answer: To my ear, thousands upon thousands could just mean "several thousands" or "many thousands".
I've never understood it to mean thousands of thousands, which would amount to millions — which the speaker would probably use, if that was meant.
Comment: the main reason for thousands of thousands is that the concept of millions is only good for abstract readers and conceptual thinkers, where much wider audience has direct experience with thousands, so 'thousands of thousands' *can* be more easily imagined compared to millions.
Answer: It seems to me that 'thousands upon thousands' gives the impression of an innumerable number and then just to make it profoundly clear that it is a number beyond a 'name' ... Tack on a 'thousands of thousands' onto that innumerable number!
Comment: They are not used together-  the question asks about one ***vs*** the other.


If you have trouble fulfilling a promise

Question: If you promised to give a $500. a month to a given charity as long as you had the money, and later your expenses go up such that the only way to give the money to the charity is to not feed your family, are you still obligated to give the money?
Comment: Ask a rav. There may be way out of this. Generally, the practice is to not make vows for exactly this reason.
Comment: That's why we say "G-d willing!"
Answer: Generally, a promise must be kept (and a promise to give charity is effective when taken using lesser methods than a standard promise), and for that reason we avoid promising. There are ways to annul promises: one must go to someone who knows the rules of such annulments (so go to your rabbi!), and he will determine whether it can be annulled. In brief, a promise can often be annulled if a circumstance has since arisen that was not foreseen at the time and that, had it been foreseen, would have meant the promise wouldn't have been taken.
Comment: At the time I made the promise I fore saw the potential of not being able to afford it.  That is why when I made the promise I said "as long as I can afford it". I did that thinking that if I got to a difficult point financially speaking, that I would be absolved of the promise.  Am I incorrect on that?
Comment: @MIchael, consult your rabbi.
Comment: Moreover, you can't annul your own promises even if you know they can be annulled. You need another person to do it.


What's the most efficient way to earn Rupees early on in Zelda: Skyward Sword?

Question: I am at the Forest temple in Legend of Zelda: Skyward Sword and just got the flying bug remote control thingadongdong. There's a lot of stuff at Beedle's Airshop I want to but but it's friggin' expensive! What the most effective way to earn rupees at this point in the game?
Answer: At the point you're at, you don't actually need all the shiny stuff right away. The Bug Net and the Extra Wallets are probably what you need the most right now, especially if you want to buy the shinier things early.
That said, this early on, there are few ways to get Rupees effectively:

You can try to find all the Goddess Cubes you can and open them; they can contain Rupees, but often contain other things.
You can catch as many bugs as you can with the Bug Net (Deku Hornets come in especially large numbers) and go see Stritch in his room at the Academy at night. He will buy some bugs off your hands, but only buys four specific kinds of bugs a night.
It is doubtful you have a lot of treasure by now, but if you're willing to part with them (keep in mind they are used to upgrade your equipment at Gonzo's), Rupin will buy treasure from his house at night on a mechanic like Stritch's. His house is located on the other side of the river, near the graveyard.
There is also the classic "break everything you can" strategy. Break all the pots and skulls you find. Cut all the grass and flowers you can. Roll into every tree.
Comment: Great, thanks Kareen! What I really want is the bug medallion, I have 2 extra wallets but getting to 1,000 rupees is proving difficult.
Comment: Thanks for the tips about Stritch and Gonzo! I had like 48 Deku Hornets and 28 Amber Relics, plus a lot more bugs. Selling those allowed me to buy the item I wanted!
Answer: One other thing that you can do for some (relatively) quick rupees early in the game is sky-dive down to the Pumpkin Landing (the island with the Lumpy Pumpkin on it) from a high altitude.
On your map, set your beacon on Pumpkin Landing and then fly towards the column of light that your beacon gives off. All the while, fly higher and higher. Once you start to get close to the Lumpy Pumpkin keep checking your position on the map (it helps to zoom in), and when you're over top of the Lumpy Pumpkin dive off of your bird. On the way down you'll see these multicolored flying squirrels, if you can touch all of them before you land/use the sailcloth then you'll get 20 rupees.
You can sky-dive successfully if you're just at the top of the column of light that your beacon gives off, but it's easier if you're as high as you can go when you dive off of your bird.
Comment: Thanks. And then once there, you can fill up a bottle with Pumpkin Soup and bring it to the Knight Commander for an extra 10 rupee profit.
Answer: At that specific moment in the game, the best thing you can do is to use the Beetle (your flying bug remote) in the large dome room surrounding the room that you got the Beetle in.
There are several boxes hanging from the ceiling, use the bug remote to cut them down, most have a red rupee (20 rupees) in them.
Also look around the top edge of the room, there are lots of little crevices all around the edge of that room that contain rupees as well.
Answer: there is a bamboo island I forget where it is, but every time you chop between 15 and 20 times through the bamboo, u get 30. I forget what it costs to play, 10-20 rupies


About models of Human Cognition

Question: Are there any models of Human Cognition that do not require some physicallist concepts? Maybe a model of the Mind-brain system as a self-sustaining self-controlling 'behavioural-algorithm' processing and management system. Where the self-controlling processes and self-interactions can only be reduced to various fundemental 'behavioural-programs' and not further to various neuro-chemical events. One might ask how could a self-integrating system of 'behavioural-programs' interact with each other so as to keep their general functioning abilities intact and self-sustaining? Could a 'conglomeration' of behavioural-programs keep 'itself' functioning as a 'whole' and 'keep' all its relevent subprograms running smoothly so it is self sustaining and it can 'change' parts of itself witout sabotaging function? Maybe a study of the self-controlling ability  of a well organised 'conglomeration' of behavioural 'programs' that all cooperate ( or any system of programs that 'work together') could explain the way the Mind-Brain is organised. What do you think?
Comment: The Human Mind-Brain could be thought of as an info. and info.-algorithm processing and management system. Where the basic elements of the system are the coalesced and 'semi'-coalesced info. algorithms that the system 'forms' from previous 'self-variations' and/or present self variations. These 'behavioural' algorithms can be combined and recombined or changed ( within functional limits) so as to make new algorithms or variations from older ones. So the Mind-Brain could be considered an info. and info. algorithm management system that can constantly 're-program' itself and is self sustaining.
Comment: There is a book (which I've not yet read myself! but I am very interesting): [Being No One The Self-Model Theory of Subjectivity](http://mitpress.mit.edu/books/being-no-one) By Thomas Metzinger. This is from its Overview: "_His epistemic goal is to determine whether conscious experience, in particular the experience of being someone that results from the emergence of a phenomenal self, can be analyzed on subpersonal levels of description._"
Comment: Could various necessary dynamic traits of a process be considered just as 'real' as the biochemicals involved in the biochemical reactions within the process? In the sense these 'process traits' are invariant in some way and whether they occur or not as they are 'supposed to' allows the process to function 'properly'. So one could change the whole process by changing how some of these necessary process traits happen without possibly changing the underlying biochemical events.
Answer: This is an interesting topic. And there are some controversial theories about cognition.
There is the Computational Theory of Mind. This was proposed by Hilary Putnam in the middle 20th century.
In this theory the mind/brain is a computer, more exactly you can see the brain as the computer and and the mind as a program in execution on the brain. So thinking equals computing.
We are not really talking about modern digital computers here, we are interested in the theoretical sense, a computer handles symbols following an step by step procedure (an algorithm) to form output from input.
Mental states are representations. As you may know algorithms need the object input to be in some form of symbols, because the actual object can't be computed, only the representation of it.
In fact, Cognitive Science has strong links with Computational modeling/Artificial intelligence and its application to study mental processes.
Is interesting to note that this kind of theories born little later than Theoretical Computer Science. Alan Turing in his 1950 paper Computing Machinery and Intelligence argues against all the major objections to the proposition that "machines can think". He even created the famous Turing Test, wich in response originated the Chinese Room experiment. Altough there is some philosophical background about "machines" well before Alan Turing, for example in Descartes Discourse on the Method.
As a related thing, there is this book: The Emperor's New Mind: Concerning Computers, Minds and The Laws of Physics (1989).
In wich Roger Penrose argue against the algorithmic approach for consciousness. He states that human consciousness can not be computable by a conventional Turing machine (wich is a Theoretical Computer Sicence model). And he hypothesizes about quantum mechanics playing a role in the understand of consciousness. Actually, there is a newer book from the same author extending the same topic.
Another books that may be of interest for you:

Gödel, Escher, Bach: An Eternal Golden Braid
Infinity and the mind
The Recursive Mind: The Origins of Human Language, Thought, and Civilization
Comment: Maybe the MIND ( similar to what Putnam wrote ) is a 'self sustaining' conglomerate of 'programs' that constantly maintains it's 'presently' important invariant qualities all the while being able to 'change' various qualities or 'info.-packages' 'within' itself ; it is constantly able to reprogram itself towards any 'semi-coalesced' goals it can set up. So it is a self-programming info. and program management system. It also should not be able to cause 'dis-functional' change to itself.

About models of Human Cognition


Hardware Level Query for Pi Version

Question: Is there a way you can query the model and revision of a Pi from a script without accessing files that are generated at install time for the OS? I have a project where a web page needs to display the model and revision of the Pi it is installed on, and I'm currently getting the info by looking at the revision number in /proc/cpuinfo. However, that file is populated when the OS is installed. The goal is to be able to have a single image that can be installed on either the Pi 2 or 3 and the page should be able to identify the model regardless of which Pi the image is installed onto.
Answer: Files inside /proc are not "installed".
/proc is a virtual filesystem. No files inside /proc exist on the SD Card.
They are created by Linux on every reboot and only exist inside RAM.
Try the following command to get a model name, for example:

 cat /proc/device-tree/model

Linux itself will create, delete and modify files inside /proc to represent internals (id + memory addresses of processes, CPU cores, USB devices etc. etc.)
The files inside /proc will always be different even if all your Pis run the same image.
Comment: Huh... that's interesting. I've tried the same image on two different Pi's though and both said Pi 3 when one of them was a Pi 2, and I was grabbing from /proc/cpuinfo. I assumed since the image was made when that file already existed, then installing the image on another Pi would result in the same info in that file.
Comment: @DarinBeaudreau Later model Pi2 use the same SOC as Pi3
Comment: Right, but the revision number is different for every model. That's what I was looking at. The problem was that I forgot to delete the page that was generated with the info already on it before creating the image. I just needed to delete it so it would re-create the file with the correct info on the page.
Answer: To elaborate the answer from @flakeshake: files under /proc/ and /sys/ are called pseudo files. They are the interface from the kernel to the user space. The kernel shows its settings with them. So if looking at /proc/cpuinfo you get the info from the kernel it just see at the time you ask for it, e.g. with cat /proc/cpuinfo.
You can also modify the kernel settings by writing to pseudo files. For example look at network settings with ls -l /proc/sys/net/ipv4. Nearly all pseudo files there are writable so you can fine tune your network but you can also make it complete unusable ...
Comment: @DarinBeaudreau You can respect it by upvote ...
Comment: I did, but it's not visible because I only just joined this particular community.

Hardware Level Query for Pi Version


If I have backed out of moving into my apartment, is my lease still binding/ am I entitled to a refund if my guarantor never signed the lease?

Question: so I am 22 years old and from the state of New Hampshire. So I'm a recent college graduate and during the last 2 years, I have rented through the same leasing company with no problems. Fast forward to this past May I graduated and was planning on renting through the same company again and had signed the lease over the summer for a different apartment with the hopes of everything running smoothly. Keep in mind its a college leasing company so they do require a guarantor. I was planning on using the same guarantor as the previous years, but they did not support my move so they decided not to sign the lease this time around. Before I had known they weren't going to approve, I had paid this fall's semester in full ($4,000),on-time and before my move-in day. Due to a lack of job-security/COVID, I had to keep pushing forward my move-in date to the point that I decided to back out of my lease and not move as a whole. Also, I did not pay my security deposit and I did not pay for any renters insurance for the apartment yet/at all because of the uncertainty of when or if I was going to be able to move in. As well, in my lease, it says I am not allowed to move in without renters insurance. Therefore, I was wondering if I was entitled to any money that I had put forth because I did not have a guarantor sign my lease?
Comment: Whether your guarantor signed or not only means the leaseholder can't ask the guarantor for money, but has to ask you. Whether they have the right to be paid is completely unrelated.
Comment: Did _you_ sign the lease?  What does it say about early termination?
Comment: Okay, well my lease states " The lease CANNOT be terminated prior to the lease end date unless the owner-approved replacement is found. The resident, prior to being released, if and when they find a replacement, will pay a $250 release fee. The resident prior to being release, will pay a $500 fee if the owner finds the replacement."
Answer: Yes, the lease is binding
You were required to get a guarantor and you didn't - that might allow the landlord to terminate the lease but it certainly doesn't allow you to.


How do I get unlimited potion effect?

Question: Me and a friend of mine were making a parkour map and we thought it would be handy if there was a way to give the players a unlimited potion effect like jump boost or speed.
Answer: You can use command blocks, type in the chat window /give username 137 with commands enabled (if you're OP), and it will give you a command block. You need to be OP and in creative mode to use these. Place it and right click it, and you will see a text field where you can type
/effect @p <effect_id> 1000000 [amplifier].
This will give the closest player to the block 1000000 seconds of the effect when it's activated with redstone. Effect id's are listed on this page, the first column is the number you'll have to use as <effect_id>. The amplifier can be any number between 1 and 255. Normal potions will give either 1 or 2 as amplification. For example, to give the player speed 2, the command has to be
/effect @p 1 1000000 2.
or for jump boost 5, you'd get
/effect @p 8 1000000 5.
You should watch out that any amplifier value between 128 and 250 will disable jumping, and any value above 251 will decrease jump height.
If you activate the command block with a button, for example, you'll get almost infinitely speed 2.
A command block with time 0, like /effect @p <effect_id> 0 will disable the effect when powered.
There's more information about command blocks at the minecraft wiki.
1.8 snapshots Edit:
In the 1.8 snapshots, an extra parameter can be added to the command, which will hide particles when set to true. This will remove the curly particles around your head, whilst still giving the effect. eg. /effect @p 8 1000000 1 true.
Also, as Zoweb pointed out, command blocks are now obtained using the command /give <playername> command_block, instead of the id 137.
Comment: For everybody curious: 1000000sec = 16666min = 277hours = 11,5days. Not exactly, but a really long time.
Comment: @DatEpicCoderGuyWhoPrograms `command_block` works fine for me.
Comment: @Ragnagord You have to do __minecraft:command_block__ not just __command_block__
Comment: You can also do __/effect  clear__
Comment: Play for 11,5 days... Wow.
Answer: I suggest using a Beacon. Beacons provide ONE of the following powers:

The five primary powers are:
Speed: Increased movement (similar to a potion of swiftness).
Haste: Increased mining speed.
Resistance: Increased armor rating.
Jump Boost: Increased jumping distance and height.
Strength: Increased melee damage (similar to a potion of strength).
Level 4 beacon structures can also select a secondary power. This can either be Regeneration or a level II variation of the selected primary power. When selecting the level II variant, Regeneration is no longer provided by the Beacon.

You can also have  more than one beacon and select a different effect for each one.
Comment: __/effect    __
Comment: But still, good answer!
Answer: You set a command block up, for example, for Speed II you would write
/effect <playername> 1 <any valid number>

and then you wire it up to a redstone clock, then it will constantly effect and re-effect .
Comment: This doesn't really provide anything new.
Comment: You could just replace the time amount with something over __9999__. This will give an infinite potion effect until the player dies.
Comment: That way you wouldn't have to use a constant redstone clock, which, depending on how powerful someone's computer is, can lag their game.
Answer: To give yourself ∞ length of a potion, you could either use a command block or you could just type it in chat (YOU MUST BE OP).
Both ways are very similar or exactly the same if you are using 14w11b or over.
In Command Block or While Using 14w11b Or Over
Type in /effect @p [your effect id - go to this link to get the id's] 9999 [strength - remember that 255 (the max) will usually cancel it out so maybe try 100. If you try the effect Jump Boost (8), and you make the strength be 250, this will cancel all jumping (which can actually be quite useful!)]
Remember that to get a command block in 14w11b or over, you have to make sure to type in /give <playername> minecraft:command_block, not /give <playername> 137. Though in below versions you can use /give <playername> 137.

In Chat While Using Under 14w11b
Type in /effect <playername> [effect id] 9999 [strength]

Edit
Now, in 1.8, you can write the name of the potion instead of the ID.
Comment: I think for infinite time it has to be over this magical number 372000 or 37200, not sure, but I am fairly sure that this is right.
Comment: @DatEpicCoderGuyWhoPrograms Well when I tried it with 9999 and go into my Inventory, and I have given myself an effect, it says I have ∞ length of potion left.
Comment: Hmm, good to know!
Comment: Technically 255 isn't the maximum because it's actually treated as -1. 127 is the maximum.
Answer: you have to either type in the chat /effect (player) (effect id) 1000000 or do the same in a command block (give (name) 137 64) but type effect @p (effect id) 1000000
Answer: so the first thing you do is to make sure that your OP. Then, you press the slash button and it opens the command thing. Then you type in: /effect [playername] 1 4000 [amplifier]   That gives you infinite speed!!!

How do I get unlimited potion effect?