Why couldn't Pepper put the electromagnet back into Tony's chest?

Question: Why couldn't Pepper put the electromagnet back into Tony's chest? Was it because it was contaminated?

Click to view a YouTube video of the scene.
Answer: The new unit appears to be a complete upgraded replacement for the old unit including the electromagnet that was at the end of the old one.

Tony Stark: This is what will be keeping me alive for the foreseeable future. I'm swapping it up for an upgraded unit.
Iron Man

The novelisation of the first two Iron Man films, Phase One: Iron Man, has a bit more detail on the matter here:

"That's the thing that was keeping me alive," he said. "It's now an antique. This is what will be keeping me alive for the foreseeable future." He held up a similar device that looked much more high-tech and powerful.
"Amazing," she said.
"I'm going to swap them out and switch all functions to the new unit," Tony said
Phase One: Iron Man

The last line is particularly telling, "all functions" which would presumably also include the electromagnet. Remember Tony/Yinsen built the first one in a cave with rudimentary tools. The new one was built by J.A.R.V.I.S. with the most high tech and up to date tools so was always going to be smaller and more efficient.
So she couldn't put it back in because Tony is just messing with her, he didn't want her to put it back in because she didn't need to, the new device was taking over completely from the old one.
Answer: It seems likely that Tony's intention was always to remove the old chestpiece including the crude electromagnet. The fact that he doesn't replace it strongly suggests that new magnet is much smaller and built directly into the new chestpiece (or the wire that extends into the cavity).
As to why he made such a big deal out of her pulling it out, it's because he's messing with her, telling her to do things, then making out that it's not what he intended. He already pulled the same joke a few seconds earlier when he's talking about Operation (pretending that she'd shocked him). He's trying to keep the situation light and stop her from panicking.
Comment: Oh but when Obadiah stole the arc reactor I thought he took out the electromagnet so has do it work
Comment: But is asked why couldn't  she put it back
Comment: @Debbie - Because he told her not to. The entire assembly had to be removed so he could put his new reactor into his chest cavity.
Comment: Valorum oh I see.
Comment: I dont agree with you because if Tony was just messing around, why would the screen behind him go off?


How can you tell if a note is major or minor?

Question: People always say stuff like minor sixth, and I get that they mean the sixth note from the root but how do you know if that note is minor or major exactly?
Comment: @user207421 the misunderstanding you're complaining about is the very basis for the question.  Rephrasing the question as you suggest would make the answers meaningless.
Comment: I wonder if this is less confusing in languages where intervals have their own separate words that are different from regular numbers, and with alternative words for major/minor, for example in German, "Dur-Terz", "Moll-Terz".
Comment: @piiperiReinstateMonica why would *moll* and *dur* be less confusing than *major* or *minor?*
Comment: @phoog Because the words have different connotations, particularly not "smaller" and "larger"?
Comment: A note isn't minor or major, but an interval is. Please rephrase your question.
Comment: @piiperiReinstateMonica I'm not aware of any different connotation.  But if they connote "hard" and "soft" for anyone then that person's knowledge of etymology or Latin is sufficient for *Terz* and the like to connote *3* and so on.
Comment: @phoog https://de.wikipedia.org/wiki/Moll If you hear the word "Moll" even by itself, you can be pretty sure the subject is music, and maybe you even think of a melancholic song. But in English there is major confusion even among minors, said an army major in a minor city. Different connotations. And does anyone use the word "Terz" for everyday numerals? https://de.wikipedia.org/wiki/Terz
Comment: @piiperiReinstateMonica thanks for explaining.  I understand now.  It's not that *moll* has other connotations, but rather that it doesn't, while *minor* does.  Of course nobody uses the word Terz for everyday numerals, but most well educated people will I presume recognize the numerical roots -- and meanings -- of Prime, Sekunde, Terz, Quarte, Quinte, Sexte, Septime and so forth.
Comment: @user207421 on the other hand, it is possible that Jinxed *doesn't* suffer from this apparent misunderstanding, but just worded the question poorly (for example, this could be expected from someone who hasn't yet learned the word "interval").  Even in that case, it would be better to ask the question anew rather than to edit this question, so the answers to this question continue to make sense.
Comment: @piiperiReinstateMonica at least it seems to me that the numerical meanings of *Terz* etc. are more obvious than the hardness meanings of *moll* and *dur.*  I suspect that the same is true for native speakers of German, but I am not certain.
Answer: You have probably mixed up several different meanings and contexts for the words. When someone says "major sixth", they're not necessarily talking about chords at all, so there might not be any "root" to begin with.
A note is not minor or major, but the interval between a note and some other note can be minor or major. (or a few other things as well)
https://en.wikipedia.org/wiki/Interval_(music)
People use intervals when they talk about e.g. melodies or chords. For example in a melody with notes C - E - G - A, first there's a major third jump from C to E, then there's a minor third jump from E to G, and then a major second from G to A. But if there's a jump from C to A, it's a major sixth. The A note isn't anything by itself, the interval is formed when you compare it to some other note. An interval is the distance between two pitches.
In chord names, the intervals in question are from the root to other chord tones. The most important interval and chord tone is the third, and that's where a chord's primary name comes from. The chord symbol "C" means "C major" (notes C - E - G) - and "major" there means that the chord's third is a major third, and that interval is between root C and E. Some other examples: in a chord called "C maj7" there's an added B note, giving C - E - G - B as the chord tones, and the interval between the root C and the B is a major seventh, "maj7". But in a chord called "C7" the seventh is a minor seventh, giving chord tones C - E - G - B♭.
You have to pay attention to the context where these numbers are used - someone might say for example that a chord's second note is its third, and you can add a seventh as the fourth note. ;) In the second inversion the fifth is the first note. "Got that?!" The same words have been re-used for many different meanings, but you'll learn to identify the different contexts by making music and talking about it with people. It takes more than a second though.
Ok, so when is an interval major or minor?
Your actual question might be "how to know whether the interval between two notes is major or minor (or perfect, augmented or diminished)". Or since you talk about a root, maybe you mean the specific interval between a chord's root note and a chord tone. Anyway:
Referring to intervals like "fourth" or "sixth" etc. assumes the existence of a scale (and more precisely, a diatonic scale) that's used as reference for counting steps. In the following we use the C major scale, which is conveniently represented by the white keys of the piano:

There are two different kinds of thirds, which are intervals spanning three scale notes (i.e. white keys). The one between C and E is a major third, because it is a bigger jump than the one from D to F, which is a minor third. How is it bigger? From C to E the distance is four semitones or four half-steps, because there's a black key between C and D, and between D and E. From C to E the half-step jumps are: C(0), C#(1), D(2), D#(3), E(4). But there is no black key between E and F, so that's only three semitones: D(0), D#(1), E(2), F(3).
Similarly for the sixths. The jump from E up to C (spanning six white keys, thus a sixth) is 8 semitones, but the jump from F up to D is 9 semitones. That's why E-C is a minor 6th, but F-D is a major 6th. The major 6th is a bigger jump in pitch, even though it's equally many white keys i.e. scale notes.
However, fourths and fifths are not called major or minor, they're either perfect, augmented or diminished. More on that subject elsewhere.
For other scales and keys, you can't use the piano's white keys as directly as with C major (or A minor), but the principle is the same, you just have to imagine the scale notes and whether the scale steps are whole-steps or half-steps.
For example in the D major scale, the scale notes are just distributed a bit differently between the black and white ... or should I say, wider and narrower piano keys.

Talking about a "third" etc. implicitly assumes the existence of such a diatonic scale.
Comment: The minor 7th is not called a dominant 7th. The dominant 7th is a major chord with a minor 7th that's naturally built of the dominant scale degree.
Comment: @LaurencePayne Ah ok, yes, it's important to understand that all of this is really only conventions used in a particular culture with a long history. People coming from outside the culture seem to expect some kind of a consistent, designed set of rules.
Comment: a major triad chord with an added minor seventh, is called a dominant seventh chord
Comment: @Dom - That dominant chord has also been called **major minor seventh**, as opposed to a different chord **minor major seventh**. Which, actually, sums it up quite well. But most of us just call it **dominant**.
Comment: Intervals don't have to be calculated from the 'root'. Just from the lower note - which may or may not be the 'root'. A chord's name doesn't always reflect the interval found within it. Consider Cm6.
Comment: You could add more! It's already streets ahead with votes!
Comment: C7 could be called 'C major minor 7th'.    Cm6 could be called 'C minor major 6th'.  But we use 'C7' and 'Cm6'.   It's a naming convention, not deep analysis.
Comment: @piiperi Reinstate Monica Did you even mention the m6 chord?  I was referring to Tim's comment.
Comment: @Tim an interval may be calculated from the lower note or the upper note.  The identity of the interval does not depend on the direction by which it is reckoned.  C4 is a major sixth below A4, just as A4 is a major sixth above C4.
Comment: @phoog - of course, that's why I said it's easier. Counting forwards is generally easier than counting backwards.
Answer: First off, no note can be major or minor in itself. In context, of course, but not in isolation.
It's intervals that can be called major and/or minor. An interval is the space between two specific notes. Well that's half the story! To specify any interval also needs the names of those notes.
'Major' and 'minor' in these circumstances refer to larger (major) and smaller (minor).
There are some intervals which are neither major nor minor. Namely the perfect intervals - P4, P5 and P8.Which will become diminished if smaller and augmented if larger (by a semitone). But they're still never m or M.
The others - 2, 3, 6, and 7 can be either major or minor. Or augmented or diminished - but that's for another day.
Major 2 (M2) consists of consecutive letter names, and a space of 2 semitones between them. C>D. changing that to C>D♭, it becomes m2.
Major 3 (M3) consists of notes with a letter name between them missing, and a space of 4 semitones. C>E. changing that to C>E♭, it becomes m3.
Major 6 (M6) consists of notes 6 letters away, and a space of 9 semitones - C>A. changing that to C>A♭, it becomes m6.
Major 7 (M7) has notes 7 steps away, and a space of 11 semitones. C>B. changing that to C>B♭, it becomes m7.
I hoped this would be an easy , uncomplicated answer - not so. Returning to M3: just having two letter names with a single letter between them missing. Like D>F. O.k., missing E. BUT - there's not 4 semitones. So, it's already m3. To become M3, either the D goes down to D♭, or the F goes up to F♯.
It's easier counting up from a lower note, and from what's here, the number of semitones counted is important. As John states, each interval has its own inverse. The 'rule of nine' applies. Maj become min, dim become aug, and vice versa. E.g. C>E =M3. E>C =m6. C>B = M7. B>C = m2.
Warning: any interval is reliant on what the notes are actually called - or what key they reside in. C>E♭ is m3. C>D♯ is augmented 2 (aug2, +2). They may well sound the same, and be played identically on a piano, but they are NOT the same in name!
Also note that notes named in intervals do not necessarily reflect their key status. Stupid, but true (sometimes). M2 (from the root) is found in both major and minor keys! M6 and M7 (from the root) can also be found in minor keys!
Comment: The fourth and fifth paragraphs taken together imply that fourths, fifths, and octaves cannot be diminished or augmented, which (as I am fairly sure you know) is not correct.
Comment: @phoog 4th para clarified, 5th is as is. Thanks. Hope that's good now. I'm more pedantic than...most.
Comment: Yes.  It's hard to find the right balance.  Covering all the bases can result in answers that are too dense with information to be useful.
Comment: This should be the correct answer. Major and minor only have meaning in relation to context (other notes). Perhaps just a personal preference, but I treat notes as a form of stream input/output. As a result of this (highly computerized) interpretation, I don't even use major or minor scales while composing - since everything's an input or output stream with individual "bytes" (notes).
Answer: @piiperi_Reinstate_Monica has provided you a good answer and resources. I would like to add a bit of information that hopefully you will find useful as well.
Because you mentioned "from the root", in your question I want to point out that an interval is simply the distance between ANY two notes, not necessarily a root and a chord or scale tone. Intervals are units of measurement, just like lines on a ruler. Think of each line on a ruler as one half step and 12 lines or half steps equals one octave. The system of naming intervals is different than simple counting because intervals are named based on 7 scale tones and not on 12 half steps and is as so:
number of half steps/basic interval name
1=m2
2=M2
3=m3
4=M3
5=P4
6= aug4/dim5
7=P5
8=m6
9=M6
10=m7
11=M7
12=P8
Regarding your example question of 6ths, a minor 6th (m6) is 8 half steps, (say C up to Ab) and a major 6th (M6) is 9 half steps (C up to A).
Intervals can be measured either upward or downward so a 5th up, (say C up to G) is different from a 5th down (C down to F). Lastly every interval has its inverse to get to the same note in the opposite direction. For example to go from C up to B is a M7 but C down to B is a m2. every other interval has its own equivalent, i.e. M2/m7, m3/M6, etc.
My intention for this answer is to help you conceptualize the concept of intervals a little better, I hope it's useful to you. A good first step is to memorize and learn the sounds of all the intervals within an octave and be able to play them on your instrument starting on different notes and in different directions.
Comment: The analogy  'just like lines on a ruler' isn't sitting too well! Unless it's a ruler with inches *and* millimetres! All intervals have at least two names, and by merely listening to any interval, it's imossible to state what it is. Dim 5 or aug 4? Who knows? Can't come up with a better analogy though, sorry!
Comment: @Tim my analogy was simply to help show what an interval is at its most basic level, the distance between two notes. Of course you are right that they can have more than one name but the naming of the intervals depends on the context. And for the record I'm a big fan of those rulers with both inches and millimeters!
Comment: The analogy is useful, although imperfect as noted by @Tim.  Another problem with the analogy is that counting works a bit differently with intervals, so the results are off by one: the ruler starts at zero, but the unison corresponds to *1.*  The distance between the marks *4* and *6* on a ruler is *2,* but the distance between a fourth and a sixth is a *third.*  I am not sure how much this answer would be improved by mentioning these specifics, but it should perhaps at least contain a disclaimer that people learning about the interval system shouldn't try to pursue the analogy too strictly.
Comment: How about numbering people in a queue? A familiar, time occupying concept at the moment! 1st in queue is number 1. (Although the other day, I was told on the phone, waiting in the queue for the doctor's receptionist, that  I was zero in the queue...and still waited). Crazy times!
Comment: @Tim I suppose the queuing software was written by one of those pretentious computer programmers who believes that counting a set from zero is somehow useful.  If there are three people in such a queue, they would be counted as numbers zero, one, and two.  The size of the queue is calculated by adding one to the number associated with its last member.  I'm a computer programmer, too, and I find this baffling and vexing.
Comment: @phoog - there are many, many folk out there fresh from uni who know it all. Until the real world hits them...
Comment: Since there has been such an uproar about my analogy of intervals and the lines on a ruler and many have read things into my comparison that simply were not there I have decided to edit my answer to clarify my point.
Answer: How to name an interval.  Listen carefully.  This isn't about WHY, just about HOW.

Count letter names for the basic interval - 2nd, 3rd, 4th whatever.

Then imagine a major scale starting on the lower note. If the upper
note is in that scale, it's a major interval. (Except Unisons, 4ths
and 5ths which are called Perfect.)
Example: D♭ to A♭.   Five letters, D, E, F, G, A so it's a
5th.  Fifth note of D♭ major scale is A♭.  Good, it's a
major 5th.  Hold on - its a 5th, so call it a Perfect 5th.
If the upper note is a semitone too low to fit, it's a minor
interval. (Except Unisons, 4ths and 5ths which are called
Diminished.)
Example: G♯ to B.  Three letters, G, A, B so it's a 3rd.  Third
note of G♯ major scale is B♯.  Whoops, our B is a semitone
under that, so it's minor.

[I'll leave Augmented intervals, and a full discussion of Diminished intervals for now.]
For some reason, this simple, time-honoured textbook method will be attacked.  I really don't understand why.  It fits well with the (excellent) 'first know your scales' mantra of both classical and jazz harmony. It doesn't suggest in any way that all the intervals in a minor scale are minor, or suggest anything else misleading.  It's just a simple, foolproof method of naming intervals.   Remember, intervals are independent of harmonic context - F♯ to A is a minor 3rd whether it's part of the tonic chord of F♯ minor, the tonic chord of D major, the dominant 7th of E major, a D♯ diminished triad, a Gmaj9 chord...  Or it might be a linear melodic interval, not part of a chord at all.  Imagine having to rote-learn all of those as separate instances!
Comment: +1 for perseverance! :D But I find this method slightly unintuitive, because harmonically I should be thinking about the actual scale I'm using, not some unrelated major scale. For example if I'm thinking about stuff over D major scale, what's F# - A ... thinking about an F# major scale doesn't help. Instead, I should know that both notes are on my diatonic scale, and it's a minor third between scale notes 3 and 5. I don't say your method isn't useful, I just can't imagine a situation where I'd have to give scale-based interval names for arbitrary note pairs without having a scale context.
Comment: If you REALLY know your scales, it's such an easy method!  And surely the point is that F# to A is a minor 3rd, whatever the harmonic context.
Answer: A note all by itself has no particular character, it is just a frequency.  The term minor 6th, as you pointed out in your own question, is really describing an interval, the distance in frequency between two notes.
There are some basic naming conventions that go back a long way historically.  To understand the names you need to know that they are made in reference to the major scale.  This is the starting point for our vocabulary.
Relative to the root not, Do, of the major scale every other note defines an interval.
Do --> Do is called a Unison (not much of an interval)
Do --> Re is a Major Second
Do --> Mi is a Major Third
Do --> Fa is a Perfect Fourth
Do --> Sol is a Perfect Fifth
Do --> La is a Major Sixth
Do --> Ti is a Major Seventh
Do --> Do is an Octave
Notice that the 4th and 5th are referred to as perfect whereas the others are "major".  In this context is might seem like the individual notes are being called "major" but it is really the interval from Do that has this designation.  Without reference to a key it makes no sense to call A and major or minor note.  Only relative to C is it the Major 6th.  Relative to G it is a Major second.  It is the relationship between a pair of notes that distinguishes major from minor.
Traditionally, the naming convention for intervals uses the lower pitch not as a reference.  So the interval describes an increase in frequency.  Not all people follow this convention today but this is the way it's taught in classical theory texts.  So we sometimes say that A is the major sixth of C, or the interval from C to A is a major 6th.  If you started on A and walked up to C we would have a minor third!
When the a major interval is made flat by a half step it is called minor.  When a perfect is flattened it is called diminished.  So you will never hear of a minor 5th, but a diminished 5th.  Augmenting an interval refers to making the top note sharp by a half step.  You can also diminish a minor interval.
That being said, one way to tell if a given note is "major" or "minor" relative to another is to ask if the note in question is on the major scale of the note it is being compared to.  If so then it's major (or perfect) otherwise ask if it is flat or sharp.  There are other naming conventions.  Specifically the intervals follow a strict pattern using the alphabet.  A B C D E F G A B C... etc.  For example F is the 4th of C and an the note pair {C, Fb} would be a diminished fourth even though the Fb is enharmonic to E (in 12TET) which is the Major third of C.  The note pair {C, E} is a major third while the pair {C, Fb} is strictly speaking a diminished 4th.  You need to respect this naming convention when figuring out the proper interval name of a note pair.
In modern 12TET tuning we have the chromatic scale which divides the octave into 12 half steps.  We typically think of intervals in terms of the number of half steps separating the two notes.  This is very convenient as it eliminates the need to have a reference key, which is unnecessary.  In this context the intervals and the number of half steps are as follows.
Minor 2nd = 1 half step
Major 2nd = 2 half steps
Minor 3rd = 3 half steps = augmented 2nd
Major 3nd = 4 half steps
Perfect 4th = 5 half steps
Diminished 5th = 6 half steps = augmented 4th
Perfect 5nd = 7 half steps
Minor 6th = 8 half steps = augmented 5th
Major 6th = 9 half steps
Minor 7th = 10 half steps = augmented 6th
Major 7th = 11 half steps
Octave = 12 half steps
These are all distances between a pair of notes and in this case the bottom note would be the unison.  This convention makes it easy to identify intervals between any pair of notes.  For example from B to D there are 3 half steps so this is either a minor third or an augmented 2nd.  Since the letter names indicate a third (i.e. C is skipped) it would be a minor 3rd.  In the key of B major the 3rd is D#, flattening this would give you a D natural.  You get the same result.  But using the half steps it doesn't really matter if this is Ti to Re in the key of C or La to Do in the key of D.  They are the same interval regardless.
Answer: A note itself can't be "major" or "minor" or "diminished" or etc. Those terms are relative, meaning that they must be in comparison to something else. No note is intrinsically any of the aforementioned qualities.
Now, if you know what the relative note is, then it becomes much more simple and formulaic. A minor interval is simply a half step down from its respective major interval, which are the following.
M2 = 2 Half Steps (HS)
M3 = 4 HS
P4 = 5 HS
P5 = 7 HS
M6 = 9 HS
M7 = 11HS
P8 = 12 HS (Octave)
Seeing this, all we have to do is take away a half step to get the relative minor interval. There are a few exceptions, being that in the cases of the intervals with a "P", meaning "perfect", they don't have minor intervals. When you move a perfect interval a half step down, they become diminished.
For example, a minor second would be 1 half step, while a minor seventh would be 10 half steps. Keep in mind that the names of the notes are very important. From C sharp to E double sharp tallies up to 5 half steps, which may appear to be a P4 interval, but is supposed to be an A3 interval, since C and E are three whole steps apart (According to the bureaucrats at the MTAC, anyways).
As a disclaimer, my knowledge of music theory is rather provincial so I'd take my answer with a few grains of salt.


Relationship of RNA-binding proteins to peptidyl-prolyl cis-trans isomerase

Question: I am studying a Plasmodium gene, known to encode an RNA-binding protein. However a BLAST search brings up mainly peptidyl-prolyl cis-trans isomerases from other species. Why would this be so?
Comment: Welcome to SE Biology. Please complete the [Tour](https://biology.stackexchange.com/tour) to find out how this site works. Also read about [how to ask questions](https://biology.stackexchange.com/help/how-to-ask). It is unclear whether you want are appealing for someone to do your work for you (definitely not the purpose of this site) or information on how to go about it. Assuming the latter, it is impossible to help you without knowing what your gene is. If your Blast search is bringing up PPIs, then I would imagine your gene is a PPI. Show us the sequence comparison, not the tree.
Comment: It's looking an interesting question. Can you kindly add bit more details?
Comment: I have edited your question to correspond to what I think your problem is and have provided an answer. If you disagree, you can revert the question but you would need to clarify it. I hope I have not inadvertently answered an assignment rather than a real research problem. If this was a real research problem, you would be advised to believe the evidence of your own analysis in future, and do some research on what they bring up.
Answer: Without seeing the sequence of the RNA-binding protein it is impossible to be sure, but the obvious conclusion is:

The RNA-binding protein is a peptidyl-prolyl cis-trans isomerase.

It has been known since 1989 that peptidyl-prolyl cis-trans isomerase is a multiple-function protein, also exhibiting properties of the cyclophilins, proteins which bind cyclosporin A. The post raised the possibility that it may have other activities and a literature search reveals several more recent papers that indicate cylcophilin A can bind certain RNAs. I list some of the titles:
A nuclear RNA-binding cyclophilin in human T cells (1996) FEBS Letters 398 201–205
Molecular cloning, structure and expression of a novel nuclear RNA-binding cyclophilin-like gene (PPIL4) from human fetal brain (2001) Cytogenet Cell Genet 95 43–47
Cyclophilin A Binds to the Viral RNA and Replication Proteins, Resulting in Inhibition of Tombusviral Replicase Assembly (2013) J. Virol. 87 13330–13342
Structure of RNA-interacting Cyclophilin A-like protein from Piriformospora indica that provides salinity-stress tolerance in plants (2013) Scientific Reports 3 : 3001, DOI: 10.1038/srep03001


Jmeter Test Summary out put showing for individual Thread Group though the same functionalities passed in each

Question: I have used BZM Cuncurrency Users Thread Group.
I have noticed the Jmeter Test Summary out put showing for individual Thread Group though the same functionalities passed in each thread.
50 Concurrency users with total 5 thread group, each thread group got same values were passed but results shows individually has showed in the screenshot (For ThreadGroup-1, ThreadGroup-2.......).
but sometimes it's given singe report though there is 5 or 10 ThreadGroups
Looking forward your help get resolution on the same

Correct output:

Incorrect Out put as follows:
Answer: Never run your load test using JMeter GUI, GUI mode is for tests development and/or debugging, once you finish test development and verify that it works fine with 1-2 virtual users/iterations using View Results Tree listener to inspect request/response details you should be running JMeter tests using command-line non-GUI mode like:
jmeter -n -t /path/to/your/test.jmx -l /path/to/test/results.jtl

Also don't forget to disable or even delete all the Listeners from your test plan, the Listeners don't add any value and only consume resources.
Once your test is finished you can open the results.jtl file with the Listener of your choice or generate HTML Reporting Dashboard.
Comment: Thank you for your response, let me try the above and get back to you.


Differential equation $y'' - y + 2\sin(x)=0$

Question: I need help and explanation with this differential equation. Actually I really don't know how to solve just this type of equations. So the problem: $$y'' - y + 2\sin(x)=0$$
In my opinion first of all we solve homogeneous equation $y''-y=0$ and the solution of this is $y=c_1e^x+c_2e^{-x}$. And after that to solve it with $2\sin(x)$. From this point I need help.
Comment: Have you heard of the method of variation of parameters?
Comment: Yes, I heard about this method. But I miss it at uni and now don't understand it. @KaviRamaMurthy
Comment: The idea is to pretend that $c_1$ and $c_2$ are functions, plugin $y=c_1e^{x}+c_2e^{-x}$ in to the given equation and try to get a first order DE.
Comment: See http://www.sosmath.com/diffeq/second/variation/variation.html
Answer: In this case there is a simple answer. You can just guess that $\sin\, x$ is a a particular solution so the general solution is $c_1e^{x}+c_2e^{-x}+\sin\, x$. In general you have to use the method of variation of parameters. (A search on Wikipedia will be useful).
Answer: Let $u=y+k\sin x$. Then $u''=y''-k\sin x$.
So, $y''-y+2\sin x=u''+k\sin x-u+k\sin x+2\sin x=0$
In particular, if $k=-1$, then $u''-u=0$.
Answer: The given differential equation is
$y'' - y + 2\sin\ x=0$
$\implies y'' - y =- 2\sin x \implies (D^2 -1)y=- 2\sin x$
where $D \equiv \frac{d}{dx} $
I think you have an idea about how to find the Complementary Function (i.e., C.F.), (for your case, which is nothing but the solution of the homogeneous differential equation $y'' - y =0$).
Here C.F. is $c_1e^{x}+c_2e^{-x}$.
Now for the Particular Integral (i.e., P.I.) there are some general rules

If $f(D)$ can be expressed as $\phi(D^2)$ and $\phi(-a^2)\neq 0$, then
$1.$ $\frac{1}{f(D)} \sin ax=\frac{1}{\phi(D^2)} \sin ax = \frac{1}{\phi(-a^2)} \sin ax$
$2.$ $\frac{1}{f(D)} \cos ax=\frac{1}{\phi(D^2)} \cos ax = \frac{1}{\phi(-a^2)} \cos ax$
Note: If $f(D)$ can be expressed as $\phi(D^2)=D^2+a^2$, then $\phi(-a^2)= 0$.
$1.$ $\frac{1}{f(D)} \sin ax =\frac{1}{\phi(D^2)} \sin ax=x\frac{1}{\phi'(D^2)} \sin ax= x \frac{1}{2D} \sin ax= -\frac{x}{2a} \cos ax$.
$2.$ $\frac{1}{f(D)} \cos ax =\frac{1}{\phi(D^2)} \cos ax=x\frac{1}{\phi'(D^2)} \cos ax=  x \frac{1}{2D} \cos ax= \frac{x}{2a} \sin ax$.
where $\phi'(D^2)\equiv\frac{d}{dD}\phi(D^2)$

So for your problem, P.I. is $\frac{1}{D^2 -1}  (-2\sin x)=-2[\frac{1}{-1^2 -1} \sin x]= \sin x$
Hence the general solution is $y=$ C.F. $+$ P.I. $ = c_1e^{x}+c_2e^{-x}+\sin\, x$
Answer: Hint:
You can use that $\sin x\propto e^{ix}-e^{-ix},$ and for any function $y=ae^{bx}$,
$$y''-y=a(b^2-1)e^{bx}.$$


How to Connect iPad to ubuntu 12.04 via Wifi or Cable (without jailbreak)

Question: My laptop's OS is Ubuntu 12.04 and I bought an iPad, I want to transfer files (movies or reading materials) to and from my iPad. I tried some works on the Internet but they didn't work so if anybody can help me in a straight way I appreciate that.
Answer: FileApp from the iPad app store works with ftp over wifi to upload stuff from a laptop to the iPad.
Comment: The device appears in the network after sharing file access on the app, but It is not possible to transfer data to it, even though I am logged in, I get `could not access - no permission` If I try to copy a folder from my ubuntu to the ipad via terminal. It works via the GUI if I open the folder though.
Answer: The only way you are going to do this successfully would be to jailbreak your iPad. Then use what is called OpenSSH to transfer the files.

Jailbreak (Redsn0w)
OpenSSH (Cydia)(iPad)
OpenSSH Client (Ubuntu Software Center)

Just google the instructions for each it is pretty easy.
If you don't want to jailbreak you can try running WINE to install iTunes onto Ubuntu.
Heres a reference
http://ipod.about.com/od/advanceditunesuse/f/Downloading-Itunes-For-Linux.htm
Answer: If you plug your ipad in your Ubuntu machine USB, you can access it directly from nautilus. It appears on the left panel (same place as USB drives). If using xubuntu, you can use Thunar (at least on Xubuntu 13.10, tested with iPad Air) or Gigolo - the remote system connection manager but Nautilus works too if you have it installed. You can also use ifuse to mount in the filesystem hierarchy.
If you need to use iTunes for backups, easy sync or upgrades without jailbreaking, I would recomend installing virtualbox and a win XP or 7 in it. I have it working perfectly in a XP virtualbox machine. You need to install Virtualbox Guest Additions and Virtualbox Extensions to use USB in guest machine.
Anyways, new pictures or files created on the iPad can be retrieved easily using the direct USB connection.
Answer: I have set up Apache on my machine.
sudo apt-get update
sudo apt-get install apache2

Created a sub-folder within the /var/www/ and changed the folder permission to username.
sudo mkdir /var/www/myfiles
sudo chown uname /var/www/myfiles

Now I put whatever material I want to transfer in that sub directory.
From your ipad browser access,
(localip)/myfiles

To get localip
ifconfig

All your files will be listed. Click on file you wan't to access. Ipad will open accordingly ask you to open the file in relevant application.(eg. pdf in ibook, mobi in kindle).
Comment: But how to put data on the ipad from ubuntu?
Answer: On Ubuntu 14.04 LTS (minor corrections from procedure above)
Set up Apache on linux machine.
sudo apt-get update
sudo apt-get install apache2

Create a sub-folder within the /var/www/html and changed the folder permission to rxw.
sudo mkdir /var/www/html/myfiles
sudo chmod 777 /var/www/html/myfiles

Move the files to seen from iPad to the myfiles folder. Apache does not follow symlink, so hard copy with cp is required.
Get localip from linux machine
ifconfig

(typically look for something like 192.168.1.xx)
From ipad browser (Safari works) access,
(localip)/myfiles

(http://192.168.1.xx/myfiles with the example above)
Answer: Ubuntu 16.04.3 LTS user.
The set up for 14.04 LTS is fine.
On the Ipad install FileExplorer from the store (free).
Add the linux ip to the connections.
Linux username and password are asked for.
You can now manage files, like safe pictures.
Comment: This sounds incomplete. Ubuntu doesn't share files over the network unless you install and configure some network services first. -1
Comment: You can use a windows workgroup for sharing files. I use Samba to work in Ubuntu with the workgroup.


Reference input current value for TL1431CL5T voltage reference

Question: There appear to be some mismatch for Iref value between the table and the graph for part TL1431CL5T. In the table it specifies the maximum value as 3uA where as in the graph it specifies as 1.7uA at -40C and 1.6uA at -20C. Can anyone please explain why the values between the table and the graph are different?.
Many Thanks!
Answer: The graphs in datasheets, almost invariably, are representative of a typical device, not the maximum or minimum limits, unless they say otherwise. Most of these graphs are generated by actual measurements of randomly selected devices, and as such they give you an idea of how the typical device will perform.
The tables, on the other hand, are the guaranteed values. The manufacturer guarantees that the device will have an input current of less than 3 μA. The graphs don't guarantee anything--they just give you an idea of what behaviour to expect.
Answer: You have to recognize the difference between the typical values in a datasheet and the minimum and maximum values. The typical values are what you would measure in most of the parts and generally at room temperature. The minimum and maximum values are the guaranteed values that no part would exceed. In this case, the typical reference current is 1.5 ua as shown in the table at room temperature. The maximum value is 2.5 ua with no minimum specified. Over the full operating temperature range, the maximum could go as high as 3 ua. The graph is meant to show how the current varies over the temperature range for a typical part with a room temperature current of about 1.5 ua. If the actual reference current is different from typical (it could be higher and it could be lower), you would need to adjust the vertical scale to estimate how much the current would vary with temperature.


Comma-Operator in Preprocessor-Directives

Question: This is a question for deeper understanding.
Let's say I have the following code:
#define DEF 1,2,3
#if (DEF > 3)
#endif

If I am right the if should always be true, as 1 and 2 are Expressions that have no affect and only 3 will be checked. (This should at least be true in normal C/C++-code)
But is that right or would there be any Reason why I should think about 1 and 2, too? I saw it in some code and I am not really sure if this could have any sense or affect.
Comment: You are correct that only 3 will be checked, hence you get 3 > 3, which is always false.
Answer: DEF will expand to give #if (1, 2, 3 > 3). Because , has low precedence, the only expression that "does" anything is 3 > 3 which, of course, is false.
Answer: Your example code is not strictly conforming.
From C11, 6.10.1 par. 3 (Conditional inclusion, Semantics):

Preprocessing directives of the forms
# if   constant-expression new-line groupopt
# elif constant-expression new-line groupopt
check whether the controlling constant expression evaluates to nonzero

However 6.6 par. 3 (Constant expressions, Constraints) says:

Constant expressions shall not contain assignment, increment, decrement, function-call, or comma operators, except when they are contained within a subexpression that is not evaluated.115)

Footnote 115 is:

The operand of a sizeof or _Alignof operator is usually not evaluated (220.127.116.11).
Comment: This is true for C and C++03, but not C++11 and later.
Comment: Does that mean that this line should be accepted by a C11-conforming preprocessor? `#if 0?(1,2):3`
Comment: @PedroGimeno: I believe so as `(1,2)` shouldn't be evaluated. But it might be worth it to ask this as a question.
Answer: #define DEF 1,2,3
#if (DEF > 3)
#endif

The above if condition will fail. Reason 3 > 3 is false.
Probably you can put it as
#define DEF 1,2,3
#if (DEF == 3)
#endif

Answer: Yes, you are correct as the first two are dummy expressions only the third expression will be actually evaluated.
Consider the code:
#define DEF 1,2,3
#if (DEF > 3)
#endif

which will be treated as:
#if (1,2,3 > 3)
#endif

Precedence of , is lower than > and thus 3 > 3 results into 0. Then, #if (1,2,0) will definitely evaluated as #if (0) which is always false value.
Answer: The C++11 standard allows the comma operator, but the change was only inadvertent. Implementations such as Clang and GCC evaluate #if (1,0), but they will issue a warning under -pedantic which, though definitely a mild consequence, is their typical response to illegal preprocessor constructs. They do the same thing for macro redefinitions, which are totally harmful.

warning: comma operator in operand of #if [-Wpedantic]

The "feature" is scheduled (DR 1436) to be removed back out of the standard, but there is ongoing uncertainty as to how to do this, or how to approach maintenance of the preprocessor standard in general.
(To be clear, in the C language and C++ before C++11, the comma was specifically prohibited from constant expressions. See cremno's answer. The inadvertent change was to remove "constant expressions shall not contain…" for the general language, but without adding the rule back for the preprocessor.)
I have proposed (N4220) a comprehensive update to the preprocessor specification, but it has stalled in a subcommittee without official review. Nevertheless, several interested committee members (from Clang, GCC, and IBM XLC) did review it, and there's general agreement that the adjustments in that paper reflect the true intent of the standard. From §4.4 of that paper,

Note that the comma operator is not allowed even within parentheses.

In practical terms, no, the comma operator is neither portable nor future-proof. Several people have considered the question and agreed that you shouldn't use it there. Following the rules of expression evaluation, though, you're right that 1 and 2 simply get ignored.


Patch 1.5.0 Arcade and new 'Total Career Games' statistic - what exactly does it count?

Question: I would like to know what exactly counts towards "Total Career Games" in StarCraft II.
Does it count co-op and custom games, or only quick-match games? Does it include FFA as well?
Comment: I don't think "total career games" is new, and I also don't think it counts anything but league games.
Comment: From the Path 1.5.0 release notes: "New statistics have been added to the Player Profile: Games Played This Season, Most Played Mode, and Total Career games."
Comment: I would put this into an answer but I have no source nor do I have a exact answer. But, I'm 99% sure its all games you have ever played, custom, FFA, etc.
Answer: I found this post that had the following to say:

Total Career Games
Instead of showing total wins, it now shows total career games, as the community requested. You guys didnt want to
  see just half the info by only getting to know the wins, but you
  wanted to see the total matches played. So once again -> This is a big
  plus you guys asked for!

The number is the amount of league games played(Including FFA). Based on my own numbers I can say this does not include co-op, vs AI or custom games.
Comment: In case anyone is wondering the way I know it includes FFA is because I went and tested it :)


Will downloading on one PC on my home LAN affect network performance of another PC in the LAN that is streaming from within the LAN

Question: I am downloading from the internet on one pc, mainly torrents. I am streaming video on another pc from a NAS. All device are connected to the same router. Will the downloading be affecting the speed of the streaming?
Answer: This depends mostly on how they're connected.  If they're connected over wireless and they're all using the same band (ie. 2.5GHz or 5GHz) then the downloading/torrents could slow other clients down because of the congestion in the wireless spectrum.
If they're hard wired or if the downloading system is a separate band from the streaming system (ie. downloading on 2.5GHz and the streaming on 5GHz) then it's not so much of an issue.
Unless of course your router/access point has some firmware bug causing it to have problems handling the high volume of connections from the torrents... in which case it could be doing any number of things.
Comment: Thank you. The device downloading is connectedcvia wifi and the other device is cabled in via homeplug
Answer: It will probably have a minimal impact. The bottleneck will be the internet connection though not usually the local lan. The quality of the router may also impacts performance if this is the device acting as a switch for your network and not just routing
Comment: Yes it is acting a switch - it is the router that was provided by the isp


Any books of running large (100+) development teams?

Question: Running a large (100+) development team is quite different to 10 or even 40 people, manual control stops working. What are the books on how to do it the most effectively?
Comment: Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic per our Help Center as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Comment: I'm voting to close this question as off-topic because questions seeking software, tools or resource recommendations are off-topic because they tend to become obsolete quickly. Instead, describe your situation and the specific problem you're trying to solve. In your case I would recommend reading "The Mythical Man Month" as a primer.
Comment: Thank you for recommendation. So when you think The Mythical Man Month would be obsolete?
Comment: You'd have to define the criteria by which a factual book becomes obsolete before I could answer that. It might not be relevant to your needs, but I don't know what those needs are! However given what I *do* know from the brief question I would say it would be an interesting primer rather than a solution resource.
Answer: Spotify is running a 250+ man team and has some videos and a 13 pages paper, find links at: http://blog.crisp.se/2012/11/14/henrikkniberg/scaling-agile-at-spotify
There are a number of Scaling Agile frameworks which have books:

LeSS: Large-Scale Scrum, http://less.works/ (My favorite, documented broadly both online and in this book: http://www.amazon.com/Large-Scale-Scrum-More-Craig-Larman/dp/0321985710)
SAFe: Scaled Agile Framework, http://www.scaledagileframework.com/books/
Nexus: https://www.scrum.org/Resources/The-Nexus-Guide

Also checkout the Agile Scaling Knowledge Matrix, which also contains other frameworks for scaling software development: http://www.agilescaling.org/ask-matrix.html


How to create a Quantum circuit to implement the generation of 3-qubit uniform superposition wavefunction

Question: I  want to know experimentally or circuit wise diagram to know how to create a circuit that will produce 3-qubit uniform superposition wave function
Can somebody help me in that
Thank you in advance
Comment: Welcome. What have you done so far? Where are you needing the most help?
Answer: A uniformly distributed superposition can be prepared by Hadamard gate.
If you apply a Hadamard on single qubit in state $|0\rangle$ you get state $\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle)$. Both states $|0\rangle$ and $|1\rangle$ are measured with same probability $50  \%$.
To prepare uniformly distributed state having $n$ qubits, simply apply Hadamard on each of them. This leads to a operator $H \otimes H \otimes \dots \otimes H = \otimes^nH$. A state produced by this operation after application on initial state $|00\cdots00\rangle$ is
$$\frac{1}{\sqrt{2^n}}\big(|00\dots00\rangle+|00\dots01\rangle + |00\dots10\rangle+\cdots+|11\dots10\rangle+|11\dots11\rangle\big),$$
i.e. all combinations of $0$ and $1$ on $n$ qubits are presented with equal probability.


Bridge pins fitting

Question: I have an acoustic guitar that wasn't mine originally and when I decided to change the strings I also decided to change the bridge pins. Do they come in different sizes? Because the ones I got seemed about the same size as the old ones, and the old ones were pretty hard to get out. I thought you were supposed to get them the same size. Should bridge pins be easy to slip in and out? I don't want to break my guitar's bridge
Comment: If the new ones dont go in as easily, does that mean I'll have to jam them in?
Answer: Bridge pins are tapered. Most things engineered with tapers are for a purpose - to remain a snug fit. Once in place, they bind, and are not so easy to remove. That's the realm of parallel sided objects.
As the pins go in, they get tighter and tighter. Added to which the ball end of the string jams them in. Then if they're in for years, they don't like being ousted, so will be tight - usually.
A lever will remove them safely, after some fiddling. In my experience they are all approximately one size, although occasionally new pins won't sit as low as the ones they replace.
Comment: There are slightly smaller pins that come stock on some instruments. They still use the 4 degree taper but the bridge holes are often drilled smaller. When changing pins out on some guitars I have to ream the holes out a little to use the standard replacement size pegs.

Bridge pins fitting


iPhone 3g; iOS 4.2 to iOS 5 performance?

Question: Features aside, should I expect a performance increase in general or the reverse?
Answer: Sorry, but the Wikipedia article for iOS 5 indicates that iOS 5 does not support the iPhone 3G.
Answer: Everything I have read on the subject indicates a high probability of reduced performance when upgrading a 3G from iOS 3 to iOS 4.  iOS 5 is not supported on the 3G.  There were also some crashing issues with iOS 3.1.3 and later.  I've kept my 3G at 3.1.2, however more and more apps are dropping support for iOS 3.
Answer: When upgrading my iPhone 3G to iOS4 I had a dramatic loss of performance.
iOS5 is not supported by iPhone 3G.


How does new continental crust form?

Question: New oceanic crust is formed at mid-ocean ridges, then destroyed during subduction. Continental crust can be destroyed with erosion, or when the crust gets too thick (under mountains) and starts to melt at the base, but how does it form? Or is the continental crust slowly disappearing?
Comment: [How Does Earth's Continental Crust Form? A New Bottom-Up Theory](https://blogs.ei.columbia.edu/2016/02/22/how-does-continental-crust-form-scientists-have-a-new-bottom-up-theory/)
Comment: See also: https://earthscience.stackexchange.com/q/19261/18081
Comment: @Erik I thought that Iceland was mostly basaltic because it is sitting on a mid-ocean ridge, so it's not quite continental crust that is being formed there. As for the Mid-African ridge, I believe the continental crust is getting locally thinner as it is spreading out, so the volume of continental crust is staying the same.
Comment: *points at Iceland* *points at the Mid-African ridge* Your question was?
Comment: @Erik: Sounds like you would want to formulate a coherent answer?
Answer: Continental Crust forms because of continual volcanic magma flow and pressure, erosion takes over a period of hundreds to millions of years to completely weather some object. Along with that, tectonic plates can smash into each other to form a continental crust and do land-building (The Himalayas is an exemple)

As with oceanic crust, continental crust is created by plate tectonics. At convergent plate boundaries, where tectonic plates crash into each other, continental crust is thrust up in the process of orogeny, or mountain-building. For this reason, the thickest parts of continental crust are at the world's tallest mountain ranges. Like icebergs, the tall peaks of the Himalayas and the Andes are only part of the region's continental crust—the crust extends unevenly below the Earth as well as soaring into the atmosphere.

"Crust" describes  the outermost shell of a terrestrial planet. Our planet's thin, 40-kilometer (25-mile) deep crust—just 1% of Earth's mass—contains all known life in the universe.

Earth has three layers: the crust, the mantle, and the core. The crust is made of solid rocks and minerals. Beneath the crust is the mantle, which is also mostly solid rocks and minerals, but punctuated by malleable areas of semi-solid magma. At the center of the Earth is a hot, dense metal core.

Earth's layers constantly interact with each other, and the crust and upper portion of the mantle are part of a single geologic unit called the lithosphere. The lithosphere's depth varies, and the Mohorovicic discontinuity (the Moho)—the boundary between the mantle and crust—does not exist at a uniform depth. Isostasy describes the physical, chemical, and mechanical differences between the mantle and crust that allow the crust to "float" on the more malleable mantle. Not all regions of Earth are balanced in isostatic equilibrium. Isostatic equilibrium depends on the density and thickness of the crust, and the dynamic forces at work in the mantle.

Just as the depth of the crust varies, so does its temperature. The upper crust withstands the ambient temperature of the atmosphere or ocean—hot in arid deserts and freezing in ocean trenches. Near the Moho, the temperature of the crust ranges from 200° Celsius (392° Fahrenheit) to 400° Celsius (752° Fahrenheit).

Crafting the Crust

Billions of years ago, the planetary blob that would become the Earth started out as a hot, viscous ball of rock. The heaviest material, mostly iron and nickel, sank to the center of the new planet and became its core. The molten material that surrounded the core was the early mantle.

Over millions of years, the mantle cooled. Water trapped inside minerals erupted with lava, a process called "outgassing." As more water was outgassed, the mantle solidified. Materials that initially stayed in their liquid phase during this process, called "incompatible elements," ultimately became Earth's brittle crust.
Comment: From where do the quotes come? Please incorporate the reference links in the answer.

How does new continental crust form?


Is there an IIS 7 Application Request Routing equivilent of Apache's ProxyPreserveHost?

Question: Title is basically it.  I have tomcat running on localhost:8080 and I'm attempting to use IIS 7 with ARR to reverse proxy to it, which half works.  The request is getting to tomcat but with the Host header of 127.0.0.1:8080, which the servlet is complaining about.
Answer: ARR does a reverse proxy request to the target Server Farm, which is localhost:8080 in your case.  When it does, it writes the original server variables into HTTP_X_?? variables.
From tomcat, you will need to rewrite those variables back into the original locations if you want to ensure that applications on tomcat are affected by the reverse proxy affect.  If your site was IIS7, you could use the ARR Helper which does that for you, but since you're not using IIS, you'll need to handle that manually yourself.
Comment: Yeah, I was hoping this weren't the case, but it turned out the Java changes were pretty simple.
Comment: Great.  Glad you were able to figure it out so readily.


Used to FreeBSD, want to learn on OpenBSD, what are the main differences I should expect in learning?

Question: I'm going to be getting into BSD at some point very soon. I'm not that experienced on *nix - enough to figure out basic use on FreeBSD and to look forward to teaching myself more.
I started a few years ago with dabbling into FreeBSD. My choice of OS was basically from expedience - pfSense and FreeNAS which I use, both run on it, and I wanted to manage them more fully and perhaps contribute back.
So far that's been my limit. But recently I've decided I want to go further and immerse myself into a homelab BSD environment and learn it more fully in future. I've always liked the OpenBSD philosophy which matches my own, and just today realised that I've assumed I would learn on FreeBSD where in fact I could easily switch to OpenBSD as an OS install to learn with.
So my question is, what are the main differences I'll notice between learning on these?
Obviously I can guess some: there will be slightly different params for some commands. Some files will be in different places. Some defaults will be different. Behind the scenes quite a lot has subtle changes. But most of this will be minor, or only impact if I get into serious development, my impression is that most will be very similar or often nearly identical.
What would be helpful is a clear sense, as a comparative *nix newcomer, of the kinds of things I will come across that are different between them when I'm exploring and putting a toe in the water with them, so I can mentally mark out what's common between them and the main areas I'm likely to find, that won't be.

Please note, I'm not asking for better/worse, or advice choosing between them. I'm happy to use both, and I'd like to learn on OpenBSD primarily, but so far I've only used FreeBSD and that's been dabbling at most.So I'm pretty much after a heads-up, a list of the kinds of
differences/things I'll probably come across and find useful to
mentally mark as different between them as I explore. (Not least, so
that I'll know what I need to relearn if I take my OpenBSD learnings
and do stuff on FreeBSD with it in future!)
Comment: While off-topic, I recommend the book "Absolute OpenBSD"
Answer: I simply recommend going into it as if you know nothing—there are too many differences for one to spell them all out.  The OpenBSD man pages are very good and you can reviewing them judiciously before jumping into an area you think you know.  As another poster mentioned, you could always pick up a book and read it through before proceeding.


How to fix the Jerky and jumpy Apple Magic Trackpad behavior?

Question: My Apple Magic Trackpad has started to move the pointer on the screen with a jerky and jumpy way, that makes it difficult to use it (compared with the macbook pro mid 2010 17inch touchpad).
How can I fix it, and why it appeared so suddenly?
My operating system is Mac OS Mountain Lion.
Thank you.
Answer: Apple magic trackpad 2 owner here and every few weeks mine does this on bluetooth (but it's fine while plugged in and charging.  The solution is to reboot your trackpad (just turn it off and on again using the switch on the back).
I think it's stupid that I have to reboot my trackpad but here we are.  Also if anyone is curious why I'm responding in this question, it's because this is the top google result for 'Apple magic trackpad 2 jumpy".
Comment: You are a hero, this popped up in my Google answer box... 7 years later, wanted to say thanks!
Comment: Helped me too: "just turn it off and on again" a classic IT answer
Answer: For me, turning Bluetooth off then back on did the trick for a very jerky cursor. Turning the trackpad off and on did not fix it.
Comment: That worked for me too, thanks. Would be good to understand why - wonder if it's getting a new Bluetooth channel with less interference? Or just resetting a bugged driver...
Comment: This worked for me as well—thank you, was just turning the trackpad itself on and off to no effect.
Answer: I removed the batteries and then I took a pencil with a soft pink eraser at the end and cleaned the contact inside the Magic Trackpad.  Blew out any eraser left on the contact and put the batteries back (new to begin with).  Immediate 90% improvement.
This helps since I am using a 30" monitor.
I have Magic Trackpads for all my other machines.  No problems with them.  Only this machine.
BTW, also tried resetting the PRAM, cleaning the surface of the Trackpad, changed the batteries, grounded myself, scrubbed my fingers clean, and turned off the internal backup (a hidden function for when the machine is not connected to a Time Machine drive).
Info:  MacPro '06, 30" Cinema Display, 22 Gig RAM. 6 Gig internal storage, 11.5 total storage.  10.7.5
Answer: It seems that new Alkaline Batteries may do the trick.I was disappointed because after the replacement of the batteries the problem remained.
But I see that after some time the trackpad returned to its previous good performance!
Answer: I know this is an old question, but for my current-model magic trackpad, I used two alcohol wipes; the kind used for insulin injections. I turned the trackpad off, then carefully wiped the entire surface in a grid pattern, then did the same with another wipe, being careful not to get the trackpad too wet. Using two wipes ensures removal of fingerprint skin oil. After wiping, I held the surface of the trackpad in front of my desk fan until it was dry (maybe a minute or so.) I turned it back on and the problem was solved.
Answer: One other thing to consider is to make sure nothing else is touching your magic trackpad, especially the Lightning cable that's used to occasionally charge it (or some may keep it permanently connected). I had a jumpy cursor suddenly and I couldn't figure out what it was until I noticed that part of the cord was very slightly touching the upper corner of the trackpad. Once I moved it out of the way, suddenly the cursor was behaving normally again. Just something else to consider for folks.


How to get fm radio back after Desire X was updated to Android 4.1?

Question: My HTC Desire X recently updated to android 4.1. With that update, the FM radio disappeared. How can I get it back? I can't find an app the does this in the Play Store. Are there other ways?
Answer: Take a look at this forum: http://www.htcforums.com/desire-x/12477-updated-4-1-1-no-fm-radio.html. The only other way (I know) to get a fm radio on your device is to root it or install an .apk from outside the Play Store.
Answer: The problem is solved by restarting the phone.
Answer: Use Spirit Light. Works well on Desire, excellent app.
Comment: What spirit is light? I mean, with enough spiritus you hear everything, be it there or not... Maybe you could add a link and a little explanation what "Spirit Light" is? ;)
Comment: @t0mm13b Excellent! That gives the "on the Rocks" another dimension (it simply rocks on, and thanks to the spirit in the JD part, sounds even better than a full HiFi rack :D)
Comment: @Izzy lol! Maybe it's liquer spirits? JD on the rocks please! :D /ot


How useful is the search tower really?

Question: There's someone in my town who is REALLY in love with the search tower.  This is my second town with him and he always wants to build it ASAP and then upgrade it every chance he gets.  I understand that getting resources is important, but is it really effective early on to pump up the search tower at the expense of other things (like the watchtower)?  Do other experienced players go for the search tower right away like this?
Comment: I've already complained against him.  I didn't want to, but he kept flooding my nice organized threads with drivel.  >:(
Comment: I also don't really think the *watchtower* needs to be upgraded past level 1.  As long as you have a basic idea of what's to come, you can plan your defence accordingly.
Comment: @Gnome Upgrading the watchtower is important for people who go exploring, so obvioulsy it doesn't apply to you. ;-)  But with the upgraded map, you can see the exact number of zombies in every square, which prevents anyone getting stuck, and the free trip home saves almost as many AP per day as a fully upgraded workshop.
Comment: > I suppose I'd forgotten that it lets you see where all the zombies are on the map as well...
Answer: The higher desert zone regeneration is, the more items you can find closer in the desert. You can travel in smaller groups, make more trips and have more items.
This is especially important when you consider that the single best defensive project in the game is Defensive Focus, which greatly increments the defensive value of each defensive objects -- sparing AP for more ambitious projects. The more objects, the merrier!
Today, day 14 in Itching plantation of shadows, we're getting Defensive Focus 4, for 106 additional defense -- essentially for free. We wouldn't have gotten so many defensive items without a search tower, however.
Indeed, our search tower is level 5. At first I didn't agree with this, but now I can see the benefits.
Comment: un update on this, search tower is by far the single best upgrade in the game to get as early as possible.  With a well organised town and enough scavangers, you really need it quite badly in order to find the largest source of defence in the game (defence items).  At Day 14 in our current town we only have 7 zones on the entire map no depleted, and we have had Search Tower at lvl 5 since Day 8.  We would quite literally have no zones to search on our map if we hadnt upgraded it so early.
Comment: Which days did you vote to upgrade the search tower? I know you guys have a fully upgraded watchtower also, which one got upgraded first?
Comment: @bwarner No, we have the watchtower at level 2. I don't remember the specific days -- it happened in days 6-10 circa right when building defenses was no longer a concern.
Answer: As with most buildings in die2nite, they all have a purpose and can all be very useful depending on your strategy. Badp has given a reason the search tower can be useful, and it makes perfect sense.
However, I would suggest that a search tower is not an early requirement; not util most nearby zones are depleted or until you are running lower on somewhat rarer items that are hampering your progress.
In the meantime, I find it incredible that he would contemplate building a search tower before a watchtower. How do you know what to build until you have a clear idea of the daily threat?
In my book, workshop is first on the list and the watchtower and/or Great Pit come the same or next day... The search tower I would typically start to consider from day 3 at the earliest.
However, perhaps your neighbour has a masterplan... So challenge him to explain his reasoning for an early search tower, and counter with suggestions of your own. Let the rest of the town decide. Hopefully we've given you some ammo to make your argument.
Comment: If I guessed who this particular guy is, he's likely to have already spammed everybody about the workshop. :)
Comment: The problem with discussing the search tower like this is its kind of mysterious.  There are some differing theories about how it actually works, and the impact is very abstract.  You get a mystery number of of mystery items in mystery zones, and whether that benefits you depends on whether you find those items.  But this person believes very strongly that it gives tons of awesome items constantly, and there is no way to PROVE otherwise.
Comment: @bwarner Apparently (heh, that's pretty much the point), getting a watch tower gets you a chance of desert winds sweeping in a general direction (e.g., _"Strong gusts of wind shook the south west during the night."_); the higher the level of the search tower, the higher the chance is that every single tile in this general direction becomes undepleted.

How useful is the search tower really?


Path of Exile performance

Question: How can I further increase FPS on Path of Exile game?
I have a pc with dual core e6300 intel cpu with 4 gb ddr 2 ram, 1gb ddr3 ATI radeon 4670 and enough bandwidth and memory.I play on lowest settings with deactivated post processing and antialiasing and everything ( everything is on low). When I play, whenever i hit first pack of mobs and start using skill everything starts to lag, the sound disappears, framerate goes crazy and everything gets unplayable.Any advice ( except to get new pc :) )
Comment: If you're going to list your hardware, then ask for an answer not involving upgrading hardware I'm not really sure what you want us to do. That being said your GPU is way below minimum specs. If you are able to upgrade at all I would suggest starting there.
Comment: Path of Exile is known for putting the CPU through a lot of work. I'd recommend upgrading that alongside your GPU. Of course, "Just spend the money!" is always an iffy advice, but you won't boost the performance of your CPU by cleaning up your PC, however, ensuring that PoE is the only thing running except for system processes would certainly help, if you are not doing so already.
Comment: You also might post this question on superuser due to its hardware related content: https://superuser.com/
Answer: If you don't mind having really poor graphics, you can try using the "dynamic resolution" setting, assuming you haven't already. It will try to hit the specified FPS (say, 30), by automatically reducing the resolution.
There are instances where you might have the impression of playing a 8-bit game, but it could be your best chance until you manage to upgrade your system.
Answer: A possibility is trying to clean up your pc (e.g. deleting old/temporary files, disk defragmentation...) but I think that doesn't affect the games performance that much. Also check if you have installed the best driver for your hardware.
Nevertheless, if you already lowered all settings and still have lags you really should consider to upgrade your system :). If the hardware below the software is too weak to handle it, there's no chance of getting the game to work properly.
Answer: You need a new computer.
The hardware you're describing is roughly 10 years old, and was a budget build even then. It's completely unsuitable for running any modern games.
Answer: As has been stated already, upgrading your hardware is going to be your best bet. On the software side, you can try running resource monitor and stopping/disabling any programs or services that are cutting into your CPU or network usage.
Dynamic Resolution is very helpful for graphically flashy builds, but since it still kicks in sometimes on my PC even with the latest and greatest in graphics cards, it may turn your game into Tetris (Gameboy Tetris even). You could try setting your targeted FPS for something really low but not quite a slideshow such as 15 FPS.
If and only if you are running POE with DirectX 9 (not 11), you can edit the game's production_Config.ini in C:\Users\YourNameHere\Documents\My Games\Path of Exile\ to set the texture quality lower than the in game menu allows. The line you're looking for will be texture_quality and the higher the value, the worse textures but better performance you will see. It gives diminishing returns though, so anything higher than 4 or 5 won't help any further.
If you don't have an SSD getting one is a huge upgrade to the game since it prevents lag caused by loading assets while playing, and it also just generally speeds up load times by an absurd amount.

Path of Exile performance


Timeout when using NSUrlSession with call started in foreground but app moved to background

Question: If a basic call to post some data to a server using NSURLSession (in this case using Alamofire) a call is started with the app in foreground, while the call is in progress the app is move to the background and is suspended. When the app comes back to the foreground, what happens to the call that was in progress? Does it timeout (App is using default 60 seconds ephemeralSessionConfiguration) or will it receive some other error? If the timeout has not yet been reached is the call still waiting or has the OS terminated it? I have the default background mode and have no requested no background time. Trying to debug an issue that happened in the field.
Answer: Your network requests are suspended when your app is suspended.  So basically the answer is that it depends on whether the server gives up on you while your app is in the background, and on whether the socket in the kernel gives up on your app while it is suspended.
As a rule, if you need to move data while your app is in the background, you should be using a background session and a download or upload task.  That way, the actual data transfer happens in a separate process (that doesn't get suspended) and your app will get the data.
With that said, using a background session is fundamentally in conflict with using an ephemeral configuration, because it involves storing data on disk.  So if you really need an ephemeral configuration for some reason, your app's requests are likely to just fail a few seconds after the user hits the home button, and there's not much you can do about it as long as you're making requests ephemerally.


Cross application cookie access

Question: It was my understanding that cookies are transferred with each subsequent http request, yet if I log in to a web application that uses cookie authentication, say on my browser, other applications on the same machine don't seem to send these previous cookies with their requests to the same address. Is my understanding of cookies incorrect?
Comment: When you say "other applications on the same machine" do you mean other non-browser applications on the client? Or other applications on the server? Or something else.
Comment: Yes other non-browser applications although it seems PHP scripts run in the same browser don't have access either. I solved this issue by doing it all within the same app - login, retain cookies, go in to secure area etc
Answer: Cookies are transferred "with each subsequent http request", on that browser. Cookie storage is browser-specific.
Unless browsers choose to share their cookie cache somehow, or read those of other applications (which would brand them as malware pretty quickly), they only know of the cookies set in that browser
Comment: It is completely up to the browser how to handle cookies, this can not be changed, short of creating a software run on their device. If you want to store something persistently for a user, you could make them log in to your page.
Comment: Interesting, can this be overcome by using a different language? Say PHP? I take it would still retain the browser's context?

Cross application cookie access


Can a Covariance matrix have negative elements?

Question: I have a $N \times N$ covariance matrix $C$ of a multivariate Normal distribution.  Can any of the elements of the Covariance matrix $C$ be negative for a real-valued distributions ?
Answer: Any negative correlation between two elements will end up with a corresponding negative entry in the covariance matrix.
Answer: Yes, for example  $$ \begin{pmatrix} a+b  & a-b \\ a-b & a+b \end{pmatrix} $$ can appear as covariance matrix for any positive eigenvalues $2a$, $2b$.


How to verify if a graphical model has the markov property?

Question: If I draw the computational graph of an HMM and an RNN from an architectural point of view they look very similar. The main difference is that an RNN gets some input $x$ and the HMM only operates on the latent sequence. From my understanding - and reading that from the drawn graph - both the hidden states $h_i$ in the RNN and the latent variable $Z_i$ are conditionally dependent on the previous state and produce some output. What I don't understand is, that an HMM is said to have the markov property (i.e., is memoryless) whereas the RNN does not. Why, where can I observe the difference? How can I read that property from a computational graph (if at all)?
Answer: The Markov property applies to sequences of random variables. Let $(X_n)_{n\in\mathbb{N}^*}$ be a sequence of random variables, it is said to follow the Markov property iif:
$$
p(x_n|x_1,\dots,x_{n-1})=p(x_n|x_{n-1}).
$$
Thus, if you can show, from the computational graph or any other equations defining your model, that the distribution of $X_n$ given $X_1,\dots,X_{n-1}$ only depends on $X_{n-1}$ you have proven the Markov property for the sequence of r.v. in question. The Markov property for the hidden random variables in a HMM is indeed one of the core definitions of HMMs.
RNNs -in the simplest models- have indeed architectures which seem to exhibit a Markovian property. I think however that this term is not really used because hidden variables in RNN are not random variables. Hence there might be a problem of definition; even though it is true that the dependency on the past states is reduced to the depency on the last state (at least in the most simple RNNs).
As a final remark, if you generalize RNNs with stochastic hidden random variables (you can see the deterministic case as a particular case) then you will be able to treat it as some kind of HMM and properly show the Markovian property (or not). See for example : here or here.


How do I cook frozen Goya Empanadas in the microwave?

Question: How do I cook frozen Goya Pizza Empanadas in the microwave?
Comment: Does the package have instructions?
Answer: This from their website:

Directions
Keep frozen. Cooking: In a skillet or deep fryer at 325 degrees F,
  preheat enough oil to cover the empanadas. Fry for four minutes or
  until golden, turning occasionally. Drain on paper towel. For Best
  Results: Fry from frozen state. We do not recommend cooking product in
  microwave oven.

This suggests to me that there is no good way to cook these in the microwave.
Having said that, there is probably nothing dangerous about cooking them in the microwave, although I generally keep a close eye on anything I've never microwaved before just in case. You may need to experiment cooking from frozen vs. cooking from thawed but there are four of them in a box so knock yourself out.
If getting the surface to brown is a problem you could try using a microwave crisper. Microwave crispers come in a couple of forms: a reusable bag (a bit like a popcorn bag) marketed under the name "Brown and Crisp" and what looks like a non-stick steel pan. If these aren't readily available I don't imagine they will make such a difference to your end result that it will be worth ordering them specially.


Can I make my apps update automatically once a week? (4.1 Jelly Bean)

Question: I was updating my apps automatically but every time they update my anti-virus would scan the installed app and make the whole system freeze, which is quite annoying. So is there any way to make them all update once a week, let's say, every Sunday morning? Or, is there any app to do that? Thanks in advance.
Answer: You could disable the auto update from Play Store settings and update manually every week. Or you could disable the app scanning of your antivirus and instead set a scan of all your apps every week, I think the probability that an app update and the scan to collide will be very low. This way you wouldn't have to do the manual update. Also, you could try some of the Play Store alternatives in this article, but I don't know if they have an update scheduling function.
Comment: My AV will scan the apps as soon as they are installed, that's the problem. But I'll schedule a weekly virus scan and set google play to update automatically as you said. Thanks


Reload /etc/default/locale without reboot?

Question: After making changes to /etc/default/locale, is it possible to reload/active the new settings without a reboot?
Comment: Which distribution? Console or GUI? But often reloading `/etc/profile` or logging in again helps. You usually do not need to reboot a linux system for anything but a kernel update.
Comment: centos version 5.7
Answer: Locale settings are set as environment variables by the login process (which reads /etc/default/locale) and inherited by child processes. If you log in to a new session, the new settings take effect in the new session.
You can make the settings take effect immediately in a shell by issuing the command
. /etc/default/locale

(note the leading dot). If you've added a category that wasn't set before, you'll need to export it. If you've removed a category, you'll need to unset it.
Changing the settings in a shell affects all the applications subsequently started by that shell (as long as they're using the system locale settings and not their own configuration method).
Comment: @lepe It's a shell builtin to read and interpret the given file. The file is interpreted in the current shell, as opposed to just writing `/etc/default/locale` which would execute that file as a separate program, which is pointless when all the file does is set variables.
Comment: What does the dot does? I there any other uses of it?
Comment: Synonymous with `source /etc/default/locale`.
Comment: Sourcing the locale file will not reset existing environment variables unless they are explicitly given in /etc/default/locale. Furthermore, variables given will not be exported, so this does not work correctly unless the current and new configuration is very similar.
Comment: This did not work for me on Debian, for example the PostgreSQL command pg_lsclusters was still complaining about unset locale variables. So I had to reboot.
By reading the answer again, I noticed the other solution with export. It could be useful to mention above the first solution with the dot instead of below that it will not work in some cases, so people will not think it will work when trying it.
Answer: If your are using a shell, then just start a new login eg.
su youruserid -
test it then exit back to your original login shell
If you are using a gui, logout and login again.
Comment: `su youruserid -` - really?! Why not simply exit the shell and restart it?!
Comment: Because I would loose my "context", say I was developing a program, then starting a sub shell allows me to test then exit, I am still in the development directory, ready to try again. Of course logout and login will work, but starting a sub shell is quicker in my opinion.


How do we know the Earth orbits around the Sun and not the other way around?

Question: I know that describing the trajectory of all planets in the solar system around the Earth is much more complicated than if we take the Sun as the reference point. But besides this, what is the simplest experiment that can prove that the Sun is a more "inertial" point of reference than the Earth? Do we have to look at the stars in the background or something like that?
Comment: "Do we have to look at the stars in the background or something like that?" -- the yearly paralax is a good proof, but why aren't you satisfied by the laws of conservation?
Answer: In fact, if our system consists of only earth and sun, we'd never ever know, because we can never measure the difference, since you can always change the frame of reference between earth and sun, and both statements will be true (earth goes around the sun or vice-versa).
That's why, you need a third impartial object, which typically is a star far, far away. The star gives some light, and we can measure the light abberation caused by the earth's movement, and that's how we know.
Comment: We don't need stars for this.  Other planets will do.
Comment: @BrandonEnright I disagree. Using other planets would mean that there's a kind of interaction with those planets we can measure, and the only thing I can think about is the hypothetical gravitational waves that come from other planets, which are not measureable (so far). So in principle, if there's a measurable interaction between our planet and the other planets, then other planets shall suffice; but this is not the case, and the measureable interaction is light, which doesn't come from other planets. Please correct me if I'm wrong.
Comment: Of course there is a measurable interaction.  Light from the sun reflects off the planets and to us.  They look pretty much like stars but that don't move like stars.  The phases of Venus was one of the last nails in the coffin of the geocentric model.  Even if there were no other stars in the universe we'd still know that we (and the rest of the planets) orbit the sun.


ReactJS 0.9+ Code Coverage with ES2015 class keyword

Question: I have a basic demo app that I've put together and I have successfully been able to write test and get code coverage working.
Except for one minor problem.
All of the code that use the class keyword from ES2015 end up emitting code at the top that looks like this:
<code>/*istanbul ignore next*/'use strict';Object.defineProperty(exports, "__esModule", { value: true });var _createClass = function () {function defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}return function (Constructor, protoProps, staticProps) {if (protoProps) defineProperties(Constructor.prototype, protoProps);if (staticProps) defineProperties(Constructor, staticProps);return Constructor;};}();var /*istanbul ignore next*/_react = require('react'); /*istanbul ignore next*/var React = _interopRequireWildcard(_react);
</code>
It is a very long line, I'll save you the trouble of reading it.
There are a couple of problems.
First, the /*istanbul ignore next*/ should be /* istanbul ignore next */ with a space before and after the comment, otherwise istanbul basically ignores it.
Second, even once you fix that, which I tried doing, there are functions in that string that don't get commented at all with the ignore comment.  I'm assuming because the set of functions all get added at once so only one comment gets applied at the beginning.
My configuration for babel, both in package.json and .babelrc looks like this:
<code>"presets": ["react","es2015"],
"comments": true,
"compact": false
</code>
I've also tried adding babel-plugin-transform-runtime as
<code>"plugins": ["transform-runtime"]
</code>
both before and after the "presets" line but when I do that, I get errors that indicate the auto mocking is unable to read the metadata.
So, I guess the question is.  Does code coverage with the class keyword work at all in Jest?  If so, what am I missing?  Is there some way of getting transform-runtime working?
Answer: For anyone coming here in the future, I've figured this out using a combination of:

The tranform-runtime plugin
Modifying babel-jest

It takes 1000 words to describe the specifics, you can check it out here:
https://davembush.github.io/es2015-code-coverage-and-jest-react-js-unit-testing/


TMS vs WMTS vs WMS-C in OpenLayers

Question: GeoWebCache is able to serve layers in the following three standards: TMS, WMTS and WMS-C. Is there any remarkable advantage in using any of them in particular within an OpenLayers framework?
Comment: What is your scenario? Otherwise it might be hard to compare the different approaches and how you might benefit.
Comment: Mobile app loading WMS from Geoserver for Raster data and GeoJSON for Vector data. The app needs to be ready for offline mode.
Answer: WMS-C is the best supported and most mature, but it's a bit of a kludge overlayed on top of WMS to support tiles and it incurs some extra overhead from having to use world coordinate bounding boxes rather than tile coordinates.
TMS is fairly mature, and is specifically designed for tiles, but is not an official OGC spec.
WMTS is an OGC spec that is meant to replace TMS and WMS-C.  It works purely in in tile coordinates like TMS (although it computes them differently) but has some additional capabilities that weren't in TMS, like GetFeatureInfo.  It's comparatively recent and less used so its implementations are less mature.

TMS vs WMTS vs WMS-C in OpenLayers


Bitcoin fees as of 2017-10 range from $3-$10 to send. How is this going to be sustainable with an increasing price?

Question: Sending anything less than $10 is not feasible if the bitcoin fees are greater than $3. As the Bitcoin price increases to say $10,000. The fees would be much higher. And since fees cannot be lowered below .0001, how is that going to scale bitcoin in the future with an ever increasing price?
Comment: [Sidechaining](https://github.com/bitcoinbook/bitcoinbook/issues/332#issue-231239711) is one possibility.
Comment: Now it's 25$ per transaction
Answer:
And since fees cannot be lowered below .0001, how is that going to scale bitcoin in the future with an ever increasing price?

As demand for block space increases, it is anticipated that less valuable transactions will be moved off-chain to use solutions such as the lightning network.
Comment: Less value of say $50? when fees might be $10? $50 is alot of money to many people. So your saying Bitcoin is going to be used only for really large value of $10,000 or more of money then?
Comment: Well, if you're going to send a transaction worth $50 dollars, you may set a low out-of-band fee and wait for confirmations so as long as you're patient. Otherwise, if speed and low-fees is something you're optimising for then you should an off-chain solution like Lightning.
Comment: @Patoshi by using the lightning network you are still using bitcoin...
Comment: with the lightning network. my understanding is that you have to first send your coins to a new address to get it "time-locked" then you can transact on the lightning network. is this correct?