What's a good metaphor for a simple state machine?

Question: This is a bit of a weird question so I'm not sure it fits here, let me know please. This is a question about UI design for a video game. The question is purely about user experience, but I'll have to explain some concepts to get there so bear with me.
The setup: I'm making UI for a game with turn based combat. It has characters that have energy bars and can use various abilities for an energy cost. A new character has a gimmick: they have a finite state machine that generates energy under certain conditions. Here's how it works: it has 3 states, let's call them 1, 2 and 3. Using abilities moves the current state forwards, so they move from 1 to 2, 2 to 3 and 3 back to 1. Whenever state 2 is reached, the machine is "charged". This mean the next time the state moves between 1 and 3, one energy is awarded to the character. Once the character gets this energy the machine is "depleted" and no more energy is awarded until it's charged again by landing on state 2.
The problem: How do I visually convey this to the player? It's hopefully simple enough to explain, but no one wants to read a wall of text explaining a game mechanic, and more importantly the player needs to understand their current state and whether or not the machine is charged at a glance under all circumstances. I need a good metaphor for this state machine that hopefully conveys its function to a player without even reading an explaination.
What I tried: I can represent the state machine as a clock to convey that 3 connects back to 1, and have it glow when charged and remove the glow when depleted. The issue with this is that there's no visual connection between how and when it charges and depletes. The fact that 2 charges and 1->3 depletes seems completely arbitrary, has to be established and needs getting used to, so it doesn't work so well.
I also though about representing it as a kind of circuit given charge is commonly associated with electricity, but I can't find and intuitive way to visualize states and how they influence charge.
I also thought about representing it as a water tank, with water as a metaphor for the charge and gravity as a metaphor for getting that energy, but I again can't make a concrete design out of it that makes sense.
My question: is there some simple metaphor I'm missing that can clarify this concept intuitively? I've thought about this for weeks, thought about representing states linearly or on a circle, or maybe making different tracks for charged and depleted states but nothing stuck. Any help would be super appreciated.
Some final details: I explained the state machine as simply as I could but in reality it has some other details that I hope can be incorporated into whatever metaphor works for the simple version. Here are those details:

Certain abilities can move the state "backwards", 1 to 3, 3 to 2 and 2 to 1.
Charge is cumilative. So repeatedly moving between states 1 and 2 will increase the charge until you pass 1-3 again, at which point multiple energy units are awarded (this actually makes it a push-down automaton but that's besides the point).
Certain abilities cause a barrier to be erected between two states, making it impossible to use abilities that move the state in the direction. Otherwise movement is always permitted in both directions as long as the character can afford the ability.

Thanks for reading!
Answer: Summarizing:

3 states
Infinite clockwise
Maximum energy = Level 2
Charge level + = 1 → 3

After charge +

The energy is awarded
The machine is "depleted"


carousel plugin / setup / code embed

Question: I'd like to add in a carousel feature within the body of a webpage. I have successfully embedded generated code from sites where i've generated a small animation but i can't seem to find anything online for a carousel - there are older entries i've come across which mention doing this with native EE function but the posts are several years old. help?
Answer: You can easily do a gallery with the grid fieldtype and any number of jquery (or other) slider plugins.
Comment: i'm admittedly very new to expression engine - where might i get such a plugin? when i google these things the posts relating to them are all from 2012 or 2014
Comment: grid is a default fieldtype included in (at least) EE3. for EE2 grid might be available in EE2.x but i can't remember. but updating to EE3 is advised anyway
Answer: If I'm understanding your question correctly, you need to find a carousel script and then have EE output the contents that the carousel will display.
There are many carousel plugins that typically run via jQuery.  Personally, I use owlcarousel https://owlcarousel2.github.io/OwlCarousel2/
Once your carousel plugin is installed and is working on your page you can setup your EE tags to start displaying your content. Most carousels use a simple ul li structure where each li item is a photo or other info.
For outputting these things via EE, you would simply use channel:entries and output your fields content - standard text with a link to an image, an image or file field or grid content. You could have an EE grid field that contains an image, a link, text description or whatever. Once you have an entry setup, you would just structure your tags to format that output to replace the html the carousel is expecting.  Use the EE tags to randomize, limit, display by category, etc.
Hope this helps.

carousel plugin / setup / code embed


Can you checkmate with rook vs knight?

Question: Is it possible to checkmate if all you have is a rook and your opponent only has a knight? If both of you play without mistakes or blunders?
Comment: I don't have time to write a full answer, but yes if the knight is poorly place (near the side of the board or far away from the king). Check out https://www.chess.com/article/view/rook-vs-knight
Comment: You can check particular positions with a tablebase which will give you perfect play: http://chessok.com/?page_id=361
Answer: When you have a Rook & King vs Knight & King then in most cases the Game would be a draw if played with Best play . Now the Person who has got the Knight he is to make sure that the Knight does not get separated from its King . The Rook should try pushing the King either on the 1st or 8th Rank or a-file or h-file. The Opponent King should try centralize himself . If also the King reaches any of the four Corner ranks or files then the Knight should stay close with the King . The Knight always hinders the Checkmate pattern and comes between the Rook & King .
In this kind of play it is the focus & attention of the Knight Player that plays the role because he is to make sure that Knight does not go far from the King where sometimes it gets trapped and the Game gets Lost.
Answer: The short answer is yes but under certain conditions. Here are some tutorials on how it can be done.

https://www.chess.com/article/view/rook-vs-knight
https://www.youtube.com/watch?v=xODyqQ95zV0

Can you checkmate with rook vs knight?


DIN 41612 current rating - peak or RMS?

Question: DIN 41612 connectors are rated at 2A per pin.  Is this the absolute maximum current or RMS?  I want to use a DIN connector for power level audio.  Music signal peaks commonly reach 24 dB (16x) above the RMS level.  If the current rating is RMS, what is a safe peak maximum?
Answer: Like all ampacity ratings, this is based on the acceptable level of conductor -- or pin/socket for a connector, heating, and is thus a RMS rating.

DIN 41612 current rating - peak or RMS?


How to complete Powering Up objective on Temple Run 2

Question: I started level 11 but I can't seem to complete this objective. It says to fill power meter 5x in one run so I've died over and over and nothing. Please help. Thank you.
Answer: Just collect coins until your power meter (upper left-hand corner) lights up, double-tap the screen to activate your chosen ability, and repeat that four more times in one run.

You can make this slightly easier by choosing an ability that does not block you from filling your power meter while it is active. Those would be Coin Bonus, Score Bonus, and Gem Bonus.


Use of the term "reckon"

Question: Did the use of the term I reckon originate in the UK or in the southern US?  I hear the term being used both in British English (like on the BBC) as well as in southern US dialect.
Comment: It comes from the [Old English word *gerecenian*](http://etymonline.com/index.php?allowed_in_frame=0&search=reckon&searchmode=none), meaning "to explain, relate, recount." So England.
Comment: Note that there are two fairly distinct (but related) meanings/uses (in the US).  Reckon meaning to "calculate" (as in "dead reckoning") is a fairly "normal" word (though typically only used in limited circumstances).  Reckon meaning to "believe" ("Well, I reckon he's about to Omaha by now") is not as formal/"normal", and is often used (in movies, etc) to suggest a "country" dialect.
Comment: In Britain there is no correlation between using the word "reckon" and lack of education or intelligence, as there seems to in the States.
Answer: It is not possible to be completely certain what you are asking, because the verb reckon can be used in many ways, all of them with a subject in the first person singular. It looks to me that this wasn't something you reckoned with, unfortunately.
But the one you're thinking of, I imagine, is the one that could replace the first instance of imagine in this sentence.  The OED says that this is used parenthetically or finally, and that

Formerly in literary Eng. use; still common in Eng. dialects, and current in the southern States of America in place of the northern I guess.

So it certainly began in England where it saw literary use, and is still common there in various dialects as well as a distinctively Dixie thing in the States.
The first citation for this sense antedates Plymouth Rock:

1603 Sir R. Cecil in Harington Nugæ Ant. (1804) I. 345 ― He is, I reckon, no wise man that looketh this waye to heaven.

However, it is also possible that you're thinking of this very slightly more general sense:

To consider, think, suppose, be of opinion, etc., that. Also with omission of that. Now usu. colloq., esp. in the U.S. (formerly chiefly in southern States).

The first citation is from the early 1500s, and two centuries after that Jonathan Swift was using it in the modern way when in 1712 he wrote:

I reckon the Queen will go to Windsor in three or four weeks: and if the Secretary takes a house there, I shall be sometimes with him.

Here are two recent citations of the same use:

1963 Social Problems Spring 367/1, ― I reckon it'll always be lucky.

1977 I. Shaw Beggarman, Thief ɪɪɪ. ii. 193, ― I don't reckon I've had a fare there for more than ten years.

Perhaps these are not the senses you were looking for, but if you would be so kind as to elaborate your intended sense, you can reckon on further OED citations for that one, too.
Comment: Nice bit of reconnoitering through the multitude of available historical sources.
Answer: "I reckon" and ".. didn't reckon on" are common in different area of England. There were certainly common in northern English accents in my grandparent's time -  well before TV or other media would have brought any American influence
Answer: The word reckon is often used in place of guess or think.
Typically, a common American English stereotype is that it signifies ignorance or a lack of intelligence and is commonly used when creating "southern" or "western" dialogue.
However, though the word's usage is scarce nowadays, it is still used when creating dialectical differences due to its strong relation to those who are of the aforementioned regions.

Use of the term "reckon"


Explain how an antenna works to an 18 year old

Question: It's either math or magic. It seems like the only thing that will explain operation are complex formulas.
If a child were to ask "how does an antenna work" what should one say, it magically changes electricity into invisible photons?
Comment: Are you familiar with [ELI5](http://www.reddit.com/r/explainlikeimfive/)?
Comment: I'm looking more for how it works, how little electrons through a wire can convert into waves and escape.
Comment: I think that's a bit beyond the understanding of a five year old child. Can we maybe change it to "explain like I'm 18"?
Comment: "How does it work?" or "What does it do?" Are you looking for an explanation of the principle of radio communication, or an explanation of why specifically an antenna can do that, and why something else like a boiled egg or a cardboard box can't (or at least, not very well)?
Comment: ok does that look good?
Comment: A large electromagnetic internet.
Comment: Perhaps explaining radio transmission could go back to the *very beginning*, with Heinrich Hertz. https://www.famousscientists.org/how-hertz-discovered-radio-waves/ All the elements are there: generation via sparks, antennas for receiving, transmitting. I also recall a personal experience: during a lightning storm, a nearby flash produced audible sparks across house wiring perhaps at a wall plug or light switch, then loud thunder a second later. Nature's spark transmitter.
Answer: You know how sound waves let me talk to you? You can't see them, but you can hear them. Light is similar, you can send it from a lightbulb or flashlight, and receive it with your eyes and cameras, but you can't hear it.
Antennas use electromagnetic waves. You can't hear or see them, but antennas can send and receive them.
Answer: Maybe compare an antenna with an electric heater or incandescent bulb? If you feed the heater with electricity, you can 'feel' the radiation. Similar for a light bulb, where you can 'see' the radiation (and feel it, if you're not careful).
For a less correct, but more visual approach: stick a pole in water and move it - you'll see the waves irradiated by the movement. Hey, you can even see the standing waves there, and reflections.
Answer: Say you have a positively charged object, and a negatively charged object. They will be attracted together, like opposite poles of a magnet.
Now if you pull these two objects apart, there will exist an electric field between them. If you were to place an infinitesimal test charge somewhere around your separated charged objects, you'd find if the test charge is positive, then it will be attracted to your negatively charged object, and repelled from the positively charged object.
If your two objects have been in the same position, with the same charge, for an infinite amount of time, then as we get farther away from them the force experienced by the test charge is weaker, but it never goes away. That is, for any point in space, no matter how far, we can calculate some force that will be experienced by the test charge. If we were to calculate the direction and magnitude of the force that would be experienced by the test charge for every possible location in space, this is the electric field.
But what if your two charged objects move? Now the electric field will be something else. If we instantly reversed the positions of your two charged objects, then the electric field around them would be more or less the same, except in the opposite direction.
However, the field can't change instantly -- that would violate causality. Instead, the new field propagates outward at the speed of light. If you are very close to these charged objects, then the field would seem to change instantly. If you are one light-year away, then the field you observe at your location reflects how the charged objects were one year ago.
Now, consider a simple dipole antenna. It has two halves. Our transmitter sucks electrons out of one side (making it positively charged) and shoves electrons in the other side (making it negatively charged). It is very much like the two charged objects above. An electric field begins to propagate out...
And then, the transmitter changes direction, and now the charges of each half of the dipole are reversed. This change in the field is also propagating outwards. This reversing of charges continues at whatever our transmit frequency is. If it is 7 MHz, then the charges reverse 7000000 times per second. If you are not moving relative to the antenna, then at one instant the electric field is pointing one way, and then shortly later the electric field is pointing the other way. The wavelength is the distance traveled by light in the time it takes for the antenna to go through one of these oscillations. It's how far the change in the electric field will have propagated by the time we start another cycle.
Remember, we said the electric field allows us to predict the force that an imaginary test charge would experience at that point. What if the test charge isn't imaginary? Like, the mobile electrons in a receiving antenna?
Not surprisingly, the charge in the receiving antenna experiences a force. Because the antenna is a good conductor, this makes a current in the antenna, which the receiver can then amplify and demodulate.
For further reading, I highly recommend A Visual Tour of Classical Electromagnetism.
Answer: An antenna is similar to a lightbulb.
Lightbulbs spit out photons at a wavelength we can see.  These are roughly in the range of 400 to 900 nanometers... a SUPER short wavelength compared to our everyday experiences.
A radio wave emits the same photons, at a much larger wavelength, for example about 3 meters when looking at the FM broadcast dial in the US.
In order to generate radio waves, a property that can be referred to as resonance (think about 2 tuning forks that resonate with each other when just the first is struck) greatly controls what wavelength of photons/EMR an antenna of a particular size might be able to spit out and detect.
Over-simplistically, the radios that the antennas are plugged into convert voices (or data) into on/off patterns that the antenna & radio on the other side knows how to convert back into voices (or data).  In reality, there's MUCH more to the encoding of information than just on/off patterns, but it's a reasonable analogy.
Answer: Radio waves travel at the speed of light, and although the electrical current that generates the magnetic and electric fields travel almost as fast, the fields have already escaped so the transmitter cannot change them, only make new fields. It's like once you have said something, you cannot take it back. Dropping a stone in water causes waves to travel away from the spot where the stone was dropped, but dropping another stone cannot change the waves that have already escaped.
Comment: The currents do not travel as fast, [not even close](http://amasci.com/miscon/speed.html). They travel at less than walking speed.
Answer: I like to think of a resonant antenna like a guitar string that vibrates at a given frequency that you can hear. Tighten/shorten the string, the pitch/frequency increases; loosen/lengthen the string, the pitch decreases.
Similarly for a resonant antenna like a dipole: shorten the wire, the resonant frequency increases (wavelengths become shorter); lengthen the wire, the resonant frequency decreases (wavelengths become longer).
This doesn't describe how or why the RF leaves the antenna and propagates through the air, and maybe it's not an entirely correct comparison to make (the guitar string is vibrating air molecules that carries the sound to your ear, but the RF doesn't vibrate the air to carry itself), but since we're talking about different frequencies on the electromagnetic spectrum there's probably some truth in part of this explanation. At least it's a comparison with something that someone would be more familiar with so it helps understand the concept.
Answer: The analogy between a guitar string and an antenna can be extended.
A disturbance traveling along the guitar string is reflected from the fixed ends, producing a standing wave on the string, while the individual molecules of the string are displaced relatively little. Similarly, a disturbance travels at nearly light speed along the antenna conductor, while the antenna's individual electrons travel a relatively small distance in the duration of one cycle of excitation. Note that harmonics can appear on the guitar string just as a linear conductor can be excited at multiples of its fundamental half-wave resonant frequency.
Further, the "emitted" wave - whether sound or radio - travels in a direction perpendicular to the medium being excited. In a sound wave, it is the disturbance (i.e., oscillating pressure) of air molecules that travels, not the air molecules themselves. For radio, the wave travels in a direction perpendicular to the varying electric and magnetic fields comprising the transverse electromagnetic (TEM) wave.
Answer: One way I have explained to kids (and to myself) is to imagine a jump rope tied to a tree or a post.  You start moving it up and down, soon it makes a nice wave.  If you continue to move it up and down, it continues to keep waving.  That is a radio transmitting into a wire.  Now if the rope were dipped in lots and lots of paint, each time the wave peaked, imagine the paint color flinging off straight up into the sky in a wave form.  That's kind of what the excited electrons do in the wire, they are so small, they simply fling an image of themselves out into space in the form of photons or light particles.  The analogy breaks down after a while, but it is also easy to use this example to teach the principle of a standing wave. Maybe not the most elegant, but for non scientific types it bridges the concepts when too much technical jargon might turn them off. Apologies to the purists.  JP
Answer: Two things and maybe getting back to the five year old's view of the world.

A tuning fork. the sound waves/vibrations from one tuning fork, when struck, radiate out bumping one molecule into another until reaching the other tuning fork. when the lengths of the elements are the same the energy of the wave is absorbed by the second tuning fork where it then begins to emit the same sound/vibration as the first one.
A soap bubble and the ring used to blow it. They have a relationship. if you use the same size ring you can catch a bubble. If it is not similar enough the bubble pops.

Electro Magnetic Mechanics are not quite the same as either of these structures but this helps communicate a handle that can lead to better understanding.


What word means people who blindly follow the routine?

Question: What's the word for people who act mindlessly,  accepting and  following the routine they have been told to follow by either society or government or something?
Comment: I think a very suitable word is **apparatchik**, a loan-word from Russian that has as its figurative meaning (according to _Merriam-Webster's Eleventh Collegiate Dictionary_) "a blindly devoted official, follower, or member of an organization (as a corporation or political party).""
Comment: This isn't quite the word you're looking for, but if you're looking for someone who is deliberately obtrusive by following their instructions to the letter, you're looking for a jobsworth: https://en.wikipedia.org/wiki/Jobsworth
Comment: @Gaurav I really like Jobsworth and really needed this word right now, thank you.  I clicked the question thinking I'd find something close enough to what I was looking for and in your comment found the perfect word. :D
Comment: Related: [Can anything be done about mean-spirited requests for terminology?](http://meta.english.stackexchange.com/q/4842)
Answer:

Though such specimens are actually members of the genus Homo and the species domesticus, this ubiquitous biped is often referred to, figuratively and derogatively, as a sheep (to the consternation of many even-toed ungulates). Note: political activists, ironically, refer to such as citizens. ;-)

The race of man, while sheep in credulity, are wolves for conformity.–--Carl Clinton Van Doren
We need more people speaking out. This country is not overrun with rebels and free thinkers. It's overrun with sheep and conformists.---Bill Maher
What do you get for pretending the danger's not real! Meek and obedient you follow the leader... into the valley of steel---Pink Floyd

sheep noun, often attributive:
1: any of various hollow-horned typically gregarious ruminant mammals (genus Ovis) related to the goats but stockier and lacking a beard in the male; specifically:  one (O. aries) long domesticated especially for its flesh and wool**
2a: a timid defenseless creature
2b: a timid docile person; especially:  one easily influenced or led (Merriam-Webster online)

Etymology

sheep (noun) ruminant mammal, Old English sceap, scep, from West Germanic skæpan (cognates: Old Saxon scap, Old Frisian skep, Middle Low German schap, Middle Dutch scaep, Dutch schaap, Old High German scaf, German Schaf), of unknown origin. Not found in Scandinavian (Danish has faar for "sheep") or Gothic (which uses lamb), and with no known cognates outside Germanic. The more usual Indo-European word for the animal is represented in English by ewe.
The plural form was leveled with the singular in Old English, but Old Northumbrian had a plural scipo. Used since Old English as a type of timidity and figuratively of those under the guidance of God. The meaning "stupid, timid person" is attested from 1540s. The image of the wolf in sheep's clothing was in Old English (from Matt. vii:15); that of separating the sheep from the goats is from Matt. xxv:33. To count sheep in a bid to induce sleep is recorded from 1854 but seems not to have been commonly written about until 1870s. It might simply be a type of a tedious activity, but an account of shepherd life from Australia from 1849 ["Sidney's Emigrant's Journal"] describes the night-shepherd ("hut-keeper") taking a count of the sheep regularly at the end of his shift to protect against being answerable for any animals later lost or killed.
Sheep's eyes "loving looks" is attested from 1520s (compare West Frisian skiepseach, Dutch schaapsoog, German Schafsauge). A sheep-biter was "a dog that worries sheep" (1540s); "a mutton-monger" (1590s); and "a whore-monger" (1610s, i.e. one who "chases mutton"); hence Shakespeare's sheep-biting "thieving, sneaky."

(etymonline)
Answer:
automaton noun:
1: a mechanism that is relatively self-operating
2: a machine or control mechanism designed to follow automatically a predetermined sequence of operations or respond to encoded instructions
3: an individual who acts in a mechanical fashion
(Merriam-Webster online)
Comment: @LittleEva:  Thank you.  Imitation is the sincerest form of flattery, right?  I'm new here and thought your format looked nice!
Comment: And, welcome to the site, it's a great place. BTW, if you haven't done so already, click on *help* and visit the Help center & Meta, both will enhance your EL&U experience. :-)
Comment: Figuratively, this is a good answer. I wanted to include this in my own, when describing mechanical, with a reference to the [mindless automation](http://gatherer.wizards.com/Pages/Card/Details.aspx?name=mindless+automaton) card from Magic the Gathering but you beat me to the punch, so to speak. This is worthy of my vote.
Answer: Drone:

a mindless worker/sales person at stores. Generally refers to an employee of a large company, ideally a grocery store.
Answer: I'm sure there are many words that apply but the first one that springs to my mind is this one:

Conformist , n. One who conforms or complies; appropriately, one who complies with the worship of the church of England or of the established church, as distinguished from a dissenter, or nonconformist.

Do not mind the religious association, since many English words have those and Webster's dictionary simply tends to just make them more obvious. For reference, in this particular context conform means:

To comply with or yield to; to live or act according to; as, to conform to the fashion or to custom.
To comply with; to obey; as, to conform to the laws of the state.

I am hesitant to suggest it since, in its proper form, calling a person a "conformist" does not tell us much more than that a person is conformant (dictionary.com) and in Webster's words, appropriate is virtually the opposite signification of mindless. In a purely lexical sense, somebody may have good reasons for their conformity, which can make the orders, customs, creeds, traditions or laws very conformable, in the specific sense of their agreeableness. Conform can also mean to make alike generally but especially in terms shape.
However, considering most members of any society or group are conformist to at least some degree and the mere mention of a word implies a reason for it. In more recent and critical times, the most usual one is that the conformity referred to is in lack of a good reason or even despite deleterious effects. Indeed, according to The Free Dictionary by Farlex, the fifth edition of the American Heritage Dictionary of the English Language describes conformists as being "habitual" or "uncritical" (as well as dropping the religious connotation). On the same page, the 2010 edition of the Random House Kernerman Webster's College Dictionary adds "unquestioningly" to the list of categorically thoughtless traits a conformist may exhibit. You will sometimes hear a phrase like "Don't be such a conformist!", when somebody wants you to do something unusual, especially if it is troublesome.

With varying degrees of accuracy, might also call such a person a slave:

A person who is wholly subject to the will of another; one who has no will of his own, but whose person and services are wholly under the control of another.

In Webster's Revised Unabridged Dictionary, 1913 the adjective slavish is also applicable:

a. Of or pertaining to slaves; such as becomes or befits a slave; servile; excessively laborious; as, a slavish life; a slavish dependance on the great. -- Slav"ishly, adv. -- Slav"ishness, n.

Usually the emphasis upon this word regards the degree of control and obligation, most often under duress, to perform services. Still, it is used this way in a more figurative sense. George Washington famously used this word in his General Orders of July 2 1776 to describe how he wanted the American army to differ from the British one, like this:

"Let us, therefore, animate and encourage each other, and shew the whole world that a free man, contending for liberty on his own ground, is superior to any slavish mercenary on earth."

If there is anybody who ever lived that knows quite what a slave is like, except maybe a slave, it would likely be George Washington. He had over 300 of them at his estate on Mount Vernon, mostly inherited, which he freed in his last will and testament. It should be noted that he was no hypocrite in this this matter, since he allegedly argued against the use of African-American slaves in the war effort in his General Orders of Dec. 30th 1775, publicly because he knew their performance would have been lacking but also privately because of the pangs of his guilty conscious, which is another subject altogether.

There are various figurative ways of describing such a person as well as I'm sure the others will and have been demonstrating.
The one I like most, at least for now, is "Mechanical" describing somebody as being like a machine machine. Machines as we know them today are automatic; presumably unfeeling; indifferent to the purpose of their operations and often, albeit not always, feel very cold due to the highly conductive metals often used in their construction. That potential coldness plays nicely into emotional coldness. I am somewhat surprised that more dictionaries do not reference this meaning, since it is a common analogy, although Collins English Dictionary – Complete and Unabridged (1991-2003) does on as shown by The Free Dictionary by Farlex.

Except where otherwise noted, all referenced definitions are from Noah Webster's 1828 American Dictionary of the English Language.
Comment: @user116032 I just edited my post a little in response and I do agree, given the primary definition I directly quoted. Feel free to vote against my answer based upon that. However if uncritical and habitual from the American Heritage Dictionary  definition I already had up beforehand, aren't mindless traits, what are? By the way, do you have opinions on the other words I suggested? Also, so long as I'm writing this I would like to thank Little Eva for the compliment.
Comment: I disagree.  Conformist is not the word to use.  It has nothing to do with mindless.  The word is TOTALLY wrong.
Comment: Yes Tonepoet, I also appreciate your labor in formatting, citations, links ... makes it very convenient for users to follow and check upon your assertions, information and reasoning. This type of thorough, stand-alone answer will always receive positive votes as long as its assertion(s) is within the realm of plausiblity.
Answer: Sheeple
Which is a concatenation of "people" and "sheep" and ascribes to the people the archetypal behaviour of the sheep, which is to blindly follow what the rest of the flock is doing.
Edit: Definition by me.
Comment: Also note that Google is not considered a source. Google is just a directory of links to sources, but not a source in itself, and search results differ between users and nations (what you see may be different from what I see). The dictionary definitions that pop up on Google are notoriously hard to track down, too, as they don't tell you what dictionary they come from. As such, you should always use real dictionaries (The Free Dictionary is a good place to start, as it contains definitions—with links—to several different online dictionaries), and then link straight to them. :-)
Comment: Can you cite an authoritative example of usage of 'Sheeple'?
Answer:
Zombie: a person whose behavior or responses are wooden, listless, or seemingly rote; automaton.
Answer: Nobody has suggested "robot". That's an appropriate word.
Comment: Nope, in these sites, in order to ensure an highest quality as possible, users are **expected** to edit each other's posts when they find some mistake or typos – as long as they don't change the meaning, of course.
Comment: I'd prefer *robotic*. Also, how about a dictionary reference and definition to improve the answer?
Comment: Hey, while I on one hand appreciate the grammar checks I'd like to turn on the button that says: "Let her embarrass herself."  Editing a comments seems ... well... it just seems.  Please don't do it.  Nuke it or leave it alone.  With all respect. I'm more comfortable with the delete than with the edit.  - Wilson Smith
Answer: indoctrinated (adj.), derived from indoctrinate (verb):
teach (a person or group) to accept a set of beliefs uncritically

'broadcasting was a vehicle for indoctrinating the masses'

Source: ODO
Further information on indoctrination (noun) is available at: Wikipedia
Answer: Some refer to such people as cattle. Like many domesticated livestock, dairy and beef cattle are generally docile and complacent.
I prefer cattle in particular (vs. sheep, for example) because cows are also used in metaphor to describe laziness, fatness, and slowness, being very complacent to stand or slowly walk around a small enclosure or pasture, chewing and regurgitating grass for their entire lives.
Cattle are also often corraled, i.e. guided by cattle farmers through mazeworks for purposes of organization and processing (e.g. for administration of medication, medical examination, horn removal, tagging/branding, etc.).
Finally, and most poignantly, cattle are often raised to be slaughtered and consumed. Their whole environment, from the pasture to the corral to their stall at the slaughterhouse, is designed to not only lull the cow into complacency but also to fatten them so they yield more profit for the farmer. Too similarly, people who are complacent with a repetitive routine in the doldrums are being farmed by their employers and even to some extent society in general, their complacency assuring consistent production of profit often at the expense of the person's very health and longevity.
From the time they grow up at school (the pasture) to the career-building process (the corral) to the cubicle (the stall at the slaughterhouse), the whole lifestyle of those hanging on a rung of the corporate ladder is a bit too easy to parallelize to that of cud-munching moobags (cows).
Answer:
jobsworth: an official who upholds petty rules even at the expense of humanity or common sense.
Answer: One word is "Methodist" and another is " Traditionalist " as in one who blindly follows Denominational Traditions in the realm of religion.
Comment: This is rather offensive to traditionalists who have carefully considered their position, isn't it?


Are there any viable ways of using the particle system with micro-displacement?

Question: I've watched a couple of videos dealing with micro-displacement. On one of them, the author had mentioned that it doesn't support the particle system as of now. I know this is an experimental feature and would possibly solved by the next major release of Blender. Are there any suggestions for substitutes or any other methods for adding a particle system to such a mesh?
Answer: I had figured out how to solve that problem. I used a duplicated mesh without the adaptive displacement modifier and scaled it to a point where it barely beneath the mesh. However, I used that technique on a standard human mesh, so it may not work as properly on a highly irregular mesh unless that mesh matches the projected displacement.


Any tips for debugging or tracing your program in the development process?

Question: I've been programming for quite some time and I've never been able to make consistent ways of debugging or tracing my program. So far in Java and C# I've been working with the console and simply use System.out in java or Console in C#.
However, I have not much experience with actually deploying a program or "selling" it but I think it's not a proper way to have like Console.WriteLine() everywhere.
I would like to know if there are other methods. I was thinking of using a logger and write it to a text file which uses a debug variable to write or not based on severance (like php E_ALL etc.) or have an active multi-line textbox active that shows everything.
However, the first method will not allow me to view it directly and I have to open the file after the program shuts down as it can't write to an open file. The second method is real-time but it closes with the program.
Is there a nice way of somehow combining this? Should I write an external app that reads/closes/waits for updates from a log file and then shows it to me? Or is the console the way to go? I could add a custom class that only permits logging when debugging.
Thanks for reading!
Answer: Don't reinvent the wheel. Search Google for "Loggin framework" and your favorite language and you'll probably find something that answers your need.
For Java, you'll probably want to go with Log4j, and for C# you have log4net. There are many more options if you don't like these particular two.


A formal definition of Scaling Limits?

Question: I'm looking for a formal definition of scaling limit in a rigorous math sense, also, if somebody knows a good translation to spanish. A good bibliography could be helpful.
Comment: You might also want a definition for "processes" which have a lattice as a domain instead of the set where it takes its values. This is the situation when approximating a quantum field theory using lattice theories. The best reference for this is probably section 3 of the Seminaire Bourbaki by Frohlich and Spencer: http://www.numdam.org/numdam-bin/fitem?id=SB_1981-1982__24__159_0
Comment: Can you give us some context? Are you interested in say, Conformal Invariance?
Comment: Yes I'm interested in Conformal Invatiance, I'm studying the papers of Werner, Schramm, Lawler,...but intuitively I understand what is scaling limit, but I really wish a more formal definition. My best shot is this:

For a proccess which takes values in a lattice $L\subseteq \mathbb{Z}^d$, the limit of the proccess $\delta L$ as $\delta$ tends to zero.

Is needed to be a graph in the reals?
Answer: I think the main issue you'll encounter with scaling limits and conformal invariance will be that it is a very new subject. Many of the papers will be very high level or still in preprint with details missing.
Here's a list of references that helped me learn the subject. I'll try to comment on some of them later on when time permits. I would first start with "Scaling Limits and SLE"  by Greg Lawler. This set of notes is in context of self avoiding walks and how they connect to SLE and you'll find they quickly dive into scale invariance and conformal invariance.
If you are further interested in proofs, I would consult Lawler's "Conformally Invariant Processes in the Plane." This book gives very rigorous formulations of SLE and tackles a myriad of technical difficulties.
Next I would look at "Toward conformal invariance of 2D lattice models" by Smirnov. Here you'll be introduced to the notion of the duality between holomorphic martingales and scale invariance. In particular, you need to understand how discrete complex analysis connects with conformal invariance. I would hold out for proofs of many of the results for now.
Now you'll probably want to look at some simpler examples.  I would first start trying to understand the proof of Cardy's Formula. Geoffrey Grimmett has an excellent set of lecture notes, "Probability on Graphs" which should be available off Grimmett's website (I can't seem to access it right now). As well I would consult the original paper by Smirnov,  "Critical percolation in the plane". I'll add here that the proof of Cardy's formula doesn't need the full machinery of holomorphic martingales because of the really nice symmetries Smirnov observed. What IS important though is how the Riemann Hilbert boundary conditions are set up.
One of the big issues with discrete complex analysis is how to rigorously define discrete holomorphic functions on graphs. If you want the gory details,  "Discrete complex analysis on isoradial graphs" by Chelkak and Smirnov is a good place to look.
Answer: This is the idea. Suppose that you have a family or sequence of structures of growing complexity (long random walks, realizations of a random field on a large piece of a lattice or in a large continuous domain, large random trees, etc.). You want to understand the behavior of the large structures of your family. Often you want to say that your large random object is similar to a simpler object that you can describe precisely. Since the random walk consisting of 1000 steps is quite different from the "same" random walk consisting of 100000 steps, but you still want to find similarities between them, it makes sense to normalize or rescale your objects appropriately. If you manage to find the right rescaling (it is given by shrinking the time by $n$ and space by $n^{1/2}$ for a standard simple symmetric random walk), then you might discover that thus rescaled (and appropriately embedded into the space of continuous functions or the Skorokhod space) random walk converges in distribution to the Wiener process.
So, scaling limits provide approximative descriptions of what your objects look like when "you look at them from a large distance" or "zoom out".
At a more formal level, suppose $\xi_n$ is a sequence of random objects in some space $X$ . Suppose $\phi_n$ is a (carefully chosen) sequence of scaling tansformations in $X$. It is hard to say precisely what a scaling transformation is, often it is a linear map depending on $n$ with coefficients decaying in $n$. Often, a (time)-reparametrization of the random objects involved is a part of $\phi_n$. A scaling limit is the distributional limit of $\phi_n(\xi_n)$.
Some more comments:

One point of view is understanding scaling limits as limiting points for renormalization group.
Papers by P.Major from around 1980 on self-semilarity and renormalization are useful in understanding the concept.
I will take this chance to advertise my own paper on scaling limits for random trees, where I describe what large random trees look like if drawn on the plane and looked at from a large distance. It appeared this year in Markov Processes and Related Fields and is also available at http://arxiv.org/abs/0909.2283  The construction and scaling used is different from Aldous's continuum trees (and there are strong connections to superprocesses).
Answer: I think the notion of scaling limit is really more of a group of ideas than a single definition, since there are different types of objects being studied and hence different notions of convergence.  Typically though one considers convergence of some (rescaled) sequence of probability measures on "discrete" objects as a spatial parameter $\delta\rightarrow0$ to a probability measure on some "continuum" object.  Part of the trouble is that it can be tricky to figure out what the right "continuum" object is and further how to put a probability measure on it.  A nice discussion about scaling limits and conformal invariance are these lecture notes by Lawler.
The fundamental example of such a scaling limit is the convergence of random walks to Brownian motion; one source is chapter 5 of the book of Mörtens and Peres.
An interesting scaling limit with a different flavor than the SLE ones described in other answers is Aldous's Continuum Random Tree.  The following is from the linked page:

Take a critical Galton-Watson branching process where the offspring law has finite non-zero variance, and condition on total population until extinction being $n$. This gives a random tree. Rescale edge-lengths to have length $n^{-1/2}$. Put mass $1/n$ on each vertex. In a certain sense that can be formalized, the $n \to \infty$ weak limit of these random trees is the Brownian CRT (up to a scaling factor).

This is a beautiful object on its own but also a key tool in several other scaling limits.
The CRT is used in the study of random planar maps, see these lecture notes of Le Gall and Miermont.  Recent developments not covered in these notes are their proofs of the convergence of certain families of random planar maps to the so-called Brownian map (see here and here).
The CRT is also part of the construction of the scaling limit of connected components of Erdős–Rényi random graphs in the scaling window.
Answer: I was listening to Lawler give a series of talks this summer and his sense of scaling limit is the same as is often used in defining Brownian motion as a scaling limit of simple random walks. In which both time and space have to be scaled so that the limit process doesn't become trapped at the origin. The difference between Brownian motion and SLE is that the random walks are no longer simple. The conformal invariance in SLE comes of the properties of the not-simple random walks if memory serves.
So if one wanted a rigorous definition of a scaling limit I would look for a text on Brownian motion (most any probability with measure theory book will do this construction in the continuous time chapter) or a more specialized book on continuous time processes. There should be plenty of these in most any language you'd want.

A formal definition of Scaling Limits?


How To Convert InputStream To String To Byte Array In Java?

Question: On my java server I get from an iOS client an InputStream, which looks like this:
--0xKhTmLbOuNdArY
Content-Disposition: form-data; filename="Image001"
Content-Type: image/png

âPNG
IHDR���@���@���™iqfi���gAMA��Ø»7äÈ���tEXtSoftware�Adobe ImageReadyq…e<��IDATx⁄‰;iê]Uôflπ˜Ω◊Ø;ΩB::õY
ê6LÄ"Õ¿
... etc. ...
≠Yy<'_˜øüYmc˚æØ…ægflóÏK$å±çe0ˆΩleIë¢êH¢Tñê–Üd
≠≤§àä6D¸>˙÷˜˚<øÁ˘˝˜˚º^sÁ=Áû{ÓπÁ‹œπ˜úÄÎ:!44¡@
--0xKhTmLbOuNdArY--

The first and last line are my HTTP Boundary. In line 2 and 3 are Information about the image file. And from line 5 until the penultimate line there is the image file which I need as a byte array.
So how do I get the image information as a String and the image file as a byte array from the InputStream?
The solution should be fast and efficient (The file size can be several megabytes / < 10 MB ).
My approach:
I convert the InputStream to a String, then split it and convert the second String to byte array...
String str = org.apache.commons.io.IOUtils.toString( inputStream );
String[] strArray1 = str.split( "\r\n\r\n", 2 );
byte[] bytes = strArray1[1].getBytes();

That way is very fast, but the byte array seems to be damaged. I can not create an image file from that byte array... Some characters are incorrectly converted.
Perhaps someone can help?
Answer: The reason why your code breaks is the first line:
String str = org.apache.commons.io.IOUtils.toString( inputStream );

Trying to convert random bytes into Unicode characters, and then back to the same random bytes, isn't going to work.
The only way you can make this work is by reading the input in stages, rather than reading it all into a String.

Read from the InputStream until you're convinced you're past the HTTP boundary line.
Read the rest of the stream into a byte array (you can use IOUtils for that, too).
Answer: You probably don't want to convert your bytes to char and back, that would destroy your bytes as the byte stream doesn't correspond to any encoding.
I would read the whole thing in as a byte[] using IOUtils.toByteArray, then look for the byte sequence "\r\n\r\n".getBytes() in that array.
Note that IOUtils.toByteArray doesn't stop until end-of-stream.  This should be fine for HTTP 1.0, but will break for HTTP 1.1 which can send multiple requests on the same stream.  In that case, you'll have to read incrementally to find the Content-Length field so you know how much of the InputStream to read.


Update Edit form list from SP-Update

Question: I have one project actually in production environment. I must deploy one change request on edit form of one list called Person.
I have developed one SharePoint Farm Solution with my list definition for all my list. Inside schema.xml of my list definition I have added this element inside  element:
<Form Type="EditForm" Url="PersonListEditForm.aspx" SetupPath="features\$SharePoint.Feature.DeploymentPath$\Person_Template\PersonListEditForm.aspx" WebPartZoneID="Main" />

After that, I have published new WSP package and I have performed from SharePoint Management Shell this command:
Update-SPSolution -Identity MyProject.wsp -LiteralPath C:\MyProject.wsp -GACDeployment

Update process was executed successfully. I have disabled and enabled the feature with my list definition but my PersonListEditForm.aspx is not deployed.
Please, can you help me?
Thanks
Answer: the problem is about the name space of ASP.NET page. ASP.NET page needs to have the same namespace of List definition.

Update Edit form list from SP-Update


Run-like pattern in candle chart

Question: To my untrained eye a pattern appears in this candle chart, where down-days (dark purple) tend to occur consecutively. I have a very basic understanding of statistics and R software, but it's been a while and I'd like to find the right search terms to get started with identifying / analyzing / confirming this pattern over longer series. Can you see a statistical phenomenon here or could you point me in the right direction, method or keyword?
Answer: "down-days (dark purple) tend to occur consecutively" can this be paraphrased as "after a dark purple it is more likely that a dark purple will follow than a white? Then just count after every dark purple whether a dark purple or a white follows. You can check, whether your counts are compatible with a 50%-chance using R's funktion binom.test(). If not, please specify your understanding of "occurs consecutively".

Run-like pattern in candle chart


Error when I run "yarn kbn bootstrap"(kibana install)

Question: Everybody.
I faced trouble when I try to install kibana bootstrap on my win10 os.
I followed this tutorial.
"https://www.elastic.co/guide/en/kibana/master/development-getting-started.html"
When I run "yarn kbn bootstrap", I saw this error.
<code>  info [bazel] warning Resolution field "email@example.com" is incompatible with requested version
  "email@example.com"
  info [bazel] success Already up-to-date.
  info [bazel] INFO: Analyzed target //packages:build (1880 packages loaded, 8122 targets
  configured).
  info [bazel] INFO: Found 1 target...
  info [bazel] ERROR: F:/work/2021_8/bidrectional/development/kibana-master/packages/kbn-dev-
  utils/BUILD.bazel:106:11: Action packages/kbn-dev-
  utils/_validate_tsc_types_options.optionsvalid.d.ts failed: (Exit -1):
  ts_project_options_validator.bat failed: error executing command bazel-
  out/host/bin/external/npm/@bazel/typescript/bin/ts_project_options_validator.bat
  packages/kbn-dev-utils/tsconfig.json ... (remaining 4 argument(s) skipped)
  info [bazel] Windows Subsystem for Linux has no installed distributions.
  info [bazel] Distributions can be installed by visiting the Microsoft Store:
  info [bazel] https://aka.ms/wslstore
  info [bazel] Target //packages:build failed to build
  info [bazel] Use --verbose_failures to see the command lines of failed build steps.
  info [bazel]
  info [bazel] ERROR: F:/work/2021_8/bidrectional/development/kibana-master/packages/kbn-
  analytics/BUILD.bazel:89:8 Assembling npm package packages/kbn-analytics/npm_module failed:
  (Exit -1): ts_project_options_validator.bat failed: error executing command bazel-
  out/host/bin/external/npm/@bazel/typescript/bin/ts_project_options_validator.bat
  packages/kbn-
  analytics/tsconfig.json ... (remaining 4 argument(s) skipped)
  info [bazel] INFO: Elapsed time: 218.882s, Critical Path: 62.52s
  info [bazel] INFO: 217 processes: 65 remote cache hit, 147 internal, 5 local.
  info [bazel]
  info [bazel]
  ERROR [bootstrap] failed:
  ERROR The bazel command that was running failed to complete.
  error Command failed with exit code 1.
  info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
</code>
Any suggestions are welcome.
Answer: From your system out, it seems you are using windows CMD window for installation.
The official document said in Windows you should run in Git Bash or WSL, and Git Bash is recommended.


Then returns too early most of the time on angularFire's $bind promises

Question: I'm looking to perform an action once the data comes back from firebase by using then on the promise returned from $bind. However, when using $bind to create a promise most of the time the "then" function will run before the data is returned from firebase.
Multiple $binds will result in only the first "then" running after the data is back from firebase but this is only the case if I'm not binding to an object.
The "then" that runs on a $bind on an object in firebase never seems to return after the data is available.
<code> angular.module('myApp', ['firebase'])
  .controller('HomeCtrl', ['$scope', '$rootScope', '$firebase',
    function($scope, $rootScope, $firebase) {

  // Data 1
  // The first bind's then will fire correctly
  $scope.data1 = $firebase(new Firebase("https://bindTest.firebaseio.com/users/1/email"));
  $scope.data1.$bind($scope, "data1Remote").then(function() {
    console.log("data1Remote: then");
    console.log($scope.data1Remote);
    $scope.data1RemoteThen = angular.copy($scope.data1Remote);
  });
  console.log("data1Remote: not then");
  console.log($scope.data1Remote);

  // Data 2
  // The then function doesn't seem to work at all if it references an object
  $scope.data2 = $firebase(new Firebase("https://bindTest.firebaseio.com/users/1"));
  $scope.data2.$bind($scope, "data2Remote").then(function() {
    console.log("data2Remote: then");
    console.log($scope.data2Remote);
    $scope.data2RemoteThen = angular.copy($scope.data2Remote);
  });
  console.log("data1Remote: not then");
  console.log($scope.data1Remote);

  // Data 3
  // Since this section follows another bind the then doesn't work.
  $scope.data3 = $firebase(new Firebase("https://bindTest.firebaseio.com/syncedValue"));
  $scope.data3.$bind($scope, "data3Remote").then(function() {
    console.log("data3Remote: then");
    console.log($scope.data3Remote);
    $scope.data3RemoteThen = angular.copy($scope.data3Remote);
  });
  console.log("data2Remote: not then");
  console.log($scope.data1Remote);

}
  ]);
</code>
Unless I'm missing something the "then" function should only run after firebase has bound its data to the scope. I have created a Plunker that illustrates this issue. Try commenting out the different data sections in different combinations and you will notice that the "thens" that return correctly change as well.  Has anyone else experienced / found a solution to this issue?  Thanks.
http://plnkr.co/edit/9UgDxx?p=preview
Answer: It turns out this was a bug.  I reported it and Anant fixed it super fast.  Awesome.  The fix is applied to the master branch of the angularFire github.
Comment: The fix will go out with AngularFire v0.6.0 - thanks for reporting it!


Does Android really use the same kernel as Linux?

Question: I read from somewhere that Android uses the Linux Kernel. Is it really true? I thought the Linux Kernel was meant for desktop operating systems.
Comment: Modern phones are basically desktops with small displays. If you compare them to the desktops of ten years ago (which ran Linux just fine), you'll find the phones beat the older desktops on almost every specification.
Comment: The Linux kernel is [used on a lot of embedded devices](http://en.wikipedia.org/wiki/Linux#Embedded_devices). Android is borderline between embedded and desktop, there are far smaller devices running Linux.
Comment: Probably important to emphasize three things - 1) the customizability of the Linux kernel - there's a lot that can be configured differently according to expected use or omitted if not needed, and 2) the kernel is generally just one component (albeit near or is the "bottom level" component) in a stack of software ultimately responsible for a user-facing experience, whether desktop, phone, server, or anything else.  The majority of what makes Android "Android" is not the kernel, as you can tell from below, and 3) phone hardware is really powerful these days.
Comment: @ultrasawblade said the kernel is responsible for user facing experience. This is not true. The user looks down on the stack, the components at the bottom are the most hidden. In Debian a popular Gnu+Linux, you can use the a bsd kernel making Gnu+bsd. It does not change things much from the users point of view. A system admin may see A difference if her tools do not hide this difference for her.
Comment: I said "the kernel is generally just one component in a stack of software ultimately responsible for a user-facing experience" - means not that the kernel's responsible for it entirely but is just playing a part.
Answer: Architecture of Android

Android relies on Linux for core system services such as security, memory management, process management, network stack, and driver model. The kernel also acts as an abstraction layer between the hardware and the rest of the software stack.
Latest Android runs Linux version 3.10 (source).
And my comment on your second sentence is that Linux Kernel is not meant for only desktop operating systems. Its use cases vary from Desktop OS to Servers, mainframes and supercomputers to Embedded Devices.
Linux is a widely ported operating system kernel. Due to its low cost and ease of customization, the Linux kernel is used on a highly diverse range of computer architectures: in the hand-held devices and the mainframe Systems, in devices ranging from mobile phones to supercomputers.
On the other note:
Palm (later acquired by HP) use Linux-derived operating system, webOS, which is used into its line of Palm Pre smartphones. Several network firewalls and routers from makers such as Cisco/Linksys use customized linux kernel. There are tons of devices out there which are using embedded linux.
Comment: I don't know why say that the kernel is not meant for desktop operating systems. It works perfectly fine on desktop devices. It also works fine on many other classes of device so maybe you meant to say it is not exclusively for desktop devices.
Comment: @Richm, Thanks for pointing it out. I have corrected it in the answer.
Comment: On Linux/UNIX platforms the desktop is a set of applications that use the kernel services.  This make it easy to add, swap, or remove desktops.  Servers often replace the desktop with a terminal shell.
Comment: Isn't a "phone" just some form of desktop? :-p
Comment: Note that Android originally used a heavily modified version of the linux kernel, but as of 3.5 a lot of featured are merged back into the main kernel. Android 4.4 currently runs on much less patched Linux 3.4 kernel (an long term release)
Comment: @BillThor Yes for Gnu/Linux a server operating system is just the desktop operating system, with the windowing system removed/disabled, to save power/memory (you can run desktop apps over the network anyway). Where as for Microsoft's windows a desktop operating system, is a server operating system, with some staff disabled, or restricted.
Comment: @johannes Most people don't operate a phone on a desk. Desktop and laptop are just the shape of the device. Both are basically the same thing, and run the same software. A phone could run this same software, but most often runs android, or sometimes iOS.
Answer: Yes, as do many other embedded devices.  Many routers also use a Linux based OS, as, like Sachin said, it is easily customizable.
Here is a Xubuntu screenshot of mine, Running mksh and Android kernel 3.0.8+ (From the Android x86 sources)
Answer: Yes and no (depending on what you mean by Linux)
There is a lot of confusion around the name Linux; It if often used to refer to two different things.

It the case of android, and some other cases. It refers to a Kernel named Linux. A small but essential part of an operating system. A kernel controls the hardware and provides services to the rest of the system. (see nice diagram answer of @Sachin Divekar).

In the case of almost all desktop systems it refers to X11+Gnu+Linux. See the diagram again, but remove all references to phone, telephony and android. Now change Application Framework to Gnu Tools, add a layer called X11, and another called Gnome or Kde etc. Then put application back on top. For servers there is usually no X11 or Kde/Gnome, as a graphical user interface is a waist of resources.

Android does not use X11 (though it can, but not to run android apps) or the Gnu Tool. However like Gnu+Linux some of the libraries are Gnu.
It is often difficult to know which meaning someone has when they say Linux. This is why it is recommended to say "Gnu/Linux" when you mean Gnu+Linux, and "Linux kernel", as you did, for the kernel. However don't say kernel, unless you know what one is (I have heard people add the word kernel in front of Linux (because they were told that is the correct term), but they were using it to refer to Gnu+Linux.
Answer: It is not just embedded and desktops where you will find the Linux Kernel.

All of the top 500 fastest super computers are running, the full, Gnu/Linux.
Around 80% of web servers are running Gnu/Linux.
Most of the internet infrastructure is running Gnu/Linux or are embedded devices. Of these embedded devices, a large proportion will have the kernel named Linux.
Comment: It's now all 500 top supercomputers [running Linux](https://www.zdnet.com/article/linux-totally-dominates-supercomputers/).
Comment: @DavidRefoua Thanks, I have amended the answer.


Ubuntu 12.04 LTS, Gnome: sound mutes and unmutes 10 times a second

Question: The problem with my Ubuntu 12.04 LTS system is that it seems like something other than me is controlling volume and mute status of my sounds. Whenever a sound is playing, the volume icon in the bar goes between normal and mute icon about 10 times a second, and the sound I hear is according. And when I adjust the volume either with the keyboard buttons or with the slider that comes from the said volume icon, it seems like something is trying to put it back to where it was. It seems like everything's ok when the volume level is below 25 %, so I was thinking maybe some kind of "automatic volume level setting" could be behind this, but I haven't seen anywhere an option to turn such a service on.
The problem appears in Gnome and also when no X is running. In the latter case, when I run alsamixer in the console, the volume bars jump between mute and unmute there as well (but only while a sound is playing).
<code>pacmd list-clients |grep application.name
     application.name = "ConsoleKit Session /org/freedesktop/ConsoleKit/Session2"
     application.name = "GNOME Volume Control Media Keys"
     application.name = "Indicator Sound"
     application.name = "XSMP Session on gnome-session as 1013c4e19cf8151dec138928909599998800000018450036"
     application.name = "Metacity"
     application.name = "libcanberra"
     application.name = "ALSA plug-in [mpg123.bin]"
     application.name = "UNIX socket client"
</code>
mpg123 is there because I was trying to play something while taking that list. Other than mpg123, the list is identical when no sound is playing.
Stopping, killing or uninstalling pulseaudio did not fix it.
One more thing: the OS is located at an external hard drive which I don't use every day. I think the problem appeared suddenly one day, maybe as a result of routine package updates?
Answer: Check to see if your microphone is turned on. Run alsamixer from terminal or check these sites.
https://wiki.ubuntu.com/DebuggingSoundProblems
https://help.ubuntu.com/community/SoundTroubleshootingProcedure


Kosterlitz-Thouless transition and correlation function

Question: I'm studying Kosterlitz transition on this book:  https://tinymachines.weebly.com/uploads/5/1/8/8/51885267/kardar._statistical_physics_of_fields__2007_.pdf#page173 . At page 165 it says:" The gradient expansion applies to configuration that can be continuosly deformed to the uniformly ordered state". My question is why? I know that at low temperature there are vortex antivortex pair (that can be transformed into ordered state) and an higher temperature vortex that cannot transformed into ordered state.
Comment: Also in this case http://www.mit.edu/~levitov/8.334/notes/XYnotes1.pdf at page 5 he calculated the correlation function ignoring the vortex. So this calculation cannot be done with vortex. Is this linked to the fact that whit a vortex we have a request on vorticity? Probably yes
Comment: So we can do that calculation only in the case of a low temperature where we have a total charge =0 so there is not a request of the $\theta$
Comment: At high temperature then we ignore again the vortex because we expect to have a disordered state, correct?
Comment: Minor comment to the post (v1): Please consider to mention explicitly author, title, etc. of links, so it is possible to reconstruct link in case of link rot.
Answer: When doing gradient expansion, we are implicitly assuming $\theta(x)$ is a single valued function of $x$ and there is no discontinuity. Otherwise the gradient of $\theta$ diverges.
As the textbook says, any single-valued function can be continuously deformed to a uniformly ordered state. Here is how. Define a uniformly ordered state by $\theta_{uni}(x) = 0$ for all $x$. Then we can define a continuous deformation from $\theta_0(x)$ by
$$
\theta(x,\lambda) = (1-\lambda)\theta_0(x) - \lambda\theta_{uni}(x) = (1-\lambda)\theta_0(x)
$$
where $\lambda = 0$ correspond to the initial state and $\lambda=1$ corresponds to the final state. As long as $\theta_0(x)$ is smooth and continuous, this transformation is also smooth and continuous.
Vortex configurations cannot be described as a single valued function. For any single valued function $f(x)$ we have
$$
\int_C \nabla f(x) dx = 0
$$
for any closed loop C. However, for a loop C containing a vortex we have
$$
\int_C \nabla \theta(x) dx = 2\pi n
$$
where n is defined to be the vorticity of the vortex (+1 for vortex, -1 for anti vortex and so on). Thus, $\theta(x)$ cannot be a single valued function, and we need to put extra care in order to take vortices into account.
That explains why gradient approximation fails. The more interesting questions is why gradient approximation succeeds in some cases. As you have pointed out, at low temperature there are very few vortices present, so we can get away with ignoring their presence and using gradient expansion.


How real is the word 'pal' as a synonym of a' friend' common or acceptable?

Question: Yesterday I met firstly the word 'pal' in a crossword puzzle - as a synonym for 'friend'. Since I didn't know this word, I'd like to know if I can use it or I'll sound weird. How real is the word 'pal' as a synonym of a 'friend' common or acceptable?
Answer: It is a real word. In written English it is much less common than "friend" but about as common as other informal words for "friend" such as "buddy" or "mate" (ngrams) (the ngrams data for "mate" is likely skewed by the verb "to mate", but Buddy is also used as a name and pal might be an abbreiviation P.A.L.) All these words would be more common in spoken English. (and "mate" is particularly a British/Australian word)
Pal has a particular use in the compound "pen pal" a person (often in another country) with whom you communicate by letter only.

Jake was learning Spanish, so he found a pen pal in Mexico, and emailed him about once a month.

It may interest you that this is a word of Romani (gypsy) origin "ph(r)al = Brother" (although this meaning has been lost in English)
Comment: I didn't know that it's considered informal everywhere.  Interesting.  I considered it more than just another slang for friend.  Thank you
Comment: Please see [this](https://ell.stackexchange.com/questions/169617/how-often-is-the-expression-get-on-well-used-is-there-any-difference-with-ge/169642#comment339358_169642), or https://books.google.com/ngrams/info. Long story short – it'd be best to refer to this tool as *Google Books Ngram Viewer*, et cetera. Great answer, by the way.
Answer: You may run the risk of sounding like a geriatric using it. There is an element of nostalgia to using it effectively, e.g reminiscing about your school days with your old pals.
You could quite easily substitute chum for pal as well, it's very British. Interestingly in Australia, "Pal" and "Chum" are also the names of popular dog foods, this is perhaps no coincidence as dog is man's best friend.


Commonly used standard for telephone wires

Question: What type of wires are commonly used as indoor phone lines? I'm curious to know what is their bandwidth compared to my CAT5 cable that I use with DSL modem.
Answer: Most POT (plain-old telephone) installations I have seen use wire pairs that are twisted very loosely (maybe one turn every 50...200 mm) or not at all. There's one pair for each phone. Big cables with many pairs exist, and there's usually no shield.
Depending on the installation (try peeking behind one of your outlets!), you can get anything from two wires sitting loosely in a tube or being taped to wooden beams, ordinary and non-twisted cables to shielded twisted-pair wires lines.
A phone line needs two wires (unused wires may be preset in your installation); a 10/100 Mbit/s network line needs two pairs of wires (= 4 wires).
There is no short answer what bandwidth you can get over an unknown cable, but here's a bit of background information:
A network interface for a CAT5 installation has a defined impedance for the transmitting or receiving differential (two-wire) interface. The goal is to get as much energy as possible from the transmitter of one device (e.g. your DSL modem's PPPoE interface) to the receiver (your notebook's network card). Note that both interfaces contain a receiver and a transmitter, so there's also a differential (two-wire) line from the notebook to the modem, all behind the same modular 8-pin socket (often called RJ-45). This works best if the cable between the two interfaces has the same impedance as the transmitter and receiver. CAT5 is designed just this way: The wire insulation, the distance between the two wires of one pair, the way the two wires are twisted into one pair, the pinout of the connectors etc. are produced very carefully. A phone line, on the other hand, has very loose requirements, so you can have a line where the two wires are close to each other for a while, then form an open loop between them somewhere else, and the wiring behind your sockets may be a pure mess. Varying impedance, crosstalk and bad connections are just some of the bad things that will happen to your signal.
Long story short: If you need a cable for a network interface, it is a very good idea to actually use a CAT-(5, 5e or 6) type of cable. If such a cable is not available, at least try to run the differential signals over those wire pairs that look most like they could act as differential lines - and good luck!
Comment: Not any cat cable will work for networking, it should be a cat 5, 5e, or 6
Comment: True, it's just that I didn't want to get into 5, 5e or 6 and 10M, 100M and 1G and what's needed for what. My answer is edited a bit now...
Comment: I was just worried about confusion... Johan posted about Cat 2, 3, and 4 and I could see how someone could read you answer and think that those would work for ethernet.
Answer: You can have a look at the earlier cables, since cat5 is just a "another telephone cable". And before the Cat5 you had Cat 2 and Cat 3, so a good start could be to look at those.

http://en.wikipedia.org/wiki/Category_2_cable
http://en.wikipedia.org/wiki/Category_3_cable
http://en.wikipedia.org/wiki/Category_4_cable
Answer: Wikipedia tells me that "DSL takes advantage of this unused bandwidth of the local loop by creating 4312.5 Hz wide channels starting between 10 and 100 kHz, ... up to 1.1 MHz for ADSL." These channels are allocated (dynamically?) depending on the actual conditions of the line -- not all of the bandwidth up to 1.1 MHz will have sufficiently low attenuation to allow transmission.
For a line within your house, presumably you would have substantially more usable bandwidth than in the long (0.5 - 1 km?) line back to your phone company central office.
Answer: In my new house all lines including phone lines were wired for cat 5.  Almost no significant cost increase and much more flexibility in using the lines ( and yes Mr X I know this was not the question ).


Numeric problem when evaluating log of a pdf

Question: In maximum likelihood estimation, one typically needs to compute the log (natural log) of probability values. When a probability, say $p(x)$, becomes so close to zero, $log(p(x))$ returns -Inf. What is the usual trick to avoid these cases?
Comment: If you're *maximizing*, I can't see how you'd hit a `-Inf` unless your starting values for your iteration are *really* bad...
Answer: Work with the logs of probability directly, rather than trying to compute the probability and then compute the log.  You can do arithmetic with the logs, as well; multiplication becomes addition, of course.  Addition is somewhat more complicated, but it's not too hard to work out how to do it without taking the exponential back.
In response to JM's question, it's easy to come up with practical problems where the probability of something happening is indeed so low that it underflows a float or double.
Comment: Can you say more about the setting?  Your initial wording suggests that you compute p(x), and then take the log, which is the wrong thing to do.  Rather, just find log(p(x)) directly.  Eg, if x is a sequence of events and p(x) is the product of their individual probabilities, compute the logs of each of those individual probabilities (which should safely avoid underflow), and then add the logs.  But maybe you're doing something else?
Comment: I was curious because my experience with nonconverging iterations as presented to me mostly turned out to be the user providing piss-poor initial estimates. That being said, I see your point. Thanks!
Comment: I am already working directly with logs of probability. But still I have this problem. Maybe I should consider those points which cause this problem as outliers and ignore them. Or somebody suggested that I add a very small constant to the probability values (this is possible if you are computing p(x)'s first.)
Comment: My bad, I was NOT directly using logs. Thanks, Dylan.
Comment: What if $p(x)$ is a mixture model, e.g. a Gaussian mixture: $p(x;\theta) = \sum_{i=1}^N \pi_i f(x;\mu_i, \Sigma_i)$? You cannot express $log(p(x))$ analytically, and yet you might have some of the $p(\cdot)$ values very close to zero.
Comment: To approximate the log of a sum, you can use a power-series approximation, or perhaps more easily, just pull out a constant term.  See here: http://lingpipe-blog.com/2009/06/25/log-sum-of-exponentials/ for more description.


How to install cPickle on Python 3.4?

Question: I tried sudo apt-get install cPickle and python3.4-cPickle but it doesn't work.
Comment: AFAIK, in python 3, you use `pickle` only. Internally it will use `cpickle` if available.
See https://docs.python.org/3.1/whatsnew/3.0.html#library-changes
Comment: I would assume you install a python module with `pip`?
Comment: can you give me the command please
Answer: There is no cPickle in python 3:

A common pattern in Python 2.x is to have one version of a module implemented in pure Python, with an optional accelerated version implemented as a C extension; for example, pickle and cPickle. This places the burden of importing the accelerated version and falling back on the pure Python version on each user of these modules. In Python 3.0, the accelerated versions are considered implementation details of the pure Python versions. Users should always import the standard version, which attempts to import the accelerated version and falls back to the pure Python version. The pickle / cPickle pair received this treatment.

-Source.
Comment: @basj, "Implementation detail" means something that should be hidden from us users.  We just want the pickle functionality and should not care if its implemented in python or c.  So, it means don't make us understand...python just do the best thing.
Comment: @Basj: It means you should `import pickle`, not `import cPickle`.
Comment: "the accelerated versions are considered implementation details of the pure Python versions": what does this exactly mean?
Answer: From the pickle  module documentation:

The pickle module has an transparent optimizer (_pickle) written in C. It is used whenever available. Otherwise the pure Python implementation is used.

In python3 use:
import _pickle as cPickle

Comment: @questionto42standswithUkraine have you tried just importing pickle? It is a built-in so you shouldn't need to install it at all.
Comment: Have I misunderstood this? `python3.8 -m pip install pickle`. Output:
`ERROR: Could not find a version that satisfies the requirement pickle (from versions: none)
ERROR: No matching distribution found for pickle`. How should I install it then?
Comment: Built-in sounds good, might be that I have not checked it.

How to install cPickle on Python 3.4?


Measure gas left in block in solidity

Question: There is a gasleft() to check how much gas left for my smart contract execution in solidity. But how is it possible to check how much gas left in block?
I am having quite a big solidity function, and depending on how much gas can fit the block, next steps may differ.
Answer: You can control the gasleft() with a loop doing something like :
    do {
    // Your stuff
    } while(gasleft() > whateverYouNeed)

(Where whateverYouNeed would be the amount of gas required to run one iteration of the loop + what comes after ( maybe *1.5, just in case)
Based on this answer:
https://ethereum.stackexchange.com/a/134981/69965

Measure gas left in block in solidity


How can I model condiment/sauce?

Question: I want to model a condiment. It's call sambal. The red paste in the picture. It's a solid-liquid like sauce. How do I model this? A semisphere? Use a fluid modifier?
Comment: I tried to use a open bottom hemisphere + displace modifier (type: clouds, size 0.21). Thats the similar shape I can get
Answer: Something along these lines?
Modelling

Create a blob mesh for the general area of your condiment. This is a UV sphere, pulled around with Proportional Edit, with its mesh Header > Mesh > Transform > Randomized
Make the blob an emitter of a particle system.. All on frame 1, no physics, aimed at a small Collection of onion-bits in the particle-system's 'Render' panel. Play with the rotations, scales, etc.

Once you're happy with the surface features,'Convert' the particle system to real instances in the modifier stack, and apply the modifier.
CtrlJ Join the ex-particles to the main mesh, and give it a Remesh modifier at a high enough resolution for your desired detail.
Here, I've Header> Mesh > Clean Up > Decimated the mesh.. and ..

.. given it 1 level of Subdivision. You could obviously try other things, here, smoothing, relaxing, etc. So long as you back up destructive steps, you can feel your way through.
Shading

Here, in Cycles, using an 'Inside' Ambient Occlusion input producing a wide greyscale over the surface, put through two color-ramps.The aim is to pull the onion pieces back out for different treatment.

The top mask is very hard, to control the base color of the material, keeping the orange to the onions.

The bottom mask biases the noisy bump map to the smooth areas, avoiding the onions.

The shader uses Subsurface Scattering, set to a low radius, to catch the onions more than the rest, and biased to yellow in the 'Radius': (0.6,0.6,0.2). Your settings will depend on the size of your model. (Recommend life-size)...

.. with a few extra chunks of onion added to cover up the bits of the surface you don't like :)
Comment: That's what you call _"Seasoned Advice"_
Comment: ..@batFINGER Cookin' on gas, today, Mr. FINGER.. :)

How can I model condiment/sauce?


A way to know how much memory Linux OS is using

Question: I am looking for a way to know the size of the memory that Linux OS is using (I'm not worried about the other applications memory size).
I am using Ubuntu distribution (Ubuntu 15.10).
Answer: OS Memory v. Ubuntu Memory v. Kernel Memory
You have asked to know how much the "Linux OS" is using (and not how much memory is being used by "applications"). "Linux" is just a kernel (albeit not a monolithic one; kernel modules contribute to the effective footprint). Many things that end users see as "the OS" are not part of the kernel, but part of the larger Ubuntu distribution. In a typical desktop installation, this includes the windowing system (commonly xorg), the window manager and desktop environment (Unity on Ubuntu by default, others include Gnome and KDE), as well as a whole host of other processes that perform essential operations so that you can interact with your system.
The word "applications", to end users, usually means things like "web browser", "spreadsheet", etc. I'll refer to these as "user applications".
There are ways to estimate your kernel size, but if you wish to come up with an estimate to how much memory Ubuntu is using, you would have to identify and add up all of the related processes (xorg, init, etc.). The other option is to use something like top when you have no other user applications running, and subtract the memory used by top and your terminal emulator and shell.
Total Memory
There are many ways, some more precise than others, to see a Linux system's memory usage. There are also many definitions of "memory in use". That said, for most non-technical uses, top(1) will do the job just fine:
top - 17:23:50 up 7 days, 19:15,  3 users,  load average: 0.00, 0.01, 0.05
Tasks: 172 total,   2 running, 170 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.8 us,  0.1 sy,  0.0 ni, 99.1 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   2049992 total,  1735420 used,   314572 free,   372420 buffers
KiB Swap:  2095100 total,      192 used,  2094908 free.   679116 cached Mem

As an added bonus, since the next question is often "what is using up the memory?", the next lines show the running processes and (among other things), how much virtual memory they are using.
Note that "free" memory on Linux is often a very small number, and that's a good thing. Free memory is essentially a wasted resource, so Linux instead allocates it to various caching uses. If an application needs that memory, it's still available; Linux is just putting it to good use in the meantime.
Answer: The basic kernel is the vmlinuz file under /boot. The 'z' stands for 'compressed with the z library'. Unfortunately, I do not know how to decompress it to see the size once uncompressed.
Also as mentioned by @type_outcast, the kernel uses modules to access the hardware and handle some other features. These are found under /lib/modules/<version>. You can determine which modules are loaded using lsmod. That list includes a Size column with the size of each module.
So if you wanted to know the size the kernel is using, that would be a relatively close approximation.
Also, you have the memory file. Try cat /proc/meminfo. This will give you two additional parameters: KernelStack and Buffers.
Further, you can get the info from various processes, such as process 1. This is the init process and it can be considered part of the kernel. Its info can be found under /proc/1. The memory usage shows a few numbers which are explained below. You can find a list of such low level processes using ps -ef | less and looking at the CMD column. Things that appear between brackets '[...name...]' are really low level entries (module related entries, it may actually be tasks created by the modules, but I do not know for sure about that.)
me $ cat /proc/1
46511 1381 790 348 0 37483 0

Note that those numbers are measured in pages. In most cases, that means you want to multiply the number by 4096 to have the size in bytes.
   /proc/[pid]/statm
          Provides information about memory usage, measured in pages.
          The columns are:

              size       (1) total program size
                         (same as VmSize in /proc/[pid]/status)
              resident   (2) resident set size
                         (same as VmRSS in /proc/[pid]/status)
              shared     (3) number of resident shared pages (i.e., backed by a file)
                         (same as RssFile+RssShmem in /proc/[pid]/status)
              text       (4) text (code)
              lib        (5) library (unused since Linux 2.6; always 0)
              data       (6) data + stack
              dt         (7) dirty pages (unused since Linux 2.6; always 0)

If you're interested in various other processes, all the data will be available under /proc.
Comment: `/proc/1/statm` (not just `/proc/1`) is the init process, conventionally `/sbin/init`, not the kernel
Comment: Good point. The kernel is like a "static library" which is not included in init which is really a task as far as Linux is concerned.


How to catch 405 Method Not Found in jQuery.ajax()

Question: I'm trying to catch if the website is accidentally making a cross domain call (for example if the user types the IP in the url instead of the domain.  (This is a commercial, installable app so I don't have IIS control to set up any forwarding, etc.).  This doesn't work:
<code>                error: function (x, e) {
                    // If the web service failed for any of the reasons below, then we
                    // call the custom error dialog display function with the response
                    // text passed back from the erro
                    if (x.status === 405) {
                       alert("405 error")
                    }
                }
</code>
Is there any way in javascript to catch the 405 error?
Answer: Have you tried using the .ajaxError() method?


What happens to the air between two like charged plates?

Question: If I negatively charge two plates and push them against each other until I can feel the repulsion do the air molecules respond to part of that force and perhaps try to leave the general vicinity?
Comment: I like to think $$ Q=CV , C=\epsilon A/D, V=ED, Q=\epsilon A/D ED= \epsilon A E,$$ so that means $$ Q/A= \epsilon E$$
Answer: There is no electric field between the plates. Also the charges are accumulated on the outer surfaces, so anything between the plates does not suffer any consequence of the charges. It is only when the field appears at the edge of the system of two plates that effects occur.
Answer: Unless there were any ionized particles in between the plates, I do not believe that anything would happen to a noble gas, some others, may be attracted or repelled by the plates.


what is use of body less '_beforeTokenTransfer internal virtual ' function

Question: Inside _transfer function there is a call goes to _beforeTokenTransfer(sender, recipient, amount); and that function is written as function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } with no body parts, then is is not useless ? or if it is useful what is purpose of calling a body less inter virtual function ?
Answer: Functionally, yes, it is useless since it doesn't do anything. But it does serve a purpose.
OpenZeppelin's architecture is such that you can easily plug in extra functionality. You are never meant to edit their templates, but only extend them. So, if you want to add your custom functionality to function _beforeTokenTransfer, you can override the function in a sub-contract and add whatever functionality you need. This way there's no need to modify the original OZ contract.
For example a contract:
contract MyToken is ERC20 {
    constructor(uint initialSupply, string memory name, string memory symbol)
      ERC20(name, symbol) public {
          _mint(msg.sender, initialSupply);
    }

    function _beforeTokenTransfer(address from, address to, uint256 amount)
        internal override {
        // do something, for example emit an event or check some conditions to make sure the transfer can be allowed. If not allowed, revert the transaction
    }
}

Comment: modified answer
Comment: @ashwin Example of added functionality: Let's say I have a map of blacklisted accounts that shouldn't receive tokens, I would verify if the receiver address is on that blacklist inside _beforeTokenTransfer()
Comment: Can you give an example which demonstrates how extra functionality can be added to it ?
Answer: Sometimes, in order to extend a parent contract you will need to override multiple related functions, which leads to code duplication and increased likelihood of bugs.
For example, consider implementing safe ERC20 transfers in the style of IERC721Receiver. You may think overriding transfer and transferFrom would be enough, but what about _transfer and _mint? To prevent you from having to deal with these details, we introduced hooks.
Hooks allow you lots of flexibility in modifying the behaviour of a token by allowing you to execute functionality, in the case of the _beforeTokenTransfer hook, you can execute functionality before the token is transferred.
You will find Hook details Here
You will find some more information Here
Answer: Well, burn, mint and transfer are simply transfer functions and this hook can be used for some checking in any kind of transfer. For example maybe you don't want user to send tokens to specific address, because of something, then you can implement that logic in this hook and it will be triggered in any transfer function.
For example I don't want user to send their tokens to any other address than address 0. Just because they're useless outside my ecosystem. It's only your fantasy if you want to do some logic before or after token transfer or not.
so its upto you , what functionality are you adding there .


is there any way to get current from vibration?

Question: I was wondering if you have something that vibrates , is there any way that you can make some power out of it?
Comment: You want to google on _energy harvesting_, search in the appnotes from Linear Technology or similar. They have ICs for it.
Comment: Piezoelectrical device
Answer: There is a wide range of materials that will produce electrical charges in response to mechanical stress. While the voltage produced this way can be quite high (thousands of volts), overall power output is typically small.
Comment: Yep, your idea is pretty much doomed: you'll end up with orders of magnitude less power than needed, even if your piezo crystal or coil+magnet are as large as your skateboard. BTW, next time you should mention a little bit of context in the question itself, it's easier to understand it that way. Knowing the context, a dynamo attached to a wheel comes to mind.
Comment: what i would like to accomplish is charge a battery , but i reckon i wont have any luck... what do you think? Could someone charge his phone while riding his skateboard? which is a very vibrant thing when riding on tarmac for example..
Comment: yea thanks for the suggestion about the dynamo, i actually have thought of all the alternatives or the more obvious ones, so i thought id ask about vibration, still i think that a small thing moving a 90KG should be able to produce some energy , so much goes to heat :)
Answer: Two obvious methods come to mind:
Piezoelectric.  Something that exhibits the piezoelectric effect, like a quartz crystal, can move charges around as a function of strain.  Some microcphones are based on this principle, as are some electronic barbecue grill igniters.  In the microphone, sound wave vibrate the crystal, which produces a voltage proportional to the sound waves.  In the igniter, something whacks the crystal hard to make a higher but short voltage.
Electrodynamic.  The alternator in your car, the generators in a power plant, and a type of microcphone called "dynamic" all work on this principal.  In the case of the microphone, it is like a small speaker in reverse.  A diaphram is moved by the changing air pressure, which moves a coil within the magnetic field of a permanent magnet.  The resulting small signals (usually a millivolt or a few) are proportional to the sound.
I have also seen flashlights based on this principle.  They have a heavy permanent magnet that can slide inside a coil.  You shake the flashlight to move the magnet back and forth, which causes the coil to produce electric power, which is stored in a capacitor that powers the light for a minute or a few minutes from full charge.
Answer: Yes, you can use the reverse of the principle that a speaker uses. If you move a conductor (e.g. wire) through a magnetic field, a voltage is induced. To induce enough voltage to be useful, a coil of wire can be wound and made to move in a magnetic field. The lines of flux must radiate from the middle of the coil to the outside, so that the field lines are perpendicular to the windings. An old speaker drive unit will do this job for a small amount of power. You then need to arrange the mechanical setup so that the vibrating thing causes the coil to move relative to the magnet.
Comment: i understand that speaker movement can get *some* movement compared to actual vibration... or you are not talking about the cone movement..?
Comment: Yes, this is the movement of the cone, of at least the centre attachment point of the cone, with respect to the frame of the speaker. This generates a voltage at the speaker terminals by the reverse of the process that produces movement of the cone when a voltage is applied to the terminals.


Is fight always of a negative connotation?

Question: Is fight always of a negative connotation? Is there a better one that conveys the same points with a more positive meaning? As in "fighting for change"?
Comment: You're welcome. You revised your question while I was composing my earlier comment, prompting me to extend my comment to what you see now. I'm transferring my comment to an answer. Tidying up the comments now. We can delete our own comments by hovering over the comment and clicking the 'x' that appears.
Answer: No, the connotation isn't always negative.
Fight has a connotation of activity, but whether it suggests something positive or negative depends on several elements of context, including the text, the author, and the listener.
With reference to your example: "fighting for change" would likely sound negative to someone who doesn't want change, and positive to someone who does.


Grouping two audiences because they have some overlapping tasks

Question: Designing the navigation for a corporate website. We have decided to go with audience segmented navigation. One solution is to group "investors & media" due to the fact they would perform similar tasks. To me however, they are still different audiences and the majority of corporate sites I've seen have a separate 'media' section. Which makes me think we shouldn't group the two. Does two of the audience segments having similar tasks warrant grouping them in the navigation?
Comment: It might be hair-splitting, but audience segments haven't goals. They are used by marketing, not UX. See my related answer here: http://ux.stackexchange.com/questions/35215/i-cant-decide-target-audience/35229#35229
Answer: Investors and media are definitely different and shouldn't be clubbed together. Consider these points.

As an investor, I would be keen to know financial aspects, the industry trends, forecast growth, competitive rating, brand performance, social footprint etc. Most of such content is technical and is meant to be precise and accurate. Audience of such data is business acumen and minds. Media on the other hand is interested in visuals, briefs and summaries and something which can attract ears and eyes.
A media person can browse through Investor Section to dig something useful but an investor wouldn't be looking to browse media section to decide for an investment. Even if he visits those sections, he would expect media section to be politically accurate instead of factually actuate.
To an organization, finding Investors and Finances is a rare opportunity as compared to media exposure. Grouping Investors and Media together would cost both types of users but costing more to investors interests than that of media people. This is something which any business wouldn't want.
General impression of grouping Investors and Media together would be that organization is small in size, is short of data or it is not seeking investors seriously.
Answer: If the two groups have overlapping core-tasks I can imagine it's possible to do so, but in the example you gave us that's hardly the case. Force-grouping hardly-matching items mostly something that happens for reasons of limited screen space, but I don't think that's the case here as the supplied label still has both audiences listed. Also you can't really give the concatenated result "investors & media" a fitting label to cover both items I think.
So, my answer: no, it doesn't (in this case).