Orbits of Root Vectors

Question: Let $G$ be a connected, simply-connected complex semisimple Lie group with Lie algebra $\frak{g}$. Fix a maximal torus $T\subseteq G$, and let $$\frak{g}=\frak{t}\oplus\bigoplus_{\alpha\in\Delta}\frak{g}_{\alpha}$$ be the corresponding decomposition into weight spaces. Given a non-zero root vector $e_{\alpha}\in\frak{g}_{\alpha}$, is there a nice way to describe those root vectors lying in the nilpotent $G$-orbit of $e_{\alpha}$? This is possible in the context of several examples, but is there a more example-independent description?
Comment: To study nilpotent orbits in a semisimple Lie algebra it's best to focus on the individual simple summands.  Then your orbit for any long root is the unique *minimal* nonzero one in the finite partially ordered set of nilpotent orbits.  A standard modern reference is section 4.3 in Collingwood-McGovern *Nilpotent Orbits in Semisimple Lie Algebras*.  (Note you can work with any simple algebraic group and its Lie algebra over an alg. closed field of good characteristic.)  For short roots you get the unique minimal *special* orbit: cf. http://mathoverflow.net/questions/67143/
Answer: If $\alpha$ is a long root (e.g. if $\mathfrak g$ is simply-laced), then $e_\alpha$ is in the $G$-orbit of the high weight vectors. Projectively, its orbit looks like $G/P_\Theta$ where $P_\theta$ is the parabolic using those simple roots that are perpendicular to the highest root.
But you asked for the root vectors, not all the vectors. Then the answer is
that you get all the root vectors for roots of the same length as $\alpha$.

Orbits of Root Vectors


Articulation for shortening a note/silence

Question: I want to ask is there an articulation that is opposite from 'Fermata'. In other words I don't want to change the time signature? What I want the particular note/silence should go faster then the running tempo. I'm transcribing old A Capella melodies from cassettes, where the tempo in general isn't rigid to the beat, it flows slower or faster. The differences could be even in a single measure and even a single note. Thank you all for the combined knowledge it adds to everyone.
Comment: Would you provide a few bars of your transcription, indicating where you want the new articulation to go?
Comment: [Opposite of a Fermata?](https://music.stackexchange.com/questions/48199/opposite-of-a-fermata) is related.
Answer: The answer to the question needn't involve creating a new type of articulation.
Perhaps the tempo change actually occurs earlier, and your bar 100 should look more like your bar 105, using 16th notes rather than triplet 8th notes?
Or instead, if you look at bar 99, are you certain that the rest at the end of the bar is precisely a quarter note? Perhaps you could re-notate bar 100 so that it still uses triplet 8th notes but has a rest at the start of the bar. That way you won't need a eighth note rest at the end of the bar, so you wouldn't then need the new articulation on that eighth note rest indicating to actually play it shorter than an eighth note.
Comment: I tried to use 16th it's to short, with the triplets it's just the right timing, but as they start to sing the next measure it's almost directly. Lets say a pause of 16th would be good.


Is flu of our nose pure or impure and does it has any effect on Salah

Question: Is our Salah(Namaz) acceptable if previously flu from nose had fallen on our clothes and it had dried but we came to know about that after we were finished with Salah?
Kindly guide.
Answer: Nasal Mucus (مخاط) is considered ritually clean, it will not invalidate Salah if it is present on your body or clothing. From  Mawsoo'ah al-Fiqhiyyah 36/258:

Mucus is defined as that which flows from the nose just like saliva flows from the mouth ...
The jurists agree that mucus is ritually clean, and Salah is correct if it is offered in a cloth which is soiled with mucus.
This is derived from the hadith:

"If one of you must spit, then let him spit to his left, beneath his foot. If he cannot do that, then let him do like this," and Al-Qasim described how he spat into his garment then rubbed part of it against another part."
— Muslim
Answer: Your prayer is accepted. Why would you think it won't be accepted? anything that comes out of your nose won't invalidate prayer even blood but the blood has to be small amount.


Whats the manga name, possibly reincarnated as a prince with water attribute

Question: So I can't remember if it was someone that was reincarnated but I think they had memories of a past life. They were born as a prince. When they had their status checked at birth, he saw E+S for water, but everyone else saw SS (so he will be the lord/ in charge of a water territory later on?). Eventually one of the elder princes, I think it was the crown prince, visited and had him hold a sword called Leviathan. Apparently there was a good risk of the MC dying because people felt very weak when near it/holding it. Eventually he gains full control over it and gets Water SSS. I think there were only 3-7 chapters out so far (around February).
Comment: If someone posts the correct answer, you can accept it by clicking on the checkmark by the voting buttons as per the [tour].
Answer: Kizoku Tensei: Megumareta Umare kara Saikyou no Chikara ga Eru aka Noble Reincarnation

Born as the Thirteenth Prince, Noah was originally in a position removed from the imperial succession, so he freely passed his time in the fief granted to him. However, the Crown Prince died before the Emperor. The imperial succession would be fairly contested among the remaining princes. Noah, being the strongest despite living freely, overwhelmed the other princes and eventually became the Emperor with the most power in the world.

Found with a search for isekai manga "sword leviathan", which brought up excerpts from the novel.

"The name of that sword is Leviathan."
"Levia ……than.
"It's also known as the Magic Sword of Water. It's said to be the highest level among the magic swords, and about 120 people died before they could handle it for the first time."

....

"Exactly. Noah has water SS, right? It's a Demon Sword that even the S guys would handle with their lives cut short, but I was wondering what would happen with the water SS."


Can't purchase more arrows

Question: I currently have over 100 regular arrows after purchasing them from the stores. I've now waited until after a Bloodmoon and the arrows still have not respawned in shops. I've tried purchasing other items and they seem to respawn fairly quickly, but not arrows.
Answer: Arrows will only respawn in shops if you have less than 50 arrows of that type (e.g. Normal, Fire, Bomb, etc).
As such, the best method to stock up on arrows from shops is to use up arrows until you have 49, then buy arrows from all the shops at once.
The only exception to this is Ancient Arrows

 These will always be purchasable from Cherry at the Akkala Tech Lab
Answer: Teleport to all the stables you know about and talk to Beedle in front of each one.  I did that for the 12 or so stables I know about, and I had >200 arrows by the time I was done.  He was still willing to sell me more as I found him in new locations, but I had enough and didn't buy at that point.  I'm sure he restocks during a blood moon, but you can get far more from him at the various stables than you can at the shops in all of the cities.
Comment: Question author indicates the bloodmoon does not restock the venders

Can't purchase more arrows


How to calculate the final concentration of calcium ions from known starting masses of carbonate and calcium ions?

Question:
If $\pu{50.0 mg}$ of $\ce{CO3^2-}$ and $\pu{50.0 mg}$ of $\ce{Ca^2+}$ are present  in one liter of water, what will be the final (equilibrium) concentration of $\ce{Ca^2+}$ expressed in moles per liter?
Comment: This is a weird question. It's not like you can just add 50 mg of a cation and 50 mg of an anion. They have to come with counterions. If $\ce{Ca^{2+}}$ and $\ce{CO3^{2-}}$ are the only ions in solution, then they need to be in equimolar amounts. Now, if we added 50 mg of $\ce{Na2CO3}$ as a source of carbonate and 50 mg of $\ce{Ca(NO3)2}$  as a source of calcium, then we have a more viable question. Also, have you cover solubility product constants yet?
Answer: The premise of your question is weird. $\pu{50 mg}$ of calcium ion and $\pu{50 mg}$ of carbonate ion are not equimolar. However, let's assume that they have appropriate counterions somewhere. This problem can be approached two ways.
Limiting reactant
We have a precipitation reaction between the calcium and the carboncate ions,  as calcium carbonate is nearly insoluble in water:
$$\ce{Ca^2+ (aq) + CO3^2- (aq) -> CaCO3 (s) v}$$
Convert your masses of ions to amount of substance and figure out which ion is in excess. If calcium ion is in excess, then use the amount of substance in excess to determine the remaining calcium concentration.
For example: Let's say you determined that your solution has $\pu{0.1663 mol}$ of $\ce{Ca^2+}$ and $\pu{0.1221 mol}$ of $\ce{CO3^2-}$. The maximum amount of $\ce{CaCO3}$ that could precipitate is $\pu{0.1221 mol}$, because we would run out of carbonate ion. Then there would be $\pu{0.0442 mol}$ of calcium ion left in $\pu{1 L}$ of solution for a concentration of $\pu{0.0442 M}$.
Solubility product
Calcium carbonate is not completely insoluble. It's solubility product constant is $4.8\times 10^{-9}$. Thus we can set this up as an ICE equilibrium problem. I'll use the same fake amount of substances from the previous example:
\begin{align}
\ce{CaCO3 (s) &<=> Ca^2+ (aq) + CO3^2- (aq)}\\
K_\mathrm{sp}&=[\ce{Ca^2+}][\ce{CO3^2-}]
\end{align}
\begin{array}{lcc}
\hline
                   & \text{calcium}/\pu{mol}  & \text{carbonate}/\pu{mol}\\
\hline
\text{Initial}     & 0.1663                   & 0.1221     \\
\text{Change}      & -x                       & -x         \\
\text{Equilibrium} & 0.1663 - x               & 0.1221 - x \\
\hline
\end{array}
\begin{align}
4.8\times 10^{-9}&=(0.1663-x)(0.1221-x)
\end{align}
Solving for $x$ gives you $x=0.1221,0.1663$ and only the first number makes sense. In this case the final calcium amount in solution would still be $\pu{0.0442 mol}$. The carbonate amount in solution is not actually zero. It is $\pu{1.09E-7 M}$, but that is for another day.
Comment: I agree that the premise of the question is weird, but I think the question means that you have 50 mg of $\ce{CO3^{2-}}$ from an appropriate carbonate source (e.g. 88.33 mg of anhydrous $\ce{Na2CO3}$) and 50 mg of $\ce{Ca^{2+}}$ from maybe 273.3 mg of $\ce{CaCl2.6H2O}$. On a side note, if we were very particular about accuracy then we should probably worry about the $\ce{HCO3^-}$/$\ce{CO3^{2-}}$ equilibrium, but that is also for another day :)


Best Options for Mobile Data in Denmark, Germany, and the Netherlands

Question: I will be traveling from the US to to Copenhagen, Berlin, and then Amsterdam for a total of 12 days. While there, I would like to connect to mobile data networks. I will be traveling with my Samsung S6 phone. I've looked up some options for Copenhagen (where I will land) but the roaming charges for the other countries look high. Does anyone have suggestions for an affordable option? (I'm looking for about 1GB for the whole trip).
Answer: There are no roaming charges in the EU, as of 15/6/2017. Almost.
You can get what you want for 15 Euro.
You can buy a SIM in Copenhagen and roam with it to other EU countries, still enjoying the same terms.
Pitfalls:

Your data limit may be somewhat lower when roaming. You'll probably get much more than 1GB though.
Calls to destinations outside the EU are still subject to roaming charges, which can easily reach several Euros per minute. So use IP calls (Skype, Google Hangout, WhatsApp etc) to call home.

See the EU "Roam Like at Home" page
I didn't compare the different offers for Danmark, but a quick Google search gives ID, who take 15 Euro for unlimited calls and 30GB data for 30 days (only 3.3GB while roaming). I'm sure you can find similar offers from other vendors.


Solspace FreeForm Error on Submit

Question: Does anyone know what this means? I get this when I submit my form ... ?
Answer: Does this happen every time?  You may of waited too long before submitting it and the xid expired. Try turning off "Process form data in secure mode" under Security and Preferences and see if the issue persists.
What version of FF and EE are you running?

Solspace FreeForm Error on Submit


Tasker programming Help?

Question: I am a relatively new tasked user and need a little help. I installed the AutoShortcut plugin to allow Tasker to expand my notifications through the nova shortcut. I would like to have tasker expand the notification bar once on the launch of a certain app, then wait until the app is closed. However, with a simple launch app>expand notifications>stop task, the notification bar will continue to drop down over and over because the app is still open. How can I configure tasker to expans the notifications only ONCE, and then not again until the app has closed?
Answer: I would suggest adding an If statement to the task that checks if a variable is set, if it is not, set the variable and execute task, if it is end task.

Tasker programming Help?


Difference between "laconic" and "concise"?

Question: Those two words both seem to be about using a few words/a few steps to do something.
Answer: Laconic comes from the ancient word for Sparta, Lakedaemon. The Spartans were noted for lack of verbosity, and what they did say often had a mordant humor to it, which has come to be called a laconic phrase:

A laconic phrase is a very concise or terse statement, named after Laconia (a.k.a. Lacedaemon [Greek Λακεδαίμων]), a polis of ancient Greece (and region of modern Greece) surrounding the city of Sparta proper. In common usage, Sparta referred both to Lacedaemon and Sparta. Similarly, a laconism is a figure of speech in which someone uses very few words to express an idea, in keeping with the Spartan reputation for austerity. This may be used for efficiency (like in military jargon), for philosophical reasons (especially among thinkers who believe in minimalism, such as Stoics), or for better disarming a long, pompous speech (the most famous example being at the Battle of Thermopylae). Spartans were expected to be men of few words, to hold rhetoric in disdain, and to stick to the point. Loquaciousness was seen as a sign of frivolity, and totally unbecoming sensible, down-to-earth Spartan peers.

By the way, the "famous example" referred to is seen farther down the page:

When Leonidas was in charge of guarding the narrow mountain pass at Thermopylae with just 7,000 Greek men in order to delay the invading Persian army, Xerxes offered to spare his men if they gave up their arms. Leonidas replied "Molon labe" (Greek: Μολών λαβέ), which translates to "Come and take them".[9] Today this is the motto of the Greek 1st Army Corps.

Laconic is a synonym of concise, but with a biting quality to it. Think of Calvin Coolidge's response in this case:

Although Coolidge was known to be a skilled and effective public speaker, in private he was a man of few words and was therefore commonly referred to as "Silent Cal." A possibly apocryphal story has it that Dorothy Parker, seated next to him at a dinner, said to him, "Mr. Coolidge, I've made a bet against a fellow who said it was impossible to get more than two words out of you." His famous reply: "You lose."
Answer: The New Oxford American Dictionary says, in a note entitled "The Right Word":

If you don't like to mince words, you'll make every effort to be concise in both your writing and speaking, which means to remove all superfluous details
[...]
If you're laconic, you are brief to the point of being curt, brusque, or even uncommunicative

So, being laconic has a more negative connotation. Concise is rather positive.
Comment: I don't agree with you that laconic uniformly has a negative connotation.  A writer who calls a politician *laconic* might be trying to call attention to his quick wit in being able to come up with cryptic responses when he needs to deflect prying questions, for example.  For some professions, being *laconic* can be a useful skill.
Comment: @Billare: I disagree with you. My understanding of these two words supports @F'x and others comments.
Comment: @UserID Others? Anyway, see **Robusto**'s answer for a sense where _laconic_ is being used positively:  The story he gives is a very famous apocryphal story often told about Coolidge, and it's being related to demonstrate his wit, a positive attribute.
Answer: I believe the difference is in connotation, and Dictionary.com's definitions seem to support this. Concise uses a minimal number of words to express a comprehensive idea. It's trying to inform us without boring us. Laconic, on the other hand, has a bit more personality and is perhaps bordering on insolence in its brevity.
Actually, when I think of laconic, I see James Dean in my mind's eye. Concise -- no James Dean.
Answer: The difference between the two words has to do with their directness in expressing ideas.   Someone speaking in a laconic manner speaks in riddles or aphorisms, in a very simple style, almost to the point of inscrutability.  A quintessential example everyone would be familiar with is Yoda's strange style of speaking when Luke first meets him on Dagobah:

Luke: What's in there?
  Yoda: Only what you take with you.

Obviously, Yoda is not directly answering the question Luke really wants answered -- he wants to know the tangible, physical contents of the cave -- but Yoda speaks laconically, in a cryptic style, so as to blunt the young initiate's overeagerness to learn too much before he's ready.
Someone speaking concisely, on the other hand, is trying to pack as much information as possible into his words.  This is an example:

The Fourier transform is a unitary change of basis for functions (or distributions) that diagonalizes all convolution operations.

Here, the speaker summarizes a vast theory in a single sentence by using very specialist language, to directly convey a sense of the theory's generality.  In general, laconic statements should not be filled with jargon or technical terms, while concise statements as in the above may be.
Answer: Laconic phrases often symbolize defiance, meanwhile concise language simply means you use your words wisely and not more than you have to.
Answer: Merriam-Webster's Dictionary of Synonyms (1984) puts both words in a group that also includes terse, succinct, summary, pithy, and compendious:

concise, terse, succinct, lconic, summary, pithy, compendious are comparable when meaning briefly stated or presented or given to or manifesting brevity in statement or expression. A person is concise who speaks or writes briefly; a thing is concise that is brief because all superfluities have been removed and all elaboration avoided [examples omitted] ... A person or thing is laconic that is characterized by such succinctness as to seem curt, brusque unperturbed, or mystifying [examples omitted]

S.I. Hayakawa, Choose the Right Word: A Modern Guide to Synonyms (1968), however, places concise in a group with compact, compressed, condensed, constricted, dense, solid, and miniaturized, but places laconic in a group with terse, compendious, pithy, sententious, and succinct. Here is Hayakawa on the "compact" family and, more particularly, concise:

These words refer to confinement or weightiness in a relatively small space.  ...
Concise, condensed, and compressed suggest progressively greater confinement in space; one use of this progression is to suggest brevity in writing or a lack of wordiness. Concise suggests the use of exactly as many words  as are required to express something and no more; it would apply more usually to technical, factual work, but may apply to imaginative prose: [examples omitted].

And here is Hayakawa on the "terse" family and, more particularly, laconic:

These adjectives stress brevity in speech or writing, the avoidance of any wasted words. ... Laconic literally means like a Spartan, with reference to the habitual terseness of Spartan speech. A laconic speaker is so sparing with words as to seem stingy or exceptionally self-controlled. [Examples omitted.] Both a terse and a laconic remark may be so brief as to seem curt. But where a terse remark is complete and its brevity may be due to the pressure of circumstances, a laconic remark may be puzzling and may suggest a deliberate taciturnity: [examples omitted].

In short, both Merriam-Webster and Hayakawa note the fitness of concise to a situation where brevity is appropriate, and view laconic as describing speech that may border on or cross over into rudeness (as curt does). However, Hayakawa also sees laconic as potentially being motivated by a constitutional aversion to lengthy self-expression, whereas concise simply matches the length of the wording to the needs of clarity—and doesn't use a word more.

Difference between “laconic” and “concise”?


Wireshark highlight missing sequence number

Question: I run Iperf over wifi sending udp packets from a client to a server and I capture the traffic with Wireshark. The total number of datagrams captured in Wireshark is less than sent with Iperf. Based on the sequence number it should be possible to figure out which frames are missing. Does Wireshark have some kind of highlighter which could be used to help me finding the gaps or is there some other way to find it?
Answer: I'm not running a version of Wireshark with iperf support, but I've done a similar thing with esp packets, which you might find useful and which I will use to illustrate below.  You will obviously need to modify the tshark command below to meet your iperf needs.  I suppose the filter probably just needs to be changed from -Y "esp" to -Y "iperf2_udp" and the field to print would likely just need to be changed from -e esp.sequence" to -e iperf2.udp.sequence", but I have no way to verify and test this at the moment, so I leave that as an exercise for the reader.
In any case, there are 3 basic steps to follow:

Using tshark, generate a list of all sequence numbers for the relevant flow and save it in a .csv file.  In my case:
tshark -r capture.pcap -Y "esp and ip.src eq 192.168.1.100" -T fields -e frame.number -e esp.sequence -E separator=, > esp_seq.csv
Import the .csv file into Excel (or your favorite spreadsheet software) and add a heading column so it looks nicer and you know which column is which.  It should look something like this:

           A        B        C
    1    Frame    Seq#
    2        2    7753
    3        4    7754
    4        6    7756
    5        8    7757

In cell C3, add a formula to indicate if there's a gap, and then apply that formula to every other cell in column C (except C2) by dragging the fill handle, e.g.,
=IF(B3-B2=1,"","Missing")

You should see:

           A        B        C
    1    Frame    Seq#
    2        2    7753
    3        4    7754
    4        6    7756       Missing
    5        8    7757

Credit: The Excel tip came from here, but with a slight modification to avoid the "Missing" appearing in the last row of column C.


What makes the electron, as an excitation in a field, discrete?

Question: In standard quantum mechanics, the wave function have discrete energy-values due to a potential. However, my very limited understanding of QFT is that electrons are excitation in the Dirac field, and the number of electrons is discrete even in free space. What is the reason for this, and why is there a minimum excitation?
Comment: The number of electrons in free space is discrete, but the spectrum of each is continuous, no?
Comment: For the energy? I would guess so, plus a constant mc^2. The energy spectra was ment as an analogy, I guess. I just have difficulties understanding how any representation of the states in free space become discrete.
Answer: I'll address what I understand to be your question, namely

Where is the discreteness of the number of excitations of QFT coming from, even in free propagation that apparently does not involve a potential and the corresponding compactness associated with discreteness?

(This is the magic of Fock space often referred to as "second quantization", an aggressively confusing term I and most avoid, truth be told...)
The short answer is

QFT is a repackaging of an infinity of quantum harmonic oscillators, each one with a discrete spectrum, each level of which corresponds to a particle.

This begs the question of where the harmonic potentials come from, if we are talking about free particles, no?
But this is a classical problem. Your classical continuum mechanics course describes, e.g., one-dimensional field theory, e.g.  a "string" often discretized for computational and visualization convenience--the continuum limit is taken at the end of the day, and that discreteness is "fake". What is the crucial part is that the next-neighbor couplings lead to many coupled oscillators, an infinity at the end of the day, whose decoupling leads to normal modes in momentum space.  The spectra of these oscillators, each one of them, are continuous before quantization.
But, upon quantization, the spectra become discrete. What you actually quantize is not x or its Fourier conjugate k, mere labels of the oscillators; but, instead, their displacement from equilibrium, the true dynamical variables.
Now each discrete excitation of each oscillator is a particle. The assembly has the built-in option of destroying as well as creating particles.
The ground state, $|0\rangle$, is the vacuum, with no particles.
$a^\dagger_k|0\rangle$ is one particle with momentum k , and there is a continuous infinity of them, as many as there are momenta. $a^\dagger_k a^\dagger _l|0\rangle$ is two particles, one with momentum k and one with momentum l, suitably (anti)symmetrized, depending on the statistics of your field. That is, every excitation ("phonon") creator gives you a new particle, etc... You sum the different energies of all your particles to get your total energy of your multi-article state.
The packaging algorithm of quantized oscillators (a functor) is artful and encodes symmetries, Lorentz covariance, etc, but this is mere fine print. The above are naive states; if you want more realistic pictures involving wave packets beyond plane waves, you huff and puff a little, but that is an independent technical problem.
So to answer what I believe to be your question, "Where are the harmonic potentials coming from?", they come from nearest neighbor interactions of your coupled degrees of freedom, the elastic medium itself, even when your quantum fields themselves, and the particles, are free
Might like this question.
Comment: [Here](https://www.hep.phy.cam.ac.uk/theory/webber/GFT/gft_handout3_06.pdf) is a friendly summary.
Comment: Thank you so much! I think this really answers the core of the question, though i guess I need to just get more familiar with the math to understand it better.
Answer: In normal quantum mechanics, we consider an individual particle, turn its momentum and position into vector operators $\hat{P}_i$ and $\hat{X}_i$, and enforce the canonical commutation relations $[\hat{X}_i,\hat{P}_j]=i\hbar\delta_{ij}$. In Quantum Field Theory, we want to apply the laws of quantum mechanics to the field itself, and not to particles. A field $\phi(\mathbf{x})$ is treated as a generalized infinite-dimensional coordinate (each position $\mathbf{x}$ is one degree of freedom, or one dimension). Its conjugate momentum is defined, using the usual procedure from Hamiltonian classical mechanics, as
$$\pi(\mathbf{x})\equiv\frac{\partial\mathcal{L}}{\partial\dot\phi(\mathbf{x})},$$ where $\mathcal{L}$ is the Lagrangian of the field. What we do in Quantum Field Theory is change the field $\phi$ and the conjugate momentum $\pi$ into operators. Then we need to figure out the eigenstates of the Hamiltonian. The way this is done depends on the field. For free Klein-Gordon fields, we do this using the commutation relations $[\phi(\mathbf{x}),\pi(\mathbf{x})]=i\hbar\delta^{(3)}(\mathbf{x}-\mathbf{y})$. We use the same trick that is often used in normal quantum mechanics to solve the quantum harmonic oscillator without invoking the Schrodinger equation. This is because the fourier-transformation the Klein-Gordon equation is of the same form as a harmonic oscillator equation. When we apply this method, we get creation and annihilation operators $a^\dagger(\mathbf{p})$ and $a(\mathbf{p})$ that create and destroy energy-momentum eigenstates out of the vacuum. You can choose any value of $\mathbf{p}$. The particles can have any momentum. However, the energy eigenvalues are $\sqrt{|\mathbf{p}|^2+m^2}$, so the particles always have mass $m$. There is no creation operator that gives you a "half" particle. There's the ground state $|0\rangle$, a state with one particle $a^\dagger(\mathbf{p})|0\rangle$, a state with two particles $a^\dagger(\mathbf{p}_1)a^\dagger(\mathbf{p}_2)|0\rangle$, but nothing in between. The reasoning that leads to discrete particles is the same as the reasoning that leads to discrete energy states in the quantum harmonic oscillator. You could certainly form a linear combination of a one particle and a two particle state, but when measured, it will collapse into an eigenvalue of whatever operator corresponds to that measurement. The procedure for electrons is different, since electrons obey the Dirac equation, but the procedure for the Klein-Gordon field should give you the general idea.
Answer: There are two facts to be distinguished. Electrons are what we loosely call particles, so they only ever occur in discrete numbers. Millikan demonstrated the discreteness of charge. Secondly, localised states in general have discrete energies. Examples of these are atomic and molecular states. Free electrons have continuous electrons. So called free electrons in metals for all practical purposes have continuous energies if the metal volume is macroscopic.
Why electrons are discrete particles or why quantum states are often discrete is not known.
A further question is how we account for these properties mathematically, but I believe this is not what you are asking.


What shutter speed to use for indoor karate without flash?

Question: What shutter speed would you recommend for an indoor karate tournament with slightly dim fluorescent lighting? I will not be using a flash. I'll be using a Canon T3i with an 85mm f/1.8 lens and using shutter priority mode. I normally use raw format but I'm switching my camera to jpeg format to avoid processing lag between pics. What do you think is the slowest shutter speed I can use without motion blur?
Comment: Boxing is different from karate, but from the point of view of answers to this question they're probably similar enough.
Answer: "...without motion blur" is somewhat subjective, as the acceptable amount of blur for me might be different for you. It also depends on how far your subject is from you. Because of these two factors, a specific shutter speed is not what I would recommend looking for. Instead, and since you are shooting digital - simply experiment and see what shutter speed works best for your needs.
Very generally speaking, I would start at 1/125s second shutter speed and work faster from there. You could potentially need as fast as 1/500-1/1000s to freeze very fast motion. I would say a safe bet would be 1/250s, but your results will vary. Depending on the routine, some movements could be very fast and you might want every bit of the subject sharp, if that is the case you will be testing the limits of your equipment with certainty. If the routine is a bit slower or you find a bit of blur in the extremities acceptable, this should be quite achievable with your kit.
What you may find, is that you are forced to shoot at 1/125s because that also requires either a very narrow depth of field, or a very high ISO that is too noisy for your tastes. Again, personal preferences play into this.
Keep in mind also that some motion blur can be an artistic effect that adds to the image. Especially if you can shoot with a flash(but maybe you aren't allowed to), and use second-curtain sync.
Finally, why not browse through some Flickr images and examine the shutter speed used? Nothing beats real world examples to show the differences: http://www.flickr.com/search/?q=karate
Here are some examples at varying shutter speeds. These are of a soccer game, but the same idea applies. These are all pretty poor images unfortunately.
18mm, f/3.5, 1/40sec:

50mm, f/2.8, 1/125sec:

18mm, f/3.5, 1/500sec:
Comment: I hadn't thought of checking flickr. That's a great idea. Thank you for the pics you included, those are very helpful!
Answer: Presumably you want to freeze motion, keep your entire subject in focus and minimise noise - in that order. If you want less noise, you'd have to accept some blur (which as dpollitt said, can turn out nicely) - the blur could be due to motion (slower shutter speed) or focus (narrow depth of field/large aperture).
To start, I'd set a shutter speed that will freeze the action, so I'd probably go for about 1/250 as a minimum. From there, I'd set an aperture that will keep my entire subject in focus - if you're not sure what aperture to choose, try using dofmaster.com, or simply experiment on the day. Finally, I'd raise the ISO to whatever was needed to ensure the subject is appropriately exposed.
If the lighting stays more or less the same and the general composition of your photos don't change, you should be able to stick to the same settings most of the time. However, beware that if you're not in full manual mode, changing compositions and having different background colours can force your camera to over- or under-expose your subject.
Two basic rules about depth of field: 1) The closer you are to your subject, the narrower the depth of field, and vice versa, for any given aperture; and 2) the larger the aperture (smaller f-number) the narrower the depth of field, and vice versa (larger f-number), for any fixed distance to your subject. If you decrease the aperture to get more into focus, you may need to increase the ISO to unacceptable levels (heaps of noise), but that depends on your taste.
Having said all that, please experiment with different settings! It's the best way to discover what does what and could provide you with some creative insight for future shoots.
Good luck!

EDIT: In response to Robin's comment, that's correct. To capture a subject about 1.8 meters tall with an 85mm lens on a crop frame sensor, you'd need to stand about 10 meters away, giving you about a meter depth of field at f/1.8
But keep in mind the camera focuses at the surface of your subject, which has depth itself. A person isn't paper thin. f/1.8 at 10m away from your subject, on your lens, would give you only half a meter of acceptable focus into the subject. With extended arms and legs, you'll want to have an even deeper depth of field. An aperture of 2.8 should do the trick, and if you get closer to capture only half-body or head portraits (which often sport photographers do) you'll probably want to decrease the aperture a little further.
This is all very theoretical and probably not necessary - I'd say fiddle around with the settings until you're getting your desired results.
Comment: Given that he is using an 85mm on a crop sensor, DOF should not be an issue as he will have to maintain a fair distance to capture a half or full body shot.  Closer shots showing less of the body might be a an issue though, but for capturing pics of actual sparring matches you don't want to be too close, since it is harder to keep the combatants in frame due to the unpredictable movements.
Comment: I took photos at the same venue about six months ago and I used my zoom lens. I had just gotten my first dslr a few days before and didn't know how to use it, so I kept it in full automatic mode. I went over the photos later and they were both noisy and blurry. The action shots were very blurry from too low a shutter speed. Most of the photos were at 100mm and had room to crop. I'm going to use my 85mm this time around and that should get everything in the frame, but if it doesn't I'll switch to my 50mm. Thank you for the great advice. This is really very helpful.


Antenna effiency in bluetooth module

Question: So i read alot of data sheets regarding bluetooth modules and when i come acorss antenna section i find that term called effeciency. What is it for ? For example If class 1 bluetooth  with 100m range and 70% effiency. It means that effective range is only 70m or what.there is another term called gain is this one has direct relation to range too. Thanks in advance
Answer: In broad terms, the efficiency of the antenna is the measure of how efficiently it radiates energy. For example, if an antenna is 50% efficient and we put in 1W of electrical energy, it will radiate (turn into RF radiation) 0.5W of RF energy. Obviously a higher efficiency is good, because it means we get more RF energy.
Antenna gain is a bit more complicated. Basically, different antenna shapes will have different radiation patterns. For example, with a directional antenna, it will radiate a lot of energy in a thin beam in the direction that it's pointing, and not much energy in any other direction. This gain is relative to the radiation pattern of an isotropic antenna, which is a non-directional antenna that radiates equally in all directions. The gain can be measured in different directions from the antenna, but usually when only a single number is given, it refers to the peak gain, i.e. how much better is the antenna at transmitting in a specific direction than an isotropic antenna.
More antenna efficiency is always good, but more gain is only good if you want more directionality. This may not always be the case, for example if you dont know where the other antenna is, you would want power to be radiated more evenly in all directions.
In this case, the manufacturer is quoting a distance for the module and the antenna together, so you can assume that the range is 100m in at least some directions. However, depending on the directionality of the antenna, the range may be lower in other directions. If you removed that antenna and put on an antenna with a higher efficiency, like 100% and the same gain, the range would be 142m (in an ideal situation).
Comment: So including the effiency and gain the maximum range will be 100m in ideal situation and less in other direction depending on the radiation pattern correct me if i am wrong
Comment: Yes, although ideal situations are pretty rare, plus manufacturers usually quote the best number that could possibly ever exist (read: lie)
Comment: Thank you so much and the last question. There is term called output power of antenna and measured with dbm. Some module contain programmable output power so you can change the value. Does changing this value can affect the range in any mean at least in the 100m example and thank you so much
Comment: Dbm is the output power of the device, its a measure of how many milliwatts the device is pumping into the antenna. A higher dbm means the device is putting out more power, so the antenna will transmit more power, so the transmit range will be higher. If there are multiple power levels, it should specify what power level that 100m range is measured with. If it doesn't specify, it's probably the highest one.

Antenna effiency in bluetooth module


Is there no way to bypass greenhouse gasses by converting excess heat to longerwave radiation?

Question: The problem with greenhouse gases, as I understand it, is that they absorb and emit radiation within the thermal infrared range leading to increased temperatures on Earth. According to some sources, there appears to be a large gap with lower atmospheric opacity for wavelengths between 10cm and 10m. Can we not convert significant amounts of thermal infrared radiation to longer wave radiation in an efficient way (especially since it is lower entropy)? I understand the radiation is pretty spread out, but couldn't we expel thermal radiation from volcanos or industry that way?
Comment: If it were possible, the transmitters used for this would give conspiracy theorists a field day. HAARP is nothing compared to the size of these things ;-)
Comment: So far as I'm aware, there is really no good method known for "converting frequencies" as you put it, though someone else could probably give a more authoritative answer there. I will also note that there is no notion of different frequencies of light corresponding to different entropies.
Answer: One thing to keep in mind is that such conversion is itself a thermodynamic process, which necessarily has finite efficientcy. Thus, there will be heating effect due to the conversion itself.
When discussing global warming it is important to keep in mind the basic thermodynamics. The warming as a consequence of the efficiency of any human devices being elss than 1, as required by the second law of thermodynamics. The rejected heat is in essence the warming, and the realistic ways of reducing it is either reducing the energy consumption, or using more efficient technologies (which may produce some paradoxal results when comparing the "green energy" with the fossil or the nuclear).
The effective irradiation of the heat by earth is only a part of the picture, and unlikely the key to the permanent solution of the problem (since we may eventually run into other problems, if Earth is continuously to lose more and more heat).
If we however accept this as a solution, then the answer to the question depends on the balance between the efficientcy of (i.e., the warming due to) the frequency conversion vs. the improving the irradiation of energy by Earth.


Run 12v Incandescent Bulbs off Fluorescent Ballast

Question: Can I use a 120v AC to 12v AC electronic transformer to power 12v bulbs?  I have a 150 watt transformer that I tried connecting to a single 10w  incandescent bulb, but the bulb just flickers at a low frequency.
Comment: AHA!!! It's an electronic transformer with a 12V "secondary" which puts out 12VAC at 30 kHz and can supply between 50 and 150 watts into a halogen (incandescent) load.
Comment: What does a 120v AC to 12v AC fluorescent light ballast look like?  And what kind of bulb are you referring to?
Comment: Added clarification that I'm talking about an incandescent bulb -- the ballast looks like a rectangular box with two 120v input wires and two 12v output.
Comment: I have never seen a fluorescent light ballast with a 12V output. Do you have an image?
Comment: Sure, this is the model that I have -- perhaps it isn't for fluorescent lights, I just assumed... http://www.amazon.com/gp/product/B001CN6IWI/ref=oh_aui_detailpage_o06_s00?ie=UTF8&psc=1
Comment: Thanks, and how did you find the minimum of 50 watts?
Answer: In a word, "No."
A hot 12 volt, 10 watt incandescent lamp looks like about 14.4 ohms and, when it's cold, about 1.5 ohms.
The fluorescent ballast initially generates a high voltage to break over what looks like an infinite impedance in the lamp, and then once current starts to flow through the lamp and its impedance drops drastically, it limits the current through the lamp until the mains voltage goes through zero volts, extinguishing the lamp.
Once the voltage goes through zero, its amplitude starts to increase, starting the cycle anew.
So, with only the incandescent lamp resistance across it, the ballast can only go into current-limiting mode and won't be able to generate enough voltage to drive the incandescent lamp properly.
EDIT
In a word, "Yes."
The device is an electronic transformer with a 12 volt, 30 kHz output, and is designed to feed a halogen (incandescent) load of from 50 to 150 watts.
The trouble you're having is because you're asking it to drive a 10 watt load.
Comment: I think I understand, but could I use a resistor in series with the lamps in order to provide a higher impedance?  If so, what resistance would be necessary?  I'll have qty. 8 of these lamps in series.
Comment: Belay my original post; see the edit.
Answer: The device shown in the link you provided in the comments is not a "fluorescent light ballast", it is an electronic transformer meant to power halogen light bulbs. The reason your lamp is blinking is that the device has a minimum load of 50W and you only load it with a 10W bulb.


FTDI High speed serial on MacOS

Question: I have a FTDI serial cable (C232HD-DDHSP-0) which also supports high speeds (I need 3500000). I want to use this on MacOS with eg picocom (and later on a library). Picocom is build with support for higher baud rates.
<code>$ picocom --help
picocom v3.1

Compiled-in options:
TTY_Q_SZ is 0
HIGH_BAUD is enabled
USE_FLOCK is enabled
LINENOISE is enabled
HISTFILE is: .picocom_history
USE_CUSTOM_BAUD is enabled
</code>
I've installed the FTDI drivers, and using kextstat I can also see the ftdi driver is being used (I need to unload the AppleUSBFTDI driver).
But somehow higher speeds are not accepted. Using stty to set the speed results in an error (for both drivers).
<code>$ stty -f /dev/cu.usbserial-FT1UD0JP 3500000
stty: tcsetattr: Invalid argument
</code>
I've also found an old blog post and technical note detailing how to add aliasses for the baud rate. But with recent versions of MacOS, unsigned drivers are not allowed. Since updating the Info.plist changes the driver, it is not trusted anymore.
The cable (and device is needs to be connected to) do work fine when using a Linux setup. So the problem is somewhere on the MacOS side of things.
How can I get support for the higher baud rates on MacOS?
And to try things, how can I load unsigned/untrusted kernel drivers?
Answer: To answer my own question, currently the only way is to use the baud rate aliasing as described in the technical note.
Since that results in a changed driver, it either needs resigning, or disabling of SIP.

FTDI High speed serial on MacOS


Do bonuses to power damage affect damage from grenades?

Question: I'm playing an infiltrator in Mass Effect 3 multiplayer, and I want my sticky grenades to be very damaging. Does anyone know?
Answer: Yes, power damage bonuses are applied to grenades.
You can actually see this happen - the damage numbers displayed on the upgrade screen are updated when you take power bonus upgrades. So if you have some level-up points to spend, you can check the amount of damage that your grenades are doing, take an upgrade that provides a power damage bonus, and check the grenade damage again. The number will have increased. (If you're unhappy with what you see, make sure you undo the changes before exiting the powers screen!)
I used the method above to verify that power damage bonuses applied to the cluster grenades on my Drell Vanguard. I don't have an Infiltrator in a state where I can check the sticky grenades, but I can't imagine why it would be different.
Comment: Awesome thank you Jon! I looked and you were completely correct!
also if you are playing on the ps3 feel free to add me
psnid: jimmy_potts


Sources say English was rhotic in the 17th century -- how do they know that?

Question: Sources say English was rhotic in most places in the 17th century. How do they know that? Obviously, we don't have any samples of recorded speech from that time.
Comment: I don't know whether anybody has done a detailed study like this, but you could look at poetry, and see how often poets rhymed words that only rhyme in non-rhotic accents.
Answer: For one thing, there are dictionaries from that time that indicate pronunciation, and we can learn from how they write down pronunciation. For example, I have heard Walker's Critical Pronouncing Dictionary cited as a source on that matter.
Answer: In addition to rhymes and dictionaries already noted, you can cite spelling shifts in which the "r" letter positioned after a vowel disappears from certain words.
The Wikipedia article about Rhotic and non-rhotic accents cites

the Oxford English Dictionary reports
  bace for earlier barse (today "bass",
  the fish) in 1440 and passel for
  parcel in 1468.

which is more or less the time frame in the question.  This shows, assuming the spelling evolution follows the pronunciation shift, that in this words the rhotic pronunciation had disappeared as well.
Also have a look to a contemporary phenomenon named "The Great vowel shift".
Answer: Well for one thing if it wasn't people would not write it down(but then again that's not always true because of influence from other language orthography)second the english left in the US that was left far before the one in australia has the r in many of it's variants and most importantly people wrote that the r sound was pronounced in pronunciation books or else when describing the way someone speaks also some extremists in the high classes in britian wanted the king to ban the dropping of r when it started picking up in their circle groups showing that it was pronounced ,definitely in some people!


How to edit files from remote server as root while ssh-ing from VS code?

Question: I'm connecting to a virtual machine in Azure using Remote-SSH extension in Visual Studio Code. Problem is I can't ssh as root, but need root privileges to edit some files in /etc folder. 'Sudo-ing' in the terminal window has no effect. I'm thinking changing the file permissions would allow me to edit the files as a normal user, but I'd rather avoid that. Any ideas how I could edit the files in VS Code then?
Answer: I ended up using SSH FS extension instead. Created a new configuration with my connection details (host, username and private key). Then in File > Preferences > Settings > Extensions > SSH FS Configuration > Sshfs: Configs I added "sftpSudo": true, which allowed me to edit the files as root.
p.s. I'll leave the question open for a while longer, just in case somebody can explain how I can achieve this using Remote-SSH extension.
Comment: does that work in explorer tab?
Comment: If you're using the Edit config tab, just add your user under SFTP Sudo Optional.
Answer: One solution is to use bindfs (sudo apt install bindfs).
To enable editing /etc as root for the current user, working in ~/.bind-mounts/etc:
mkdir -p ~/.bind-mounts/etc
sudo bindfs --map=root/${USER}:@root/@$(id -gn) /etc ~/.bind-mounts/etc

# When you're done
sudo umount ~/.bind-mounts/etc
# or run bindfs with '-f' to keep it in the foreground

bindfs has many options. --map may not be the best. It's been working in my testing so far.
Everything seems to work as you'd expect. Lets you "explore" as root and any modifications will be made as if you had root's permissions. Just don't forget the security implications!

Original answer is here, behind the fold.


UML : is it okay to use only Association in a class diagram ?

Question: I feel confused about the three relationships Association, Aggregation and  Composition in UML. I need to finish a project soon, until it became less unclear in my head, is it okay to use only Associations ?
Comment: That depends entirely on what information you want to convey with the class diagrams and if that information can be easily understood if you only use associations.
Comment: Apparently, even the UML founders could not decide... https://martinfowler.com/bliki/AggregationAndComposition.html
Answer: Here's why this is so confusing:

c-sharpcorner.com | Dependency, Generalization, Association, Aggregation, Composition in OOP
<code>            |  Ownership  | Lifetime dependency |
Association | none/anyone |        none         |
Aggregation |  one owner  |        none         |
Composition |  one owner  |      on owner       |
</code>
Those are some very clear definitions. We depict them this way:

eclipse.org | Papyrus Guide > User Guide > Starter Guide | 7.4.6 Relationships
However when you see

Does that guarantee there is no ownership or merely not insist on ownership? Composition is an Association after all. Now try to read this:
<code>        4  1     1  1
  [Tire]---◆[Car]♢---[Spare Tire]
              | 1
              | 1
       [Cup of Coffee]
</code>
And tell me if the names or the UML give you a better understanding of what is going on. If you can't trust me to always use the narrowest relationship depiction possible the symbols stop being important.
Keep that in mind when you diagram. I'm not saying you always have to be 100% faithful, most people aren't, but take responsibility for that and somehow let us know when you are being serious about the symbols and when you aren't. Otherwise this becomes a write once, read never exercise.
Answer: Yes, of course it's okay. Both aggregation and composition are types of association. So what you create might not have all the detail it could have but it will still be correct. You can always add details later.
Remember that UML diagrams are models and not complete descriptions of the actual software.
I like to add that in many cases, there really is no clear or objective answer to the question if a given relationship is aggregation, composition or just association.
For more details, you could check this article.
Answer: Essentially, when you have an association, you're stating that at least one instance of A can be dynamically linked to at least one instance of B. You aren't constrained by the type of link existing between the two, other than it's a dynamic link, at class/instance level (i.e., an attribute, not a local variable in a method, that would be a dependency relationship instead). This is useful, for instance, when an instance simply makes use of another instance in a delegation.
When you use an aggregation, you're semantically stating that the instance of A is aggregating (e.g., "part of") at least an instance of B. This is a specialized version of an association, used for instance to model a container and the items it contains (the items of a list).
Composition is the most specialized kind of aggregation (and, by extension, of association). Semantically it expresses that A not only aggregates B, but that the instance cannot exist without its parts. Using a real-life example, it's like saying a LivingPerson needs a Brain and a Heart.
Of course, this is a matter of refining the model. If you are okay with just modeling the association and not going into much detail (usually in the early stages of the design/development, a practice recommended by Robert C. Martin), just go for associations only. If an aggregation or composition is semantically very relevant for the model, then you're somewhat forced to use them. The same goes for a lot of other UML elements (the stereotypes of a dependency, cardinalities...) The key part is that the model is clear enough to be understandable, yet concise enough to provide a clear understanding of the idea being modeled.


What is the QFT picture of a static electric field?

Question: Accelerating charge generates electromagnetic waves and loses energy, in QFT terms it emits photons that carry it away. What of a static charge? Moving photons are usually associated with waves, which do not seem to be there in a static field, and static charge has no energy to lose. However, in the classical picture it fills the space with something, and another charge "feels" it when placed into it. So what exactly does it interact with locally?
Comment: The ontological status of such "virtual pairs" is highly debatable. The standard QFT formalism does *not* assign particle states to virtual particles, they are just lines in a Feynman diagram. If we were able to compute everything non-perturbatively, the notion of "virtual particle" would never have appeared. You should not trust *any* physical argument that relies on virtual particles having properties of actual particles.
Comment: You first have to recover the Coulomb potential from the tree-level QFT amplitude as in [this question](http://physics.stackexchange.com/q/142159/50583), and then you take usual QM for the Coulomb potential and go to the classical limit to get classical electromagnetism. (So the answer is: "Take the classical limit", as always) I'm not sure if that's your question, though.
Comment: @ACuriousMind I guess my question is what the static charge exchanges photons with when it's alone. It seems it can't just emit them away since no waves are propagating. I can see how exchange of photons between two charges creates attractive/repulsive force, but when there is only one how does the static field emerge from photons?
Comment: Well, when the universe is empty except for the field of one lone static charge, then how do you know the electric field is there? After all, the electric field is operationally defined in terms of the force on another *test charge*.
Comment: @ACuriousMind People talk about creation/annihilation of virtual pairs creating vacuum fluctuations in "empty" space, so I thought there was some such picture for a static field when a lone charge is added. Also the test charge seems to "feel" the field instantly (maybe not?), whereas time is needed for it to exchange a photon with the original charge.
Comment: @ACuriousMind Perturbative limitation is a good point, but vacuum does display zero point energy, meaning that the space is not quite empty. Non-perturbative theory will have to give some account of that. Hawking radiation was predicted based on the virtual particle picture and then confirmed, so perhaps it does capture something.
Comment: @Conifold: The cosmological constant seems to have a numerical value of about $1J/km^3$. Not only is that "quite empty", QFT also gets it completely wrong.
Comment: Possible duplicates: https://physics.stackexchange.com/q/142159/2451 and links therein.
Answer: I would have just made a comment, but I'm not allowed yet--
It sounds like your more general underlying question is: "How do we think about classical electromagnetic fields from the perspective of QED?"  In particular, which configuration of quantum fields in QED do we associate with classical fields? How do we derive Maxwell's equations for these classical fields, using the QED equations of motion for the corresponding quantum fields? How do we derive the Lorentz force law describing the force on electrons?
The basic answer is that classical fields are best represented by coherent states in QED.  These states are an infinite superposition of photon number states -- that is, there's nonzero probability of finding any number of photons. (In particular, probabilities for different photon numbers obey Poisson statistics.)  The expected value of the electromagnetic field operators for these states corresponds to what we'd classically call the values of the electromagnetic field, and these expected values obey classical Maxwell equations.
The best notes I've found going through these questions might be:
http://hitoshi.berkeley.edu/221b/photons.pdf.
You might also look at related SE questions What is the quantum state of a static electric field? and Given expectation values for E and B, can you find an associated state?.

A more direct answer to your immediate question: the classical field produced by a static charge corresponds to a quantum field (a coherent state) with high photon number.  You point out that single photons are associated with traveling waves, yet somehow we have a static field.  There's no contradiction because the coherent state is a superposition of many such traveling waves and thus has different behavior.  Another charge placed nearby will interact with this photon field.
Comment: I am glad you wrote an answer rather than a comment, it's a very nice answer. I'll wait a little for people to weigh in before accepting.


Reasons why Electronics might not exist

Question: I was thinking about the Steampunk genre the other day, particularly Gibson's Difference Engine, and basically thought to myself; Steampunk is what would happen to the world if we didn't have electronics. This got me to thinking: what would lead to a world without electronics? Lack of a certain discovery, compound, or law of physics?
Comment: P.S. If you vote to close this question, please indicate in a comment whether it's because you're against history speculation, because you think it's too open-ended, or for some other reasons. Explaining closings really helps figure out the site's identity.
Comment: It's not clear whether this question is on-topic for this site. Please see [this Meta question](http://meta.scifi.stackexchange.com/questions/406/are-speculations-about-history-on-topic) (as I write this comment, it doesn't have answers yet). Regardless of the result, this is a very open-ended question; while it is interesting, it does not fit so well in the [questions and answers format](http://scifi.stackexchange.com/about). It just might be considered a [good subjective question](http://blog.stackoverflow.com/2010/09/good-subjective-bad-subjective/), though.
Answer: Failure of a successful invention of a lightbulb would most likely result in a lack of hollow-state devices (called "vacuum tubes" in the US, and "valves" in UK).
MOS technology was discovered in the 1920s, however the inability to refine semiconductors to the required purity was why MOSFET devices were not invented for half a century. "Tubes" are sometimes euphemistically called "glass FETs" as both vacuum tubes/vales and MOSFETs are voltage amplifiers. In contrast, transistors are current amplifiers.
The technology needed to refine semiconductors to the purity required were offshoots of the technologies that had to be invented for the Manhattan Project. So a world where there was no WW2, or no atom bomb project, would probably not develop the chemical refining processes needed to get the purity required for working semiconductors. No transistors would exist in such a world.
And at a far more fundamental level, it was Maxwell who discovered the links between electricity and magnetism. We humans live at temperatures where electricity and magnetism are readily convertible with each other: that electricity and magnetism are symmetrical and can be regarded as a single force called electromagnetism. Without his equations, relating electricity and magnetism would have been far more trial and error rather than the engineering that it has become. Too much colder, and one could not readily convert one to the other (generally, we call those areas "superconductivity").
And on a far more cynical level, based on how much technology had to be discovered, invented and developed for the Manhattan Project, the lack of crazy wild new technology shows that there are no UFOs at Area 51. Not just crazy new things to put into the UFOs, but the tools and machinery required to make those devices would need entire new industries. A look at the amount of effort that went into getting the titanium needed for SR-71s, as well as what tools had to be made to work with titanium is educational (most tools used for machine use are coated with cadmium - this causes extensive corrosion when used on titanium).
For an interesting history of technology, I recommend watching the series Connections.
Answer: First of all, this is not entirely true; steam was used to transport heat from some burning fuel to the engine, an was naturally replaced with engines with internal combustion -- this is a very natural and logic consequence of improving steam technology, so I think this step was almost inevitable. On the other hand, we still depend on internal combustion (with cars as a most lurid example), nevertheless of electrification of most other machines.
The other (and in fact orthogonal) aspect of steampunk are the mechanic realizations of electronic stuff -- this is a it more probable if one assumes that for some reason electricity was not invented or rejected for some reason (religion?). Although it is definitely not a stable alternative since (paradoxically) mechanical technology requires much more complex designs, huge precision in making parts (this is the reason why Babbage computer failed) and is just very slow.
Answer: Just the absence of some rare elements used in semiconductors such as Gallium can be the reason behind the setback of the advent of solid state electronics.
For vacuum tubes, you would need another excuse, as any conductor can become an electrode with varying degrees of efficiency. Perhaps Earth is experiencing a severe solar storm (yet unknown to people) that will last for a century or two, so any baby steps in electronics are bound to fail due to severe interference, and any attempts at developing electronic components are written off as chaotic, unstable and unpredictable as a result.
Answer: I always got the impression that it happened because of a lack of progress. Electricity in Steampunk tends to be treated as an oddity, not a tool. Otherwise, it's treated as something cold and impersonal, whereas steam and mechanics are more "human".
It seems like the main reason electricity isn't used is because there are no transistors. You can usually find more primitive things like switches, capacitors, and large (inefficient) generators, but good batteries and transistors always seem to be missing (an example would be Mortal Engines).
You also made a good point about physics. In stories like Terminal World, the different "zones of technologies" make it a physical impossibility for electrical devices to exist in some places.
Answer: In Alastair Reynold's Terminal World, one of the theories about the "zones" is the "grid" on which matter is arranged changes from zones to zones, so that in some zones you cannot make certain connections or atomic placements needed for higher end biological/chemical/mechanical interactions.
While the book mostly talks about how stuff stops working, it seems like there's something about the physical organization of matter which would either prevent electricity from "flowing", or at least from correctly operating in circuits.
Only certain zones (such as "circuit city" region of Spear Point) can support electronics.
Answer: In a hypothetical alternate universe Electronics could have not arisen because it was seen as unclean or unholy. A single Papal decree declaring the use of electricity to be the work of the devil would suffice. Perhaps there is a deeper reason for this, maybe the catholic church is heavily invested in the coal industry which fuels the steam technology? Or maybe they just think it's evil.
Also innovation comes from a need for innovation, if steam based solutions exist for problems that could be solved by electricity then the development of electricity would be stunted. The only thing I can think of that can't be done with pure steam is generation of light, but you have gas lanterns for that. You can even make a computer that operates on steam, arguably it would be a lot slower than the electronic ones we have today.

Reasons why Electronics might not exist


Is it okay to talk to the editor about the topic of paper or whether if our manuscript is suitable for the journal before submitting?

Question: So this is my first research paper, I just wanted to know whether these things are considered unethical or idk creepy way to lure your paper in or its totally okay and people do that.
Comment: You asked about a journal - but your comment mentions a conference. Which one are you applying to?
Comment: Do you know the editor? Do you mean like chatting with them in the hallway, or sending a cold email?
Comment: Nope I was planning to send a cold mail tbh since the domain of the conference is slightly off than the topic we wrote the paper in
Answer: To give you some context, out of my 13 journal papers I asked the editor twice. Once it was a regular issue, once it was a special issue. Once the paper in question was accepted afterwards, once it was rejected and landed elsewhere.
I wrote typically something along the lines of:

Dear %editor_name%,
I am considering to submit my paper "On the sepulation in the context of the Mars phase" for possible publication in your "International Journal of Highly Reputable Research". In this manuscript I exploit the stigma of sepulation in the context of the planetary movement. Specially, the Mars phases were never before regarded in this context.
The abstract of my paper is: %abstract in full%
My article contains 4123 words (including footnotes, references and figure captions). It contains 5 color figures and 23 references. I have never published this article before nor have I submitted it to any other journal or conference.
Would such an article be of interest for your journal? Please let me know if you feel that my focus on Mars phases would pose a problem for acceptance in your journal.
Thank you very much. I am looking forward to hearing from you.

Hope this helps.
I have never perceived such queries as bad or damaging. But in most cases they are not needed, as you can tell the relation of your paper to the journal well enough from the aims and scope.
It's the intersection of the actual journal topic with something else, when you might want to ask the editor beforehand.
Comment: I have used a letter similar to this for general-audience prestige journals, omitting the length part and adding a research impact summary. So I would say this is a very useful, broadly applicable answer.
Answer: It is fine to do this although prior research is usually an implicit first step: if you request is not serious, you may not get an answer.
A good start is by looking at recent back issues to see if material on this general topic has been published in that journal.  Another good sign is that some of the cited literature in your work was published in your target journal.
Answer: First, you should check available materials on the scope of the publication. They might answer your question. But, you can ask, and it isn't creepy. But, if the editor is busy, or your email is too detailed, you might not get an answer. I suspect that editors get more of these requests than they'd like, actually. The editors of many (most, perhaps) journals are not paid employees and have other (usually academic) jobs.
But, submitting the paper will get you the same answer using normal practices. If your paper is clearly out of scope, then the editor will reject it rather than finding reviewers and you will learn just about as quickly as any other method.
Comment: If one submits a manuscript it needs to be formatted according to the specific journal guidelines. If one is unsure if it fits into the journal's scope, it can save substantial time to ask first.
Comment: Thanks @buffy! That was very Helpful
Comment: @Roland How necessary it is to format to the journal guidelines appears to vary by field. As a mathematician, I never worry about formatting in my initial submission and have never been pulled up on it.
Comment: @ShaneORourke I use a broad definition of "formatting" here. In my field, that includes word limits, separate or combined Results and Discussion sections, highlights, graphical abstracts, ...
Answer: It's acceptable to ask, but make sure you have a concrete question that doesn't amount to "is our paper going to be accepted" (because answering that question entails the full peer-review process). For example some things you could ask about are whether your paper is within the scope of the journal, or whether the length is appropriate.
Do note that even if the answer is yes, it doesn't mean your paper is going to be accepted.
Answer: I recently attended a seminar by an editor opening a new journal in an established (and high-profile) series of journals in my field. She highly encouraged authors to contact the editors of the journal before submission- the goal of the journal is to publish research that fits the scope of their journal- if you're not sure whether your paper is a good fit, it saves time on the part of the editor and the author to ask beforehand.
Instead of taking a lot of time to prepare your article for a specific journal, and the time of the editor to read through the whole paper and try to understand if it is a fit, a short email succinctly describing the paper can save both you and the editor time in the long run. The editor can see whether the content and novelty factor of the research is what they, as an editor, are looking for, and give you an early green or red light.
That being said- do your research. It won't be a good look if your paper is far off the mark for what the journal usually publishes. Where does your research group usually publish? Your colleagues? People working on the same kind of work as you?
Answer: Absolutely!
The term you are looking for is "presubmission inquiry" and they are fairly common, even encouraged. For example, Current Biology writes:

The editors strongly encourage authors who are interested in submitting
work for potential publication in Current Biology to send a
presubmission inquiry prior to any formal manuscript submission.
Presubmission inquiries should include a clear abstract and a cover
note explaining the significance of the advance and the potential
general interest to the broad readership of Current Biology.

The editor's response is not binding---how could it be, without seeing the whole paper---but can help avoid editorial rejections because the topic is a bad fit for the journal, or the result isn't glitzy enough for their "broad" readership. Occasionally, one even gets actual suggestions about how to frame the proposed manuscript. For example, one editor told me that he was a) generally interested in the topic but b) skeptical about it, and would therefore be expecting rigorous controls. This influenced how we structured the manuscript.
For a typical primary research article, presubmission inquiries are usually optional. If you feel confident that your manuscript is a good match, you can submit it directly. However, inquiries are more commonly expected for "exotic" manuscript formats. For example, Brain requires them for their Review and Update formats, but not for regular research reports.
Note that some journals have an established procedure for making one. Nature and Cell Reports have online submission systems. Other journals take them via email, but have specific requirements. Check the Author Guide carefully!
These posts from editors at PLOS Biology and Cell may be helpful for understanding them from an editor's perspective.
Answer: Yes, of course. But before asking, make sure to thoroughly check their website to ensure they have not already answered your question; For example in the "Aims and Scope" or a similar section. Most journals have one. If even after reading this section you are not sure, ask them. I have done this several times. It will save you at least a couple of weeks because if you just send your article blindly, it may not be rejected immediately. The editors are always busy!


Why is it Cosmic microwave background not Cosmic gamma ray background

Question: If the universe was at so much heat at the singularity point at big bang , Then the light of CMB must be gamma rays (high energy photons) but how did they transfer into microwaves?
Answer: The very early universe was unimaginably hot.  But we don't get any signal from this period of time because it was also opaque.
The early universe was full of plasma - the form of matter which is so hot that electrons are free from their nuclei. Plasma is normally opaque. When the universe cooled to a temperature about 3000 Kelvin, it was cool enough for electrically neutral atoms to form, and this gas is transparent. That was 300000-400000 years after the big bang. So the background light was emitted as blackbody radiation of about 3000K - which would appear "orange" (but actually contains a mixture of yellow, red and infrared wavelengths).
We don't see the background radiation as orange, because redshift has stretched the wavelength of the light by a factor of over 1000, shifting it from visible to microwave radiation and giving an apparent temperature of 2.7K
So two factors.  One it was never gamma rays from a point in time soon after the big bang, but orange light from the time when atoms first formed.  Secondly redshift makes distant things appear cooler.
Comment: I don't think the opaqueness of the Universe is really the issue, only the expansion/cooling, for the following reason: Even if hydrogen had never recombined, radiation would keep redshifting, both in the early and the late Universe. At $t\sim1$ s, photons were in the gamma-ray regime, later they were X-ray, UV, and so on. Today, they would be microwaves whether or not they were "primordial", or emitted by recombining hydrogen later on. Today the Universe is indeed reionized, but has expanded so much that the mean free path of photons is larger than the size of the observable Universe.
Comment: Thank you for the answer !
Comment: @pela Not sure (exactly) about that. You need $T \propto a^{-1}$ but that isn't the case for a matter-dominated universe. That means between the epoch of matter-domination and the epoch of recombination, the universe doesn't have a temperature that falls as $a^{-1}$. I think this means that the exact temperature of the CMB does depend on when the radiation decoupled (if it decouples after matter density dominates). Perhaps the epochs are close enough together that it doesn't change a broad "the CMB would be microwaves" statement though.
Comment: @ProfRob I don't quite understand: $T$ should always follow $a^{-1}$, no matter how $a$ evolves, no? Although $a$ itself evolves with time $t$ on different ways, depending on which ingredient dominates the density, so $T$ also evolves similarly differently with time.
Comment: @pela  How did you derive $T \propto a^{-1}$ in a matter-dominated universe? The usual derivation would assume that the energy density scales as $T^4$, which wouldn't be true. Pretty sure that non-relativistic particles cool as $T \propto a^{-2}$. https://arxiv.org/pdf/physics/0603087.pdf
Comment: @ProfRob Ah sorry, your $T$ is referring to the temperature of matter, not of the radiation, but $T_\mathrm{CMB}$ will then follow $T$ if it hasn't decoupled. So without recombination, $T_\mathrm{CMB}$ decreases not because of redshift (which would be $T_\mathrm{CMB} \propto a^{-1}$), but because it's coupled to matter which, as you say, decreases as $T_\mathrm{CMB} \propto a^{-2}$. In other words: You're right! However, even without recombination, if I haven't miscalculated the mean free path to electron scattering surpasses the horizon around $z\sim30$.
Comment: @pela well I'm not sure what magic is to be invoked to change the way the universe is. Possibly altering the Thomson cross-section by a few orders of magnitude? I think if you make it transparent earlier that''s fine, but transparent later does change things.
Comment: @ProfRob Agreed!
Answer: The cosmic microwave background radiation was emitted 300 to 400 thousand years after the big bang. At the time, the radiation was primarily in the near infrared range, what a blackbody at about 3000 kelvins would radiate. (That's about where a red giant or red dwarf radiates.) The expansion of space has made the frequency shift from the near infrared to microwave frequencies.
The universe was opaque before that time. Any thermally induced electromagnetic radiation that was omitted by something would very quickly have been absorbed by something else. The cosmic microwave background radiation resulted when the universe cooled to the point where it became clear to thermal radiation. Scientists have to infer what happened prior to that based on theory and observations of the cosmic microwave background radiation.
Comment: thank you so much !
Answer: You forget that the universe cools as it expands - as do all gases if there is no further heat input.
At first, the cooling gas and the radiation it emits are in equilibrium with each other, at the same temperature. Gamma ray photons are both emitted and absorbed in equal numbers.
Gradually, as temperatures lower, the wavelengths of the emitted radiation gets bigger; X-rays, then UV, then visible light predominate. But there comes a point at which the universe is much less dense, hydrogen atoms have formed and the universe becomes transparent to its own radiation. Emitted light is then no longer absorbed and this light forms the cosmic background radiation.
This transparency happens about 400,000 years after the Big Bang, when the universe has cooled to 3000 K (or about 2700 $^{\circ}$C). The cosmic background is then in the form of red and infrared photons.
The "stretching" to microwave wavelengths occurs after that and is the same redshifting effect we see from distant objects in the universe. In this case, the cosmic background photons we observe on Earth have travelled for 13.7 billion years at the speed of light and in the meantime their wavelengths have been redshifted or stretched by a factor of 1100.
Comment: Thank  you very much for this explaination !


Meaning of Leaky Abstraction?

Question: What does the term "Leaky Abstraction" mean? (Please explain with examples. I often have a hard time grokking a mere theory.)
Comment: You might want to read Joel Spolsky's original article [The Law of Leaky Abstractions](http://www.joelonsoftware.com/articles/LeakyAbstractions.html) which as far as I know is the origin of the term.
Answer: Here's a meatspace example:
Automobiles have abstractions for drivers. In its purest form, there's a steering wheel, accelerator and brake. This abstraction hides a lot of detail about what's under the hood: engine, cams, timing belt, spark plugs, radiator, etc.
The neat thing about this abstraction is that we can replace parts of the implementation with improved parts without retraining the user. Let's say we replace the distributor cap with electronic ignition, and we replace the fixed cam with a variable cam. These changes improve performance but the user still steers with the wheel and uses the pedals to start and stop.
It's actually quite remarkable... a 16 year old or an 80 year old can operate this complicated piece of machinery without really knowing much about how it works inside!
But there are leaks. The transmission is a small leak. In an automatic transmission you can feel the car lose power for a moment as it switches gears, whereas in CVT you feel smooth torque all the way up.
There are bigger leaks, too. If you rev the engine too fast, you may do damage to it. If the engine block is too cold, the car may not start or it may have poor performance. And if you crank the radio, headlights, and AC all at the same time, you'll see your gas mileage go down.
Answer: It simply means that your abstraction exposes some of the implementation details, or that you need to be aware of the implementation details when using the abstraction.  The term is attributed to Joel Spolsky, circa 2002. See the wikipedia article for more information.
A classic example are network libraries that allow you to treat remote files as local.  The developer using this abstraction must be aware that network problems may cause this to fail in ways that local files do not.  You then need to develop code to handle specifically errors outside the abstraction that the network library provides.
Comment: @mehaase I don't see how it matters whether your abstraction is leaky by design or by neglect.  I've expanded the answer with an example and more info from the referenced article so that it can stand on its own.  Further, I don't think that "leaky abstraction" necessarily needs to be a pejorative.  To me it merely describes a situation where you, as a developer, need to be more careful when working with the abstraction.  The design may be good, bad, or indifferent independent of the "leakiness."
Answer: Wikipedia has a pretty good definition for this

A leaky abstraction refers to any implemented abstraction, intended to reduce (or hide) complexity, where the underlying details are not completely hidden

Or in other words for software it's when you can observe implementation details of a feature via limitations or side effects in the program.
A quick example would be C# / VB.Net closures and their inability to capture ref / out parameters.  The reason they cannot be captured is due to an implementation detail of how the lifting process occurs.  This is not to say though that there is a better way of doing this.
Answer: Here's an example familiar to .NET developers: ASP.NET's Page class attempts to hide the details of HTTP operations, particularly the management of form data, so that developers don't have to deal with posted values (because it automatically maps form values to server controls).
But if you wander beyond the most basic usage scenarios the Page abstraction begins to leak and it becomes hard to work with pages unless you understand the class' implementation details.
One common example is dynamically adding controls to a page - the value of dynamically-added controls won't be mapped for you unless you add them at just the right time: before the underlying engine maps the incoming form values to the appropriate controls. When you have to learn that, the abstraction has leaked.
Comment: Webforms had bo bottom in its bucket. Whats worse was that the thinly veiled abstractions amounted to working with Http like you were working in a glove box.
Answer: Well, in a way it is a purely theoretical thing, though not unimportant.
We use abstractions to make things easier to comprehend. I may operate on a string class in some language to hide the fact that I'm dealing with an ordered set of characters that are individual items. I deal with an ordered set of characters to hide the fact that I'm dealing with numbers. I deal with numbers to hide the fact that I'm dealing with 1s and 0s.
A leaky abstraction is one that doesn't hide the details its meant to hide. If call string.Length on a 5-character string in Java or .NET I could get any answer from 5 to 10, because of implementation details where what those languages call characters are really UTF-16 data-points which can represent either 1 or .5 of a character. The abstraction has leaked. Not leaking it though means that finding the length would either require more storage space (to store the real length) or change from being O(1) to O(n) (to work out what the real length is). If I care about the real answer (often you don't really) you need to work on the knowledge of what is really going on.
More debatable cases happen with cases like where a method or property lets you get in at the inner workings, whether they are abstraction leaks, or well-defined ways to move to a lower level of abstraction, can sometimes be a matter people disagree on.
Comment: And you work with 1's and 0's to hide the fact that you're working with electronics and physics (very late comment, I know)
Answer: I'll continue in the vein of giving examples by using RPC.
In the ideal world of RPC, a remote procedure call should look like a local procedure call (or so the story goes).  It should be completely transparent to the programmer such that when they call SomeObject.someFunction() they have no idea if SomeObject (or just someFunction for that matter) are locally stored and executed or remotely stored and executed.  The theory goes that this makes programming simpler.
The reality is different because there's a HUGE difference between making a local function call (even if you're using the world's slowest interpreted language) and:

calling through a proxy object
serializing your parameters
making a network connection (if not already established)
transmitting the data to the remote proxy
having the remote proxy restore the data and call the remote function on your behalf
serializing the return value(s)
transmitting the return values to the local proxy
reassembling the serialized data
returning the response from the remote function

In time alone that's about three orders (or more!) of magnitude difference.  Those three+ orders of magnitude are going to make a huge difference in performance that will make your abstraction of a procedure call leak rather obviously the first time you mistakenly treat an RPC as a real function call.  Further a real function call, barring serious problems in your code, will have very few failure points outside of implementation bugs.  An RPC call has all of the following possible problems that will get slathered on as failure cases over and above what you'd expect from a regular local call:

you might not be able to instantiate your local proxy
you might not be able to instantiate your remote proxy
the proxies may not be able to connect
the parameters you send may not make it intact or at all
the return value the remote sends may not make it intact or at all

So now your RPC call which is "just like a local function call" has a whole buttload of extra failure conditions you don't have to contend with when doing local function calls.  The abstraction has leaked again, even harder.
In the end RPC is a bad abstraction because it leaks like a sieve at every level -- when successful and when failing both.
Comment: Well, this is the only response that actually gives a good example (reading comprehension, folks), so it gets my +1.
Comment: I like the Erlang approach to this better in that it doesn't try to hide the difference between a function call and sending a message to a process to the point that the two use very different syntax.  And a remote process message send is very visibly different from a local process send, albeit using the same general syntax.
Answer: What is abstraction?

Abstraction is a way of simplifying the world.
It means you don't have to worry about what is actually happening under the hood.

Example: Flying a 737/747 is "abstracted" away

Planes are complicated systems: it involves: jet engines, oxygen systems, electrical systems, landing gear systems etc.
...but the pilot doesn't have to worry about it... all of that  is "abstracted away". The only thing a pilot needs to focus on is yoke (i.e. steering wheel of the plane).
He pushes the yoke left to go left, and right to go right etc.

....that is in an ideal world. In reality, flying a plane is much more complicated. Because many details ARE NOT "abstracted away".
Leaky Abstractions in 737 Example
Pilots in reality have to worry about a LOT of things: wind speed, thrust, angles of attack, fuel, altitude, weather problems, angles of descent. Computers can help the pilot in these tasks, but not everything is automated / simplified......not everything is "abstracted away".
e.g. If the pilot pulls up too hard on the column - the plane will obey, but then the plane might stall, and that's really bad.
In other words, it is not enough for the pilot to simply control the steering wheel without knowing anything else.........nooooo.......the pilot must know about the underlying risks and limitations of the plane before the pilot flies one.......the pilot must know how the plane works, and how the plane flies; the pilot must know implementation details..... that pulling up too hard will lead to a stall, or that landing too steeply will destroy the plane etc.
Those things are not abstracted away. A lot of things are abstracted, but not everything. The abstraction is "leaky".
Leaky Abstractions in Code
......it's the same thing in your code. If you don't know the underlying implementation details, then you're gonna have problems.
ORMs abstract a lot of the hassle in dealing with database queries, but if you've ever done something like:
User.all.each do |user|
   puts user.name # let's print each user's name
end

Then you will realise that's a nice way to kill your app. You need to know that calling User.allwith 25 million users is going to spike your memory usage, and is going to cause problems. You need to know some underlying details. The abstraction is leaky.
References:

https://www.joelonsoftware.com/2002/11/11/the-law-of-leaky-abstractions/
Answer: An example in the django ORM many-to-many example:
Notice in the Sample API Usage that you need to .save() the base Article object a1 before you can add Publication objects to the many-to-many attribute.   And notice that updating the many-to-many attribute saves to the underlying database immediately, whereas updating a singular attribute is not reflected in the db until the .save() is called.
The abstraction is that we are working with an object graph, where single-value attributes and mult-value attributes are just attributes.   But the implementation as a relational database backed data store leaks... as the integrity system of the RDBS appears through the thin veneer of an object interface.
Answer: The fact that at some point, which will guided by your scale and execution, you will be needed to get familiar with the implementation details of your abstraction framework in order to understand why it behave that way it behave.
For example, consider this SQL query:
SELECT id, first_name, last_name, age, subject FROM student_details;

And its alternative:
SELECT * FROM student_details;

Now, they do look like a logically equivalent solutions, but the performance of the first one is better due the individual column names specification.
It's a trivial example but eventually it comes back to Joel Spolsky quote:

All non-trivial abstractions, to some degree, are leaky.

At some point, when you will reach a certain scale in your operation, you will want to optimize the way your DB (SQL) works. To do it, you will need to know the way relational databases works. It was abstracted to you in the beginning, but it's leaky. You need to learn it at some point.
Answer: Assume, we have the following code in a library:
Object[] fetchDeviceColorAndModel(String serialNumberOfDevice)
{
    //fetch Device Color and Device Model from DB.
    //create new Object[] and set 0th field with color and 1st field with model value.
}

When the consumer calls the API, they get an Object[]. The consumer has to understand that the first field of the object array has color value and second field is the model value. Here the abstraction has leaked from library to the consumer code.
One of the solutions is to return an object which encapsulates Model and Color of the Device. The consumer can call that object to get the model and color value.
DeviceColorAndModel fetchDeviceColorAndModel(String serialNumberOfTheDevice)
{
    //fetch Device Color and Device Model from DB.
    return new DeviceColorAndModel(color, model);
}

Answer: Leaky abstraction is all about encapsulating state. very simple example of leaky abstraction:
$currentTime = new DateTime();

$bankAccount1->setLastRefresh($currentTime);
$bankAccount2->setLastRefresh($currentTime);
$currentTime->setTimestamp($aTimestamp);

class BankAccount {
    // ...

    public function setLastRefresh(DateTimeImmutable $lastRefresh)
    {
        $this->lastRefresh = $lastRefresh;
    } }

and the right way(not leaky abstraction):
class BankAccount
{
    // ...

    public function setLastRefresh(DateTime $lastRefresh)
    {
        $this->lastRefresh = clone $lastRefresh;
    }
}

more description here.

Meaning of Leaky Abstraction?


What are these "fence-posts" with Kanji on them in Samurai Champloo?

Question: During episode 2 of Samurai Champloo, Mugen's walking through some wooden posts with kanji on them. What are they? I can't imagine they're grave-stones or something, since they're all bunched in a row like a fence. If it matters, the anime is set in the Edo period-ish, roughly in the 1840s.
Answer: It is called 卒塔婆(sotoba) and seen commonly in Japanese cemeteries. They are normally placed at the back of grave stones like the following (source):

Usually some matra or names of people buried there are written on them.
Apparently the ones similar to the picture you posted can be found in a Japanese temple, but most probably it's unique to this temple (or at least it's rare; I've never seen things like this).
source (also mentioned in the Wikipedia article above):


daemon process killed automatically

Question: Recently I run a below command to start daemon process which runs once in a three days.
RAILS_ENV=production lib/daemons/mailer_ctl start, which was working but when I came back after a week and found that process was killed.
Is this normal or not?
Thanks in advance.
Answer: Nope. As far as I understand it, this daemon is supposed to run until you kill it. The idea is for it to work at regular intevals, right? So the daemon is supposed to wake up, do its work, then go back to sleep until needed. So if it was killed, that's not normal.
The question is why was it killed and what can you do about it. The first question is one of the toughest ones to answer when debugging detached processes. Unless your daemon leaves some clues in the logs, you may have trouble finding out when and why it terminated. If you look through your logs (and if you're lucky) there may be some clues -- I'd start right around the time when you suspect it last ran and look at your Rails production.log, any log file the daemon may create but also at the system logs.
Let's assume for a moment that you never can figure out what happened to this daemon. What to do about it becomes an interesting question. The first step is: Log as much as you can without making the logs too bulky or impacting performance. At a minimum log wakeup, processing, and completion events, as well as trapping signals and logging them. Best to log to somewhere other than the Rails production.log. You may also want to run the daemon at a shorter interval than 3 days until you are certain it is stable.
Look into using a process monitoring tool like monit (http://mmonit.com/monit/) or god (http://god.rubyforge.org/). These tools can "watch" the status of daemons and if they are not running can automatically start them. You still need to figure out why they are being killed, but at least you have some safety net.
Comment: Thanks for the directions. I went through the log file.

daemon process killed automatically


Click Event in CKEditor5 Toolbar

Question: I found some information on CKEditor4 on trapping a clicked tool on the CKEditor toolbar but the v5 rewrite means this no longer works:
editor.on('afterCommandExec', handleAfterCommandExec);
function handleAfterCommandExec(event)
{
var commandName = event.data.name;
// For 'bold' commmand
if (commandName == 'bold')
alert("Bold button pressed!");
}

Are there any examples of working CKEditor 5 code to detect when a tool has been clicked? I'm actually trying to trap when someone clicks Track Changes to show the changes sidebar but hide it otherwise.
Answer: Maybe this works

const command = editor.commands.get('bold')

      command.on('execute', () => {
        console.log('Bold has been executed')
      })

Click Event in CKEditor5 Toolbar