How to create an image of maximum pixel values from an input layer-stack image in ERDAS Imagine?

Question: I have 12 MODIS images (one of each month). I want to create a single image having maximum annual pixel values for each pixel. I did layer stacking operation in Erdas Imagine 13, but how to extract the maximum pixel value ?
Comment: Are you open to a QGIS or ArcGIS solution?
Comment: It would be great if you can help me to solve it using ArcGIS.
Answer: You can also complete this analysis using ArcGIS or QGIS.  If you are using indices derived from MODIS, just add them into the queue.  Otherwise, you will need to separate the MODIS bands prior to adding them to the queue.

In ArcGIS, use the Cell Statistics (Spatial Analyst) tool.
In QGIS, use the r.series tool in the GRASS toolkit.


Add extra columns in the existing csv using jmeter

Question: I have a csv file contains around 1000+ rows. I need to add some extra columns in the existing file and also corresponding values of each row of information using jmeter script.Please can someone help me out in this.
Answer: You can use bean shell scripts to execute code that can manipulate CSV files. This question has an example how to change data in a CSV-file. You should be able to adapt it to adding data aswell.
JMeter is a load testing tool not a CSV manupilation tool. Use other tools to prepare your data. There are a lot of commandline tools you can use to do this, which you could call from within JMeter.
A example flow:

Initial testdata in prepped in a CVS-file
JMeter collects data in a file
Commandline/BeanShell script combines JMeter data with other data into file Y
JMeter uses new file Y todo something
More reporting

Your question is not detailed enough to really give a good examle, but hopefully this triggers you to come to a solution for your challenge.
Reads:

https://blazemeter.com/blog/queen-jmeters-built-componentshow-use-beanshell/


If the number of flights in the world exceed 2^24 how will ICAO allocate the address to the flights?

Question: What is the approximate number of commercial flights in the world as of now?
If the number of flights do exceed will they use the concept of frequency reuse in cell phones(dynamic allocation of addresses)?
Comment: ICAO addresses have nothing to do with flights, the are assigned to transponders.
Comment: Flightradar tracks less than 2^14 flights right now. That means traffic volume needs to increase by a factor of 2^10 before you run out of addressing space.
Comment: I voted to close this *"what if"* question. This is purely opinion based and there is no clear way to interpret what ICAO will do, or what technology may be relevant in the distant future.
Answer: Addresses are assigned to suitable equipped aircraft, not to flights. The total of 16 777 214 available adresses is distributed in blocks that are assigned to individual states. Block size depends on the size of the states, e.g. the US and Russian Federation have block with 1048576 addresses, while e.g. Grenada or Mauritius only have blocks of 1024 addresses.
The allocation of addresses is decribed in ICAO Annex 10, Vol. III, Chapter 9.
An extract of the relevant part can be found here.
As long as the addresses are just assigned to conventional Mode-S transponder equipped aircraft there should be sufficient free addresses. This could change if all airspace users would be assigned a unique address, e.g all drones participating in future UTM (urban or unmanned traffic management).


GWT - What's a good GUI editor for GWT in Intellij IDEA?

Question: The one that ships with IDEA is nothing more than a GWT project creation tool.  Is there a better plugin?  Is there a standalone GUI editor for GWT?
Answer: To answer your question directly, there is no such thing as a Intellij IDEA GUI WYSIWYG editor for GWT for the moment.
The most popular/feature complete WYSIWYG editor for GWT is Instantiations GWT Designer. It is available only for Eclipse though.
The GWT team also provide a list of tools and libraries.. It seem rather incomplete though as it does not list Ext-GWT and GWT-Ext libraries (the most popular widget libraries).
Be warned however that most WYSIWYG editor only support the basic widgets of GWT. If you have custom widget, you may not be able to use them in the editor.

[Edit] As of August 2010, Instanciation has been acquired Google
Answer: I've never used these personally but a few things I've found include:

http://www.gdevelop.com/ (extension to JDeveloper so it might not be appropriate for you if you're using IDEA and not wanting to download and use JDeveloper for your GWT project)
http://code.google.com/p/gwt-html-editor/
Comment: The HTML editor is a widget that is used to edit HTML in GWT. It is not a GWT Editor
Answer: You have here a pretty comprehensive list of GWT plugins/editors. Those are geared towards GWT projects creation, and not so much towards GUI.
However, you also have VistaFei (not very active at the moment, but worth checking out). It comes with its own eclipse distribution:
alt text http://blogs.zdnet.com/images/burnette_vistafei_control_grid_398.png

A visual Integrated Development Environment (IDE) for building AJAX apps based on Google Web Toolkit (GWT)  for all AJAX-enabled platforms. Applications are built by "drag & drop" from a Palette on the basis of What You See Is What You Get.
VistaFei is a visual feature-full Java development environment geared towards apps development based on GWT. Applications are developed in Java then compiled and debugged using GWT Compiler and Debugger, and launched to a browser all from within same environment.
Comment: Thanks, but I'm specifically looking for an IDEA plugin, not Eclipse.
Answer: Unfortunately, there really isn't one yet. We're going to have to wait until 2016 when Google takes over the world; everything will be so much easier then! ;)


Does the Oort cloud act as a kind of shield for the Solar System?

Question: Does the Oort cloud act as a kind of shield for the Solar System? When an interstellar object impacts the cloud, does its momentum get absorbed substantially?
Answer: No. The Oort cloud is a cloud of comets and icy asteroids, not a physical barrier. Just like everywhere in the Solar system, it is mostly made up a empty space, and wouldn't absorb the impact of an interstellar object in any meaningful way.
The Sun does protect the Solar System from things like the interstellar wind with it's magnetic field - this is called the heliosphere - but it's separate from the Oort cloud. The Oort cloud actually extends far beyond the heliosphere.
Answer: The Oort cloud is extremely diffuse, and while there are numerous small bodies, they're spread out over a very large region of space. Assuming that the outer Oort Cloud ranges from 20,000 AU to 50,000 AU and contains $\sim10^{12}$ bodies on the scale of a kilometer or greater, I find an average number density $n$ of 0.002 objects per cubic astronomical unit. Put another way, there would be two of these objects contained within a cube with sides 10 AU across.
We can define an optical depth of sorts, $\tau$, as
$$\tau=n\sigma l$$
with $\sigma$ the cross-section of the two objects and $l$ the thickness of the cloud. Assuming that $\sigma$ is on the order of maybe a few square kilometers (probably an overestimate) and that $l$ is 30,000 light-years, we find that the optical depth of the outer Oort cloud is $\tau\approx10^{-14}$ (a bit lower, but I've rounded up). The probability of an incoming body colliding with an Oort Cloud object is then
$$P=1-e^{-\tau}\approx0$$
The upshot is that no, the Oort Cloud doesn't act as a shield, as it's extremely unlikely that an interstellar interloper would be stopped.


What is the behavior of the argument of Riemann's Zeta function on other verticals inside the critical strip, apart from the critical line?

Question: What is known about the behavior of the argument of Riemann's Zeta function on other verticals inside the critical strip  apart from the critical line ? Are there any omega type theorems in this case, as is the case for $S(t)$ ? To be specific, for example, what is known about the density of sign changes of the argument of Zeta on the vertical $Re(z) = 0.8$ ?
Answer: I'm not sure what sign changes are in this context, as there is no simple multiplier which forces the zeta function to be real on this strip. Instead the argument is going to be moving around in the circle.
However, for most versions of this question, a positive answer is going to follow from the result of Bagchi (exposited in Chapter 3 of An Introduction to Probabilistic Number Theory by Emmanuel Kowalski), who showed that the values of the Riemann zeta function on random short intervals of a vertical axis in the critical strip away from the critical line are equidistributed according to a certain measure on the space of holomorphic functions (and even the same thing for discs in the critical strip).
Comment: From the universality property of $log(\zeta)$ we know that the argument of Zeta on $Re(z)=0.8$ fluctuates wildly,  but that doesn't answer my question about the density of sign changes @WillSawin
Comment: @CristianDumitrescu Oh, I see what you mean. You're taking the argument, as a real number, and examining when it's sign changes. But doesn't the (probabilistic) universality imply that the density of points where the sign changes is linear? The probability the argument has a sign change in an interval is the probability a random function (according to a certain distribution) has a sign change in the interval which is positive.

What is the behavior of the argument of Riemann’s Zeta function on other verticals inside the critical strip, apart from the critical line?


Paypal payment page credicard option not showing in webview android

Question: I have designed one page in php and added option to pay with creditcard and its working fine in iphone,but not showing creditcard option in android webview
I have added SOLUTIONTYPE=Sole and LANDINGPAGE=Billing
so how to fix that?
some where i have read like : "In order for SOLUTIONTYPE=Sole to work, you must have 'PayPal Account Optional' set to 'On' with the 'Website Preferences' section of your PayPal account.
Profile > My selling tools (or: My selling preferences) > Website Preferences > Update > PayPal Account Optional: On." but am using sandbox so how to set that?
Answer: Go to Developer.PayPal.com > log in > Applications > Sandbox Accounts > Enter Sandbox Site > log into your sandbox account. Then follow the steps you provided to turn on account optional on.


(Real Analysis) If a series converges absolutely, then any rearrangement of this series converges to the same limit. Why is the following proof valid?

Question: The following proof is from Stephen Abbott's Understanding Analysis 2nd edition, page 75.
I have put in bold the assumption which I don't understand.
Proof: Assume $\sum\limits_{k = 1}^{\infty} a_k$ converges absolutely to $A$, and let $\sum\limits_{k = 1}^{\infty} b_k$ be a rearrangement of $\sum\limits_{k = 1}^{\infty} a_k$. Let's use $s_n$ to denote the partial sums of the original series and $t_m$ for the partial sums of the rearranged series. Thus, we want to show that $(t_m) \to A$.
Let $\epsilon > 0$. By hypothesis, $\boldsymbol{(s_n) \to A}$, so choose $N_1$ such that $|s_n - A| < \frac{\epsilon}{2}$ for all $n \geq N_1$. Because the convergence is absolute, we can choose $N_2$ so that $\sum\limits_{k = m + 1}^{n} |a_k| < \frac{\epsilon}{2}$ for all  $n > m \geq N_2$. Now take $N = \max \{N_1, N_2\}$. We know that the finite set of terms $\{a_1, \ldots, a_N\}$ must all appear in the rearranged series, and we want to move far enough out in the series $\sum\limits_{n = 1}^{\infty} b_n$ so that we have included all of these terms. Thus, choose $M = \max \{f(k) : 1 \leq k \leq N \}$.
It should now be evident that if $m \geq M$, then $(t_m - s_N)$ consists of a finite set of terms, the absolute values of which appear in the tail $\sum\limits_{k = N + 1}^{\infty} |a_k|$. Our choise of $N_2$ earlier then guarantees $|t_m - s_N| < \frac{\epsilon}{2}$, and so
$|t_m - A| = |t_m - s_N + s_N - A| \leq |t_m - s_N| + |s_N - A| < \frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon$ whenever $m \geq M$.
My Question: Why does it say "By hypothesis, $(s_n) \to A$"? I thought we are assuming the series converges absolutely to A. In other words, we are assuming that $\sum\limits_{k = 1}^{\infty} |a_k| = A$, not that $\sum\limits_{k = 1}^{\infty} a_k = A$, right?
Previously, in the book, we only proved that if a series converges absolutely, then the original series converges as well (Absolute Convergence Test). We didn't show that if a series converges absolutely to some specific limit A, then the original series also converges to A. Is it actually true that if a series converges absolutely to A, then the original series also converges to A?
Comment: Isn't it apparent from the text that *"$\sum_{k = 1}^{\infty} a_k$ converges absolutely to $A$"* means that $\sum_{k = 1}^{\infty} a_k$ converges absolutely,  and $\sum_{k = 1}^{\infty} a_k = A$?
Comment: @MartinR The definition of an absolutely convergent series in the book just says "If $\sum\limits_{k = 1}^{\infty} |a_k|$ converges, then we say that the original series $\sum\limits_{k = 1}^{\infty} a_k$ converges absolutely." Where do we get $\sum\limits_{k = 1}^{\infty} a_k = A$ from this definition?
Answer: You are misunderstanding the meaning of "the series converges absolutely to $A$". It means two things:

the series $\displaystyle\sum_{k=1}^\infty a_k$ converges and its sum is $A$;
the series $\displaystyle\sum_{k=1}^\infty|a_k|$ converges.
Comment: That is the usual definition of absolutely convergent series. But note that when we say that a series $\displaystyle\sum_{k=1}^\infty a^k$ converges to $s$ what we mean is that $\displaystyle\sum_{k=1}^\infty a^k=s$.
Comment: Also, take a look [here](https://math.stackexchange.com/questions/2244440/definition-of-series-converging-absolutely-to-a-real-number).
Comment: Yes, if $\displaystyle\sum_{k=1}^\infty|a_k|=A$ and $\displaystyle\sum_{k=1}^\infty a_k=B$, we say that $\displaystyle\sum_{k=1}^\infty a_k$ converges absolutely to $B$.
Comment: The definition of an absolutely convergent series in the book just says "If $\sum\limits_{k = 1}^{\infty} |a_k|$ converges, then we say that the original series $\sum\limits_{k = 1}^{\infty} a_k$ converges absolutely." Do you know of another definition somewhere online I can see?
Comment: Okay, thank you. What if we had the case where $\sum\limits_{k = 1}^{\infty} |a_k| = A$ but $\sum\limits_{k = 1}^{\infty} a_k = B$? Would we then say $\sum\limits_{k = 1}^{\infty} a_k$ converges absolutely to B, in this case?
Comment: In my previous comment, we also have $A \neq B$, just to clarify.


Equator water pipeline flow at sea level?

Question: If a water pipeline was built at sea level eg. Gulf of Mexico and the other end was at sea level in southern Chile, then the pipeline was primed with pumps, would the water then gravity feed and flow on it's own due to the weaker gravity at the equator and the equatorial bulge making sea level higher and further from the centre of the earth? (Eg. Sea level at the poles is 21km closer to the centre of the earth compared to the equator).
Comment: Related: https://physics.stackexchange.com/q/8074/2451
Answer:
Would the water then gravity feed and flow on it's own due to the weaker gravity at the equator and the equatorial bulge making sea level higher and further from the centre of the earth?

No. You are using the wrong metric. The correct metric is potential energy rather than force. To first order, sea level is a surface where potential energy due to the gravitation and centrifugal forces are constant. While other factors do come into play, these are small. For example, sea level on the east and west coasts of Panama differ by about 20 centimeters due to different densities of Caribbean versus Pacific waters and different tides. But these are small effects. The largest effect is that potential energy at sea level is more or less the same across the globe.
Comment: In addition to the 21KM equatorial bulge sea level difference (from the centre of the earth), apparently sea level can vary up to 300 feet in different areas ( https://www.johnenglander.net/sea-level-rise-blog/sea-level-not-the-same-everywhere-up-to-300-foot-variation/ ). I've also seen renders of how our oceans would look if the earth where to stop spinning - the ocean runs away from the equator to form two oceans, one at the North Pole and one at the South Pole. National Geographic also remark "sea levels are slightly higher in equatorial regions than near the poles." -NG Encyclopaedia entry


Why I can't cut there with the knife tool, I want to make a quad out of this n-gons

Question: Why I can't cut there with the knife tool, I want to make a quad out of this n-gons
Comment: You question is not clear
Answer: You can Cut Trough by pressing Z while knifing

Allow the Cut tool to cut through to obscured faces, instead of only the visible ones.

or using Knife selection Shift-K (by default)

Activates the knife with another set of options so only selected faces are cut and Cut through is on by default.

Knife Tool
Answer: The issue seems to be because the face is obstructed by other faces.
Try to hide all other faces by pressing Shift+H,
This will hide all faces, now you should be able to cut it easily, I suggest you to turn on vertex select mode to do so as you will see the vertecies more easily.
To unhide it all you press alt+H


When Eigenfunctions/Wavefunctions are real?

Question:
When the Hamiltonian is Hermitian(i,e. beyond the effective mass approximation), generally under which conditions the eigenfunctions/wavefunctions are real?
What happens in 1D case like the finite quantum well symmetric with respect to the origin might be an example. any general rule? further generalization into 2D case?
Comment: The two subquestions are essentially Problem 2.1b and Problem 2.1c, respectively, in Griffiths, _Intro to QM._ More on Problem 2.1: http://physics.stackexchange.com/q/44003/2451 and links therein.
Comment: The answer to 1 actually depends upon how you define reality structure on the complex space of states. One can always choose a basis of eigenstates of the Hamiltonian and call them real.
Comment: Sorry, now i understand that the question is not that trivial since you are asking about reality of wavefunctions (i.e. position representation of eigenstates) and not the eigenstates.
Answer: All bound states can typically be chosen to have real-valued wavefunctions. The reason for this is that their wavefunction obeys a real differential equation,
$$
-\frac{\hbar^2}{2m}\nabla^2\psi(\mathbf r)+V(\mathbf r)\psi(\mathbf r)=E\psi(\mathbf r)$$
and therefore for any solution you can construct a second solution by taking the complex conjugate $\psi(\mathbf r)^\ast$. This second solution will either be

linearly dependent on $\psi$, in which case $\psi$ differs from a real-valued function by a phase, or
linearly independent, in which case you can "rotate" this basis into the two independent real-valued solutions $\operatorname{Re}(\psi)$ and  $\operatorname{Im}(\psi)$.

For continuum states this also applies, but things are not quite as clear as the boundary conditions are not invariant under conjugation: incoming scattering waves with asymptotic momentum $\mathbf p$, for example, behave asymptotically as $e^{i\mathbf p\cdot \mathbf r/\hbar}$, and this changes into outgoing waves upon conjugation. Thus, while you can still form two real-valued solutions, they will be standing waves and the physics will be quite different.
In the second case, when you have a degeneracy, the physical characteristics of the real-valued functions are in general different to those of the complex-valued ones. For example, in molecular physics, $\Pi$ states typically have such a degeneracy: you can choose

$\Pi_x$ and $\Pi_y$ states, which are real-valued, have a node on the $x$ and $y$ plane, resp., have a corresponding factor of $x$ and $y$ in the wavefunction, and have zero expected angular momentum component along the $z$ axis, or
$\Pi_\pm$ states, which have a complex factor of $x\pm i y$ and no node, and have definite angular momentum of $\pm \hbar$ about the $z$ axis.

Thus: you can always choose a real-valued eigenstate, but it may not always be the one you want.
Answer: In addition to Emilio's great answer, and in answer to your second question: Specifically in 1D potential problems (i.e. $\hat H = \frac{1}{2m} \hat p^2 + V(\hat x)$), all the bound states can simultaneously be made real.  This is because of the theorem that bound states in 1D are non-degenerate; then, $\psi$ and $\psi^*$, which are both solutions in any dimensionality, must be linearly dependent.
The situation is different if you have a magnetic field; then the prescription ("minimal coupling") is to replace $\hat p \gets (\hat p - e A(\hat x))$, which results in a complex Hamiltonian ($A$ is the vector potential).
Also, the argument above holds for a "well-behaved" potential; see http://arxiv.org/abs/0706.1135 for a modern take on that.
Finally, regarding your comment about a band-structure calculation: I am not sure this is what you mean, but, at least in the context of certain codes, you will often hear it said that a calculation for a centrosymmetric structure without spin-orbit coupling is "real", but this does not mean that the true eigenfunctions $\psi_{nk}$ are real-valued (remember, they contain a plane-wave factor $e^{ikr}$).  Rather, the coefficients in the basis used for the calculation can be chosen to be real.


What are the syllables in "photography"?

Question: How come every website I could find is saying that syllables in "photography" are pho-tog-ra-phy? Shouldn't it be pho-to-gra-phy? Where did that "tog" come from?
Comment: Are you asking about syllables (pronunciation) or hyphenation points (writing)?
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Comment: Are you asking about the word or its spelling?
Comment: I really don't think hyphenation is anything to do with what the OP is asking about. I had an answer all ready to go right as this was closed.
Comment: @Tetsujin There you go. I would like OP to clarify exactly what they're asking, but I suspect it's pronunciation rather than hyphenation, and the answer will be phonemic.
Comment: Is it "every website"? Maybe you meant dictionary? In any case, please include the name and link of at least one of those websites that breaks *photographer* in the way you claimed. I have voted to close because your question does not cite any sources, I don't see why anyone has to look for dictionaries/sites that syllabize it as *pho-tog-ra-phy* is
Comment: @Tetsujin I've voted to reopen.  I am eager to read your answer.
Comment: @phoog - I hope it's saved it in some accessible form. I'm under 10k on here so I can't see a darn thing :\
Answer: I'm assuming you are confused by the fact that because we say 'photo' we should then just tack on 'graphy' without changing the pronunciation of 'photo' - so you would arrive at 'photo graphy?
As with many combination words this is not actually true, the emphasis and stressed syllable moves. Similarly with many words suffixed by -ography, -onomy, -ology, the stress moves to the first 'o' of the suffix.
Ge 'og raphy, gastr 'on omy, bi 'ol ogy etc.
This gives us a change from the expected 'photo graphy to conform to this rule and we get pho 'tog raphy. Really the 't' could belong to either group, as you can't stress a consonant in the same way, but a native would perceive 'tog' to be the entire emphasised syllable.
Pho 'to graphy, however, could push the perception back towards our initial misconception of 'photo graphy, with a longer 'o' and so wouldn't convey the correct pronunciation so well.
Using 'tog' [which is a word all of its own, describing the heat retention of clothing, duvets etc] and has a definite short 'o', as in 'hot'. 'To' alone may be perceived as in 'toe', especially as our root word is pronounced 'toe', which leads us astray again.
Answer: If you are asking how dictionaries break this into syllables for the purpose of pronunciation, according to several dictionaries, it's pho-to-gra-phy for American English, and your intuition is absolutely correct. In American English, it is only broken into syllables as pho-tog-ra-phy for the purpose of hyphenating the word at the end of the line. In British English, some dictionaries syllabalize it for pronunciation as pho-tog-ra-phy. The difference between these is that the o is "short" or "lax" in British English, meaning it must be followed by a consonant and "long" or "tense" in American English, meaning it need not be followed by a consonant.
These two syllabifications, for pronunciation and hyphenation, don't always agree, although they often do, and you shouldn't use the one of these syllabifications for the purpose of purpose of the other.
See Merriam-Webster Dictionary, that gives the pronunciation (fə-ˈtä-grə-fē) [using its own pronunciation symbols, not IPA].
and Cambridge Dictionary, that gives the American pronunciation /fəˈtɑː.ɡrə.fi/, but the British pronunciation /fəˈtɒɡ.rə.fi/, with the syllable tog, as you were asking about.
Possibly you are asking about how to split the word into syllables so as to hyphenate the word at the end of a line. The rules for hyphenation in English are rather arcane and differ between England and the United States; they usually reflect the pronunciation, but don't always.
Here is a question that gives the rules for hyphenating syllables at the end of a line. I assume that the rule which makes the hyphenation fall after tog is

Never break a word after a short vowel in an accented syllable (rap-id but stu-pid).

Hyphenating the word after the "o" would be justified by the rule

Break words at morpheme boundaries.

The vowel in tog is the short vowel /ɒ/ in British English, but is the long vowel /ɑː/ (or sometimes /ɔː/) in American English. However, for purposes of hyphenation, American dictionaries often seem to treat the letter "o" as a short vowel when it's not pronounced /oʊ/. (As I mention above, the rules are arcane.)
Comment: Are you sure your first paragraph is the right way round? Perhaps that version is American; I *pronounce* "photog-" but *hyphenate* as "photo-". Perhaps I'm just weird.
Comment: @Andrew: You're right. The first paragraph is the right way round for American English, but at least two online hyphenation programs give the syllabification pho-to-gra-phy for British English. I assume because they're using the rule *Break words at morpheme boundaries*,
Comment: @AndrewLeach, it's not just you. I'm American (grew up in Georgia, but parents were born in Ohio), and I also would _pronounce_ it as "photog-", but _hyphenate_ it like you're saying.
Answer: I think pronunciation is the answer. We say pho 'tog ra phy. A vertical line, aka a stress mark, precedes the stressed syllable.


Allow RPC connections from the internet to make RPC calls from Lambda?

Question: I am trying to make RPC calls to my node from an AWS lambda function. Lambdas do not have a fixed set of ip address ranges. I know I can use a NAT gateway on AWS to give my lambdas a static ip, but this is expensive. In order to allow inbound RPC connections from my lambdas, would it be ok to set rpcallowip=0.0.0.0/0, so long as I keep my rpcuser and rpcpassword safe? Bear in mind, I do not use my node as a wallet.
Answer:
In order to allow inbound RPC connections from my lambdas, would it be ok to set rpcallowip=0.0.0.0/0, so long as I keep my rpcuser and rpcpassword safe?

The Bitcoin Core RPC interface is not designed to be accessed by untrusted networks. It's not secured against DoS attacks, nor does it have any encryption, so any network operator between the client and the server can read the username/password off the wire.
You should only ever set rpcallowip to local networks.
If you need to be accessible from elsewhere, use a VPN, or a tunnel like stunnel.
Answer: Yes, it'd be perfectly fine.
Because, as you already know, you would restrict node access to both the desired AWS Lambda facilities and to any other AWS facilities you'd be using to query your AWS EC2 node (e.g. some other EC2 instance) by using AWS "security groups".
The rest of the universe, including the rest of the AWS-verse, won't be able to query your EC2 node, as long as you code and assign your "security groups" correctly, and as far as there is no security issue at AWS (note this includes many things, like black-hat honeypots, inside jobs by rogue-y employees, govt mandates, any sort of bad stuff).
You can use AWS for relying and exploring transactions, but remember, not your hardware, not your coin.
Comment: Could you please elaborate a bit on how I could restrict node access to my desired AWS facilities using security groups?
Comment: I'd rather not, it's been half a decade since I last used Lambda to process data coming from EC2, RDS...


Is there any Agents of SHIELD and Thor: The Dark World crossover?

Question: I'm watching Agents of SHIELD at the moment, and I am wondering if there is any cross over between it and Thor: The Dark World. Is there a particular episode that ties in to the film or any spoilers which would result from watching out of order?
Comment: Not specifically Thor Dark World but Lady Sif does show up in one or two S.H.I.E.L.D episodes.
Answer: Yes.
In a press release published two days ago, Marvel gave some background for "The Well", which broadcasts on 19th November:

After Marvel's Thor: The Dark World hits theatres1 November 8, Marvel's Agents of S.H.I.E.L.D. will feel the repercussions November 19 with an all-new episode!

The official synopsis is:

In the aftermath of the events chronicled in the feature film Marvel's Thor: The Dark World, Coulson and the Agents of S.H.I.E.L.D. pick up the pieces—one of which threatens to destroy a member of the team.

The guest cast (in the press release) doesn't list any of the major actors or actresses from Thor, so it seems any crossover will only be in events, not in characters.

1 This is the US release date; it was released internationally on 30th October.
Comment: For UK readers: this episode will be broadcast on Channel 4 on 22nd Nov. When, ironically, I'll be in the States. Source: [https://twitter.com/MarvelUK/status/398068639472943105](https://twitter.com/MarvelUK/status/398068639472943105)
Comment: This episode has an Asgardian plot in which Thor was mentioned several times. No guest appearances from actors in the Thor movie.
Answer: Given that Thor: The Dark World releases November 8, 2013 (in the USA). If they were going to film a crossover event, they would have to be filming it right now.
S01-E04, The Asset, and S01-E05, Girl in the Flower Dress are already in the can. I think it would be difficult to put out something that could cross over in a timely fashion. I also don't think that is the nature of the show based on an interview with executive producer, Joss Whedon.
Interview Reference: TVGuide.com
Joss Whedon said in a recent interview regarding the Dark World:

When Marvel's Agents of S.H.I.E.L.D. comes to ABC this fall, fans of The Avengers — and the films that preceded it — will feel right at home. But how much will that world cross over with Marvel's upcoming Phase 2, which includes Captain America: Winter Soldier, Thor: The Dark World and The Avengers movie sequel?
"There will be as much [crossover] as we can allow," executive producer Joss Whedon said at the Television Critics Association fall TV previews on Sunday. "We're still working that out. The important thing is it's a fun opportunity. It's not the reason for the show. We don't want to be an Easter egg farm. This show has to work for those people who haven't seen those movies and won't be seeing them."

(Emphasis mine.)
With that said, it sounds as if you will be able to watch Agents of SHIELD without fear of missing something necessary to watch any of the upcoming movies. Like comics, these two productions appear to be trying to be independent, while sharing mutual elements, in this case, the organization of SHIELD.
Comment: @Monty129 They've referenced the Battle of New York once or twice, too.  The main point is that it's not spoilery and doesn't lock out anyone who doesn't know the reference (Extremis included).
Comment: They did incorporate one element form the Phase 2 films in the premiere episode an individual was infected with a modified version of the Extremis package seen in Iron Man III.  I think that was probably the easiest to incorporate post Avengers as IM3 was completed about the same time S.H.I.E.L.D. began production.


Replacing 39 year old wall switch

Question: Replacing 30 year old light switch with new light switch assembly need
help with the wiring identification (-; thought this would be similar to replacing outlets but all the wires are black so I am at a loss.  Thank you.  New switch ..basic from Home Depot —one green two brass one black screw
Comment: Switch you bought is not basic - it's a "3-way" - you can use it as a basic switch by ignoring one brass screw, but it will make your wiring task more confusing (as a novice) if the old switch is not a 3-Way (and it appears not to be, though the picture is not great for being more than 99% certain)
Comment: There is no positive or negative in house wiring (it's alternating current), and it's almost certainly NOT the case that a black wire is ground; it is, as stated in the answer, very likely that the old switch has no explicit ground connection.
Comment: Thank you anyway I figured it out even though it was old one was positive one was negative one was the ground they were all black just pay attention to where they are when you disconnect them and it will make sense on the reconnect but always ask a professional LOL
Answer: Does not matter what color the wires are. With switches we see far more problems from people applying what they think they know about wire colors and the odd things that are common practice in switch wiring before the requirement to supply neutral to the switch came about. They unscrew everything and then can't make it work because they lost track of what went where.
All black is fine - just be sure to keep track of which black wires go where, and put them the same place on the new switch.
The old switch may not have a grounding (green) screw.
The old switch appears to be a two-terminal switch with one wire on one terminal and two wires on the other terminal. Mark, tape, or just don't disconnect all the wires so you keep track of which two go together.
Connect one wire to the black screw. (or one of the brass screws, but for the sake of a narrative that will work... lets stick with this.)
Connect the two wires to one of the brass screws. Leave the other brass screw empty, since you are replacing a two-terminal switch with a 3-way.
If you need to, connect a short wire to the two black wires that go together using a wirenut or approved splice block and connect that short wire ("pigtail") to one of the brass screws. This is better than using those "push-in" or "backstab" connections that your old switch seems to be wired with.
The green grounding screw should have a green or bare-wire pigtail attached that connects to the bare or green ground wires in the box, assuming you have ground wires (mid 1970's or 80's there should be.) If the box is metal, those should already be connected to the box, as well.
Comment: Ecnerwal is being too kind and not ranting about the backstabs. Don't use them, they have a long history of causing trouble. +1

Replacing 39 year old wall switch


Altium Designer - Disable components on the PCB editor

Question: What do I do so that only specified components are selectable, and the rest are non-selectable?
Answer: Use the "Locked" feature (check the "Locked" box in the component properties) for the components you don't want to be able to select.

Or, if you want most of your components to be locked and only unlock certain ones, you can select all components on the board, open the PCB Inspector, make sure that you only have Components displayed by clicking the text next to the "Include" text at the top of the inspector, and check the "Locked" box. This will lock all of the components. Then you can use the PCB List to unlock specific components.
Comment: Thanks! Is there also a way to make the unselected components greyed out? Such as when you use the search bar at the top right of the screen, and the selected net or component is colored while everything else is greyed out?
Comment: Yes, right-click an unlocked part and select "Find Similar Objects". Change the setting next to the "Locked" checkbox from "Any" to "Same". This will select all components that are not locked. Before clicking "Apply" or "OK", down at the bottom of the "Find Similar Objects" window change the dropdown from "Normal" to "Mask". This will mask out any objects that don't match your search criteria. Then click "OK".


Can COVID-19 affect a person a second time?

Question: I keep hearing people are recovering from COVID-19 virus. Is there any chance that same person can become infected with COVID-19 for a second time?
Comment: Please see [here](https://biology.meta.stackexchange.com/questions/4035/information-about-coronaviruses/4036#4036).
Comment: Does this answer your question? [Human Immune Response to COVID-19 Virus](https://biology.stackexchange.com/questions/90732/human-immune-response-to-covid-19-virus)
Answer: Short answer: Although there are some reports on this, it is pretty unlikely. It is more likely that patients where released too early from hospital, developed further symptoms later on and got worse, was re-hospitalized, tested again for SARS-CoV2, which was positive and counted as re-infected.
Another possibility is that a false negative test happened, when people got re-tested later the test was positive again and the patient was counted as re-infected. Given the rising number of cases worldwide this should become evident pretty soon, if this is a real problem and not an artefact. For the moment, I don't think there is enough evidence for the re-infection of the same patient in such a short time period. If this holds, future will tell.
Long answer: There is now an experimental paper, which infected rhesus macaques with SARS-CoV2, tested if the infection was similar to humans happening in the upper airways (which it was), and re-infected the animals after 28 days with a really high dose of virus (which is much higher than what comes around in our environment), with none of the macaques getting re-infected or showing pathological signs of the infection. See reference 1 for details.
This article has its limitations with small sample size and the general questions if the chosen animal model is really comparable with human.
Additionally it looks very much like that patients who are recovering don't shed infectious virus anymore. The PCR test however does not discriminate between infectious virus and plain virus RNA, so it is most like much longer positive than people are infectious. They also show the rapid appearance of specific antibodies, which would at least temporarily protect against a re-infection. See reference 2 for a nice summary and reference 3 for the original article.
References

Reinfection could notoccur in SARS-CoV-2 infected rhesus macaques
People 'shed' high levels of coronavirus, study finds, but most are
likely not infectious after recovery begins
Clinical presentation and virological assessment of hospitalized
cases of coronavirus disease 2019 in a travel-associated
transmission cluster

Edit (24.11.2021):
Being 1,5 years further into this pandemic there are clear signs now that reinfections are possible, although it was first thought it should not be a concern. There are a few reasons for this, mainly the occurence of new, much more infectious viral strains (Delta variant), waning of the immune respone (in vaccinated and also people who got infected), weak immune responses at all (reinfection probably occurs in connection with the Delta variant). Following reference 4 (thanks to @bob1 for the hint) below, it seems that reinfections are less severe than primary infections.
For more information please have a look into the additional references below. This shows very well the problem with an unknown pathogen and the rapidly ongoing research on it.
Added references (24.11.2021):

Risk of SARS-CoV-2 reinfection after natural infection
The durability of immunity against reinfection by SARS-CoV-2: a
comparative evolutionary study
Prospects for durable immune control of SARS-CoV-2 and prevention of
reinfection
Severity of SARS-CoV-2 Reinfections as Compared with Primary
Infections
Comment: Update: Coronavirus reinfection has been reported in India for the first time. See this news: https://www.google.com/amp/s/www.timesnownews.com/amp/india/article/first-case-of-coronavirus-reinfection-reported-from-bengaluru-27-year-old-woman-affected/648563
Comment: And in US: https://indianexpress.com/article/coronavirus/first-us-covid-19-reinfection-case-identified-in-nevada-study-6574428/
Comment: @NilayGhosh I have read newspaper articles about this as well, but I would like to see a scientific paper first, before I update this answer. I am following this :-)
Comment: Good answer.  There's an interesting paper in [NEJM today](https://www.nejm.org/doi/full/10.1056/NEJMc2108120) on severity of infection in re-infected patients, that might be worth including.
Comment: @bob1 Thanks for the hint, this looks indeed interesting. I will include this as well.


How to use SwiperJS (npm package) in VueJS (CDN)

Question: I have basic problem, but i don't know, how to solve it.
I am using Twig templates, where SwiperJS is installed via npm. I import all Swiper dependencies which I needed, to app.js. Where is no Vue, swiper works absolutely fine.
BUT on one Twig template I am using VueJS via CDN for entire page. Vue is working fine, all Swiper styles working fine too, but scripts for swiping not.
I know the problem - this swiper is #app (it has to be there) and thats the reason, why is it not working.
Can some help me, how to solve this?
FYI I cant use import.
Answer: In my opinion on this page you can try to use vue-awesome-swiper whcih will not create problems.
https://www.npmjs.com/package/vue-awesome-swiper


Is there a gpio readall utility for Pi5?

Question: Is there a workable replacement for the gpio readall utility for Pi5?
Answer: When wiringpi was deprecated I wrote a replacement gpioreadall to display gpio status.
This came in a few versions which used a number of gpio libraries none of which work on Pi5.
I wrote a library independent version using the raspi-gpio utility which worked on Raspberry Pi OS but did not work on Bookworm.
I then wrote a version using the pinctrl utility to work on Bookworm - expecting this to work on Pi5. For some inexplicable reason the Pi5 version of pinctrl differs from the Pi4 version!
I have now updated this to work on Pi4/Pi5 and also works on earlier models/OS.
The Pi5 version is slightly different (because it doesn't know mode or value of unallocated pins which are show as blank).
The code can be downloaded from GPIOreadall


Saying Good Morning to Your Boss

Question: So for the past 2 1/2 years while working in a law firm, I would enter my boss's office on a daily basis and say, "Hello or Good Morning" only to be stared at (like a deer in the head lights)and ignored.  I guess in my simple mind, I thought that this was the proper thing to do--Smile and greet your boss.  I wasn't really looking for any acknowledgement, but it would have been nice to hear "Hello or Good Morning" as well once in awhile. Not sure what I am doing wrong. It is and has been my belief that my boss does not like me.
Comment: What is your question?
Comment: How on earth did you manage to keep this up for two and a half *years* before realising that maybe you're doing something wrong?
Comment: your boss either doesn't like you/ thinks you're a nut/ doesn't actually know who you are or is a bit miffed that you're disturbing him/her
Comment: 2.5 years...kind of late now. Doesn't really matter. I would stop just because it's obviously not having the desired effect. I would not say he does not like you though.
Answer: It's certainly courteous to greet your boss when you meet them in the morning, but depending on the cultural norm where you work, it may not be typical to enter their office to do so.
In the US, for example, I wouldn't disturb my boss in his office in the morning.
Your boss's response after the first few days you did this should have been a clue it wasn't as appreciated as much as you expected. I'm surprised you stuck with it for two and a half years.
Comment: @EdHeal Courteous to greet, yes. But some may see a person coming uninvited into their private space (i.e. office) as a little intrusive.
Comment: Where I work, it's normal to say "good morning" to anybody you meet while walking to your desk, and anybody else already at nearby desks.  But I wouldn't go out of my way to visit the boss' office just to say "good morning".
Comment: Now I imagine you have to worry that if you stop abruptly your boss is going to assume you don't like *him* anymore!
Comment: Surely it is courteous to greet anybody. Small talk is the lubricant of life
Answer: Some people are morning people. Some people are best in the afternoon. Some people are weird and are best in the night.
Your boss is probably an afternoon person. So do not take it personally.
Comment: I agree. I'm a morning person but after a few months of getting one or maybe two replies from a chirpy "Good morning" when I get to work, I gave up. Sometimes it is not you, it is just not their style to partake in a morning greeting.
Answer: Different people, different offices, different habits/customs. I know people who firmly believe no morning can ever be called good if they're awake ... and I know people who would simply be amazed that you went out of your way to be polite to the boss. Luckily I've never known anyone who would be offended by a Lowly Peon daring to intrude upon the boss's attention.
You're not doung anything wrong;  at most unexpected. Don't worry about it until/unless there's a complaint.
But also, you need to accept that some people don't see the point in responding to ritual greetings. It doesn't mean they're annoyed, just that it isn't their style. You need to decide whether to continue while knowing you won't be answered, or stop if the lack of answer bothers you.
Remember, if this is the thing you consider worth asking for advice on, that implies your job is pretty darned good in all other ways. Relax and focus on something more productive.

Saying Good Morning to Your Boss


Exothermic heat release mechanism in gases

Question: How is heat released when bond formation occurs in gases? For example, when atomic oxygen and molecular oxygen combine to form ozone?
Answer: (This is not an answer. I cannot comment because I don't have enough reputation).
Have you tried googling heat release chemical bond? See this result, for example.
Answer: The short answer is that when energy is released in any form, it will always find a way to become heat - in other words, spreading itself around all the atoms nearby.  In a gas this process takes a little longer, but still occurs.

The stable state of oxygen is of course $O_2$, so it's not the formation of ozone itself that introduces energy into the system, but the photon from the sun that created the lone oxygen atom.
Nevertheless, the reaction of an oxygen atom with an oxygen molecule to form ozone is indeed exothermic.  The result will be an ozone molecule that is excited in some way - rotating, vibrating or with electrons in excited states.  Sooner later this molecule will get rid of most of its excess energy in some way.  It might emit a photon, or alternatively it might de-excite by collision with another molecule, causing an excitation in that molecule, or simply giving the second molecule a kick that gives it translational kinetic energy.


Single Gateway for multiple gRPC Services

Question: Currently I have a monolithic gRPC server that implements several service stubs that are utilized by a large amount of internal client programs (none of this is public internet facing).
As our requirements have gotten more complex and more backends are being accessed by the monolithic gRPC server, I am looking to break them out in a more logical way. This would separate the single server into multiple servers that work with a particular backend, as opposed to one serer that rules them all.
The challenge I am facing is that I don't want to refactor each client to be aware of the specific server that is implementing its service.
I am looking at how others have solved this problem and I have looked at containerizing these applications and utilizing something like Kubernetes to handle the coordination and providing a gateway, but this seems like overkill for the scale of what we are working with. (We have a small development team and the additional overhead/cost of managing Kubernetes is not worth it).
Another thought was to create a gRPC Gateway from scratch that basically just forwards the requests/responses to the appropriate servers. But before I do that I wanted to see if anyone else had similar experiences?
Answer: Not sure if this should be an answer, or just a comment but here goes.
Internally, gRPC uses HTTP/2, and at least nginx supoprts being a reverse proxy in front of your server. The clients see a single server, while internally you split it up however you wish.
Searching for "gRPC reverse proxy" gives a number of hits for existing software, nginx is just the solution I am aware of.


Can we have questions which ask for proofreading?

Question: Like there is codereview.see,  can we have proofreading  questions on this site?
Comment: There are other sites specifically for proofreading,  like Lang-8. Proofreading doesn't really fit the question and answer format of Stack Exchange sites, because not too many folks benefit from a particular proofreading question.
Answer: No, at this point in time, proofreading questions are not generally OK here.
One of the "off-topic" reasons on this site is "Proofreading"

Proofreading questions are off-topic unless a specific source of concern in the text is clearly identified. See: Alternative websites for proofreading

Meaning you can't just paste a block of text and ask us to "fix" it for you.
If you have a specific question about your text that you'd like to address, that's different.
I think the reason this could fall under off topic is that it's "primarily opinion based" or "every answer is right".
How to say something correctly is, to some degree, a matter of choice. English is complicated but that doesn't mean there aren't myriad ways to say the same thing.
You could have two or three completely acceptable answers where none of them are actually the same.
Comment: This only partly addresses the "why not" of this matter. There's another pragmatic reason, too: as soon as we start allowing proofreading questions, we open the floodgates. Anyone getting ready to submit a résumé, turn in a homework assignment, publish a blog post, write a proposal, or compose a love letter or apology can come by here first, post the text, and make a "simple" request: _Can you suggest any improvements?_ Even though we have plenty of folks here who like to be helpful, I don't think we want ELL to become inundated with free proofreading requests.
Comment: @DogLover You're always welcome to recommend one on [Area 51](http://area51.stackexchange.com/). Though it seems that a proofreading site could lead to a lot of opinion-based questions.
Comment: I wish there were a proofreading site on SE. I love correcting grammar!
Comment: @Catija I have followed your advice and created a (likely controversial) [proposal](http://area51.stackexchange.com/proposals/90644/proofreading).
Answer: I, personally, would have no problem with a question to proofread, as long as the text isn't too lengthy. Others, however, might object under any circumstances. 'Would someone proofread this text example for me?' would be a nonproductive question. 'What would be the correct tense for the verbs in this text?' is a better question because it addresses a specific topic.
Comment: Is a specific question about the grammar in an example really proofreading though? Maybe my definition of proofreading is a lot narrower than others', but to me there's a big difference between "I'm not sure I'm using the correct tense in this sentence" and "Please correct any mistakes in this sentence for me." Proofreading to me means that you think everything is correct and you'd like someone to verify it, so there's no real question or topic. Potentially the answer is simply "yes it looks fine" which isn't particularly useful to anyone else.
Comment: @Colleen - RE: _Proofreading to me means that you think everything is correct and you'd like someone to verify it..._ Yes, I agree, but it can also mean two other things: (1) the author is pretty sure it's **not** correct, but has no clue about where the errors might be, or (2) the author is thinking that it's probably grammatically correct, but could stand some polishing and improvement. I think all three of those situations call for prompt closure of the question, lest we become a free proofreading service.
Comment: This link addresses your question with some good answers & comments: http://meta.ell.stackexchange.com/questions/258/should-proofreading-questions-be-closed-as-offtopic?rq=1


Creating a generic, re-usable, Windows Phone 7 XAML form, and using it from a class library

Question: Ok, so I'm newish to Windows Phone 7/Silverlight programming, and started what I thought would be a fairly straightfoward process, and have unfortunately run into a (hopefully!) small issue.
Basically, I'm trying to create a generic XAML form, e.g., an "About.xaml" form which is standard to all applications in my application suite. The idea is that this "About" screen looks the same, behaves the same, only difference being a few fields (e.g., application name etc) which are populated by the calling application. Plus, because it's shared, any new features/bug fixes/enhancements benefit all apps (i.e., re-use etc). My initial thoughts are that this XAML form should 'live' in a class library, which can be referenced by the various applications.
I've created a sample solution with two projects to highlight the problem.

First off, I create a Windows Phone Panorama Application, called it "WindowsPhonePanoramaApplication1". Next, I create a Windows Phone Class Library, which I call "WindowsPhoneClassLibrary1".
In "WindowsPhoneClassLibrary1", I create a new form class of type "Windows Phone Portrait Page", and call it "About.xaml".
To recreate the problem, I picked any event, e.g., the "SelectionChanged" event for the list box on the first page of the Panorama (any old event will do, just need a means of calling "NavigationService.Navigate(...))

    <controls:PanoramaItem Header="first item">

        <ListBox Margin="0,0,-12,0" ItemsSource="{Binding Items}" SelectionChanged="ListBox_SelectionChanged">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <StackPanel Margin="0,0,0,17" Width="432">
                        <TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}"/>
                        <TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                    </StackPanel>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </controls:PanoramaItem>

In the code behind, I have the following code for the SelectionChanged event:
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    NavigationService.Navigate(new Uri("/AboutPage.xaml", UriKind.RelativeOrAbsolute));
}

When I run the application and click on any of the items in the listbox, the method RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e) is called, and the application stops at the Debugger.Break() line:

In the NavigationFailedEventArgs parameter, looking at the Exception object in there, the following error is shown:
{"No XAML was found at the location '/AboutPage.xaml'."}
    [System.InvalidOperationException]: {"No XAML was found at the location '/AboutPage.xaml'."}
    _data: null
    _HResult: -2146233079
    _innerException: null
    _message: "No XAML was found at the location '/AboutPage.xaml'."
    _methodDescs: {System.IntPtr[16]}
    _optionalData: null
    Data: {System.Collections.ListDictionaryInternal}
    HResult: -2146233079
    InnerException: Could not evaluate expression
    Message: "No XAML was found at the location '/AboutPage.xaml'."
    StackTrace: "   at System.Windows.Navigation.PageResourceContentLoader.EndLoad(IAsyncResult asyncResult)\r\n   at System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)\r\n   at System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(AsyncCallback userCallback, PageResourceContentLoaderAsyncResult result)\r\n   at System.Windows.Navigation.PageResourceContentLoader.<>c__DisplayClass4.<BeginLoad>b__0(Object args)\r\n   at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)\r\n   at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)\r\n   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)\r\n   at System.Del
egate.DynamicInvokeOne(Object[] args)\r\n   at System.MulticastDelegate.DynamicInvokeImpl(Object[] args)\r\n   at System.Delegate.DynamicInvoke(Object[] args)\r\n   at System.Windows.Threading.DispatcherOperation.Invoke()\r\n   at System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority)\r\n   at System.Windows.Threading.Dispatcher.OnInvoke(Object context)\r\n   at System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)\r\n   at System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)\r\n   at System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)\r\n"

I'm pretty certain the reason I get this error is because the "About.xaml" 'lives' in the class library "WindowsPhoneClassLibrary1", and not "WindowsPhonePanoramaApplication1" where the application is running from.
I have checked the XAP file that gets created for "WindowsPhonePanoramaApplication1", and sure enough it has the assembly "WindowsPhoneClassLibrary1.dll" contained within it. Also, I found a link on Jeff Prosise's blog, which highlights a way to navigate to a XAML form in an external assembly in Silverlight 4 (using the INavigationContentLoader interface), however Windows Phone 7 is based on Silverlight 3, and from searching the WP7 documentation, it doesn't appear to have that interface defined. I have had a browse of the URIMapping/URIMapper classes, but can't find anything obvious that would make the NavigationService look in the class library.
The question is, using Silverlight 3/Silverlight for Windows Phone 7, how do I 'tell' the "NavigationService" in "WindowsPhonePanoramaApplication1" to 'look in' the class library "WindowsPhoneClassLibrary1" for the "About.xaml" form? Surely, there must be some way of re-using XAML forms from a class library?
Also, if the above approach is simply the wrong way of going about achieving re-use of generic XAML forms, I'd be interested in any help/links that would point me in the right direction.
Thanks in advance for any help, it would be much appreciated...
Comment: Oops, should've mentioned, I'm using the [January 2011](http://www.microsoft.com/downloads/en/details.aspx?FamilyID=49b9d0c5-6597-4313-912a-f0cca9c7d277&displaylang=en)  installment of the Windows Phone Developer Tools.
Answer: Found the solution at this link, quite simple if you know the syntax :-)
In summary, the following worked for me:
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    NavigationService.Navigate(new Uri("/WindowsPhoneClassLibrary1;component/AboutPage.xaml", UriKind.Relative));
}


Why PathPing is faster than Tracert?

Question: I wanted to know why PathPing is faster than Tracert. I googled a lot but was not satisfied with the answers I found, most of the answers talked about its features but not about why it is faster than tracert.
Tracert works by incremental TTL and gathering response from every node until it reaches destination
But how does PathPing work?
Answer: Wikipedia goes into some detail:

PathPing is a network utility supplied in Windows NT, Windows 2000, Windows 2003, Windows XP and Windows Vista. It combines the functionality of Ping with that of Traceroute (in Windows: tracert), by providing details of the path between two hosts and Ping-like statistics for each node in the path based on samples taken over a time period, depending on how many nodes are between the start and end host.
The advantages of PathPing over ping and traceroute are that each node is pinged as the result of a single command, and that the behavior of nodes is studied over an extended time period, rather than the Ping's default sample of four messages or Traceroute's default single route trace.
The disadvantage is that, using the default settings, it often takes more than five minutes to produce a result.

...which suggests pathping is actually slower!
Answer: It isn't faster. PathPing does nothing more than combine the traceroute and ping methods in one utility, i.e. start pinging each node in the path once discovered.
In most cases the major amount of slowdown in either application comes from the process of name resolution rather than the actual tracing.

Why PathPing is faster than Tracert?


Django and angularjs storing api templates

Question: I am trying to build an angularjs, django application... I have seen examples that sores the templates in static folder. Do you think that is a good practice?
Django has template folders for visual stuff.
Is there a better way?
Answer: Yes. From the point of view of Django, AngularJS templates are static files. If you try to serve them as templates, then Django will attempt to parse the template syntax and all kinds of odd things will happen.


How can I determine the publishing point for streaming an HTTP stream to Adobe Media Server 5?

Question: I would like to stream a HTTP stream from VLC direct to Adobe Media Server 5, however I am unsure of the URL I should stream to. How can I determine the URL of the publishing point?
Answer: From the documentation, it appears that you need to use an rtmp capable encoder to send the stream to Adobe Media Server and that Adobe Media Server then shares it out as an HTTP stream based on the configuration of the publishing point.
It appears that
rtmp://ams-ip-or-dns/livepkgr/livestream?adbe-live-event=liveEventName
is the URL to stream to for a constant bit rate, but there are other options if you are using VBR or multi-rate streams.  You can get more details under the URLs for publishing and playing live streams over HTTP section of the linked documentation.


Is human zygote unicellular or multicellular

Question: Is the human zygote which is formed by fusion of sperm and egg a unicellular structure? Bcz at some places the 2 celled stage which is formed due to cleavage has been labelled as the zygote. So is the zygote 2 celled stage or the unicellular structure which is formed initially.
Comment: first three lines of this page. https://www.google.com/search?q=zygote&oq=zygote&aqs=chrome..69i57j69i59j69i60&sourceid=chrome&ie=UTF-8 The zygote's single cell ... closing question
Answer: A zygote is produced when the gametes, a sperm and egg cell, combine with each other. This is unicellular. That one cell then duplicates into two cells, and then four cells. People don't really have a need to name this stage, but anyone would understand it if you just called it two-cell or four-cell within the context of zygotic development. As more cells are created (16+), the solid mass of undifferentiated cells is called a morula. This occurs around 3-5 days after fertilization. This then becomes a sort of hollow sphere of cells. These cells are now called blastomeres and the whole structure is called a blastula. When you hear a cell name with "blast" in it, it typically means it is a precursor to some other type of cell. In this case, those 16 or so cells are the precursor to a future human's entire body.


How many data points for test set in a time series

Question: I have a monthly sales data set from 2018 January onwards. I would like to know from expert what is the optimum train test split and minimum train test split. Also to mention that my data includes 2020 year data where the sales have been influenced due to pandemic, and 2021 have been recovering year.
Comment: The word "optimal" suggests that you have some figure of merit that you're using to compare alternative split methods, but you do not mention any details about this in your post. Closely related, possibly a duplicate: https://stats.stackexchange.com/questions/14099/using-k-fold-cross-validation-for-time-series-model-selection
Answer: I am not aware of any theoretical work giving minimum or optimum train/test set splits for time series, and I doubt that such general guidelines could be given with any theoretical foundations.
Sales data frequently exhibit seasonality. So one reasonable split would be to hold out the entire last year as a test set, which still gives you more than two years to fit your models on (a good thing) and still allows you to analyze whether accuracy was systematically better or worse during certain parts of the year.
And as you write, the last two years have seen a big impact from COVID. I would say that any conclusions of the kind "method A outperformed method B in the test set, therefore we will use A henceforth" will be far more driven by COVID idiosyncrasies than by optimal or suboptimal train/test splits.
Answer:
You want to have as many data points in the test set as possible.

You also want to have as many data points in the training set as possible.

Given a constrain on the total amount of data points, increasing the data points in the test set will reduce the number of data points in the training set.
So you will want to look for an optimum.

Example/Illustration
Below is an example where we change training set size and test set size. We do this in order to see if there is some optimum for the sizes that is balancing the pros and cons.

In the training we fit different models.
In the testing we select the model which is best.
We validate by computing the difference with the known theoretic function. (the theoretic function that we created ourselves, but we do the training and testing while pretending that we do not know the real theoretic function)

Let's use a model where we generate randomly 20 independent variables $X_i; 1\leq i \leq 20$ that are potentially in a linear model, which is in reality only made up from only the first five parameters $Y = X_1 + X_2 + X_3 + X_4 + X_5 + \text{noise}$. We do the fitting by regularization. Let's use 400 measurements for an experiment (which need to be divided into training and testing).
We repeat this experiment 100 times for each test set size.
Let's see how the regularization parameter varies based on the size of the test set.

Let's see how the performance parameter varies based on the size of the test set. (we plot the average of the 100 experiments per test size in red)

Interpretation of the graphs:

In the first graph we see: when we increase the test size then this increases the lambda parameter. We can see this as an increase in the control of 'overfitting' (which is the reason that we use a test data set).

In the second graph we see that there is some optimum for the test size. Increasing the test size initially improves the result, but at some point it does come with some costs. The reason is that increasing the test data size, decreases the training data size. When the training data size becomes smaller, then the models will perform less well.

In this particular example we see that this balance between large training data set (which improves the quality of the models) and the large test data set (which improves the control on overfitting) is optimal around a test data set of 33% of the entire data.

Note: The example indicates how the test data set size is influencing the results. But the result of 33% is not a general result. For each problem this size of the test data size differs. The optimum will depend on the amount of risks of overfitting versus risks of misfitting (noise).

R-code to produce graphs
<code>library(glmnet)

set.seed(1)

n = 400
n_train = 20
vars = 20
lambda = 10^-4 * 1.5^c(1:60)

cvglmnet <- function(n_train) {

  ### create model matrix
  X <- matrix(rnorm(vars*n), ncol = vars)
  ### compute dependent variable
  Y = rowSums(X[,1:5])+rnorm(n,0,10)

  # split data
  X_train = X[1:n_train,]
  Y_train = Y[1:n_train]
  X_test = X[(n_train+1):n,]
  Y_test = Y[(n_train+1):n]

  # perform model
  mod <- glmnet(X_train, Y_train, family = "gaussian", alpha = 0, lambda = lambda)

  ### compute mean train RSS
  Y_pred <- X_train %*% mod$beta
  errors <- Y_pred - Y_train
  RSS_train <- colSums(errors^2)/(n_train)

  ### compute mean test RSS
  Y_pred <- X_test %*% mod$beta
  errors <- Y_pred - Y_test
  RSS_test <- colSums(errors^2)/(n-n_train)

  ### the optimal model in the test
  nm <- which.min(RSS_test)

  ### verify the model performance
  ### as distance in coefficients
  perf <- sum((mod$beta[,nm]-c(rep(1,5),rep(0,15)))^2)

  #plot(mod$beta[,nm])

  ### plotting
  #Ytot <- cbind(RSS_train,RSS_test)
  #plot(mod$lambda,RSS_train, log = "x", ylim = c(min(Ytot),max(Ytot)),
  #     ylab = "RSS", xlab = "lambda")
  #lines(mod$lambda,RSS_test)
  #points(mod$lambda[nm], RSS_test[nm], pch = 21, col = 1, bg = 2)

  return(list(lambda = mod$lambda[nm], performance = perf))
}

set.seed(1)
n_rep = 100
n_train <- seq(10,400,10)

### repeated computation of fitting procedure with different training/test data size
x <- replicate(n_rep,cvglmnet(n_train = n_train[1]))
Mlambda <- as.numeric(x[1,])
Mperformance <- as.numeric(x[2,])

for (i in 2:length(n_train)) {
  x <- replicate(n_rep,cvglmnet(n_train = n_train[i]))
  Mlambda <- cbind(Mlambda,as.numeric(x[1,]))
  Mperformance <- cbind(Mperformance,as.numeric(x[2,]))
}

plot(-1,-1, xlim = c(0,1), ylim = 10^c(-2,5), log = "y",
     xlab = "percent test size", ylab = "fitted lambda")

#plot(-1,-1, xlim = c(0,1), ylim = range(lambda), log = "y",
#     xlab = "percent test size", ylab = "fitted lambda")

for (i in 1:length(n_train)) {
  h <- Mlambda[,i]
  points(rep((n-n_train[i])/n,length(h)) + rnorm(length(h),0,0.01),h, pch = 21,
         col = rgb(0,0,0,0.25),
         bg = rgb(0,0,0,0.25),
         cex = 0.7)
}

plot(-1,-1, xlim = c(0,1), ylim = c(0,15),
     xlab = "percent test size", ylab = "performance")

##plot(-1,-1, xlim = c(0,1), ylim = range(lambda), log = "y",
##     xlab = "percent test size", ylab = "fitted lambda")

for (i in 1:length(n_train)) {
  h2 <- Mperformance[,i]
  points(rep((n-n_train[i])/n,length(h2)) + rnorm(length(h2),0,0.01),h2, pch = 21,
         col = rgb(0,0,0,0.25),
         bg = rgb(0,0,0,0.25),
         cex = 0.7)
  points((n-n_train[i])/n,mean(h2), pch = 21, col = 2, bg = 2)
}

</code>
Comment: +1: A really insightful empirical study
Comment: Nice, +1! The question just is how this optimum split varies with the DGP. In a time series context, I could imagine it is strongly driven by the strength of seasonality and/or trend.
Answer: I agree with the other answers, there are a lot of things that could go into an 'optimal' train test split for time series such as ensuring that you have complete cycles of seasonality.  For example, if you have monthly data and only 28 months you are probably better off doing only a 4 month test split for models that require 2 full seasonal cycles and doing seasonal tests before hand.  If it isn't seasonal then you could do longer test splits.
Similarly, if there are massive changes (such as COVID in this example) you will want the train split to have some of that data or else the best model will just be the most lucky one.
The most stable procedure in my experience is to select a test split that allows the models to see all the information they will need and then do time series cross validation through the test split.
I have also done some work with reinforcement learning where we feed the agent relevant time series features and allow it to choose the train-test split size to minimize actualized forecast error.  It performed better than any static test size but worst than cross validation. So that could potentially work in general but probably not helpful for you right now. I would do a combination of both other answers with the last year held out and do time series cross validation to that split.
Comment: Enough to detect the patterns in the data is probably the correct answer. I use, for monthly data 50 data points because someone put forward a rule of thumb to that effect.  But the answer depends on many things I am sure including the seasonality of your data. Structural breaks, where the pattern changes will make this a lot worse.
Answer: There is no theoretical optimum for this decision and will be highly problem-dependent.
One option to circumvent this decision is to use an online retraining model. At each point in time, train on previously observed data and test on the next point.
This is illustrated here under the section 'Walk Forward Validation'.


Best approach for destructible car in Unity

Question: I'm developing a simple racing car game.
I'm wondering what is the best approach to manage visually car destruction.
For instance: i think one option (expensive) is to build car 3d model with 'separate' mesh, each for any component (bump, door, glass) and relative cooliders..
Other options ?
Thanks
Answer: If you just want bumps and scratches, you can do things like use effects and deform the vehicle mesh and you wouldn't need a large collection of objects.
Assuming you want to have bits fly off in a super realistic fashion and have it look awesome, then I think the easiest way is to do what you already suggested. Have a collection of objects that can detach away from the main body and be destroyed afterwards. Most 3D models you can download will come as a collection of parts anyway, though.
The only other approach I can think of is to make your own procedural destruction system, similar to the one CryEngine 3 uses. That would be a lot more work though.


Have checkbox in addition to "Select All" redundant?

Question: Is having an additional checkbox to select all redundent and add unneeded complexity?  The user frequently (maybe 40% of the time) selects numbers 1-33 as option so I would like to add a checkbox that selects those numbers.  However it is not hard to select all then uncheck L and 34-62.  So I don't know if I'm wasting time here making it worse.  The user would be educated on what the new T box does so that is not a problem.
Answer: This is a question for your users. I encourage A/B testing, one with the 1-33 checkbox, one without.
But if I were you, I think the 40% data is enough to convince stakeholders that a 1-33 checkbox would be helpful.
Comment: Well, UX isn't UX without data. Ask your users even if they're internal.
Comment: Nothing that formal honestly I can do whatever I want just making something for internal department use.


Edit icon VS Edit CTA while redirecting the user to a different screen?

Question: I need to redirect the user to a form which is on a different page after he clicks edit. So what is the best practise here, to use the pencil icon or edit button or anything else where it is clear that the user will be redirected to a different screen without getting surprised
Answer: It's depends, I think the question should be: Who's your user?
If a heavy user from internet a pencil icon could be enough, but if your user is a old person, edit button can be a good thing.
For me: Try to prototipate your decision, and make some usability tests with your users.
Comment: Alright, Thank you! The target group is mid age enterprise people. So giving an icon and then re directing them to a different page will be a good experience??
Comment: @shwetasinwal make a test with them, do you already have an interface or prototipe?
Answer: Both. If you have to choose, use text.
Icons are quicker when searching for a button in an interface if the user remembers what to look for, but can often be unclear as it can be interpreted in different ways.
Text is always a lot clearer but takes slightly more time to find the button in an interface. I personally think this is negligible and text labels make an interface much easier to use for new users.


Download onedrive file content in bytes using rest api?

Question: I have web application to send email from OneDrive location. I have obtained a user consent and access token from Ms Live site. I am trying to implement process where user clicks on 'browse' button, they should see list of files which are in onedrive. User selects file from there and clicks on 'Send Email' button in web page which should invoke the downloading of selected file silently and send that to email address provided by user.
At the moment onedrive sends download link to get file content. Does anyone knows how to get file content in bytes using REST API as I don't want the user to download the file in their local machine. Please help!
Answer: It sounds like you plan on sending the selected OneDrive file as an attachment in email (right?). This could be tricky if you don't want the file to be downloaded locally.
Maybe you could consider sending a link to the selected OneDrive file in the email instead. This way, the email recipient will be able to download the file directly from the sender's OneDrive.


Why are sodium and potassium displaced from soap by calcium and magnesium ions in hard water?

Question: Sodium and potassium are more reactive than calcium and magnesium still they get displaced. Why?
Comment: **Metallic** sodium and potassium are reactive not their ions.
Answer: I have no external justification to point to on this, but I've always thought one aspect contributing to this behavior is the fact that the divalent $\ce{Ca^2+}$ and $\ce{Mg^2+}$ bind two soap fatty acid molecules, whereas $\ce{Na+}$ and $\ce{K+}$ as monovalent ions can only strongly bind one molecule.
As a result, the alkaline earth cations have two fatty acid "tails" that can 'glom' around them, shielding them better from the water molecules and making the resulting complex more stable, as well as less soluble.
On the other hand, since the alkali cations only have one fatty acid "tail" they're strongly associated with, that one tail can't wrap around nearly as completely, and so there is significantly greater accessibility of the solvent to the cation.


Windows Compressed Folders avoids Mercurial repo folder .hg

Question: Creating a zip file using Send To -> Compressed folder excludes .hg folder on Windows 7. The same behavior is seen in XP. Is it because folder name starts with a dot ?
Mercurial creates .hg folder to hold the repository. Whenever the working folder is zipped, it leaves .hg folder out of compressed .zip file.
Answer: Yes zip skips compressing the floders that start with "." on windows below version 7
See : How does WinXP's "Send to Compressed (zipped) Folder" decide what to include in zip file?
I would suggest that you tar the file before you zip it. This way you will ensure that those folders are included. Tar handles them.
Answer: Try using 7-zip or another archival utility to compress the files, since Windows doesn't generally like filenames starting with <code>.</code>.


Cause of loop inefficiencies?

Question: While I have seen a lot of documentation regarding the inefficiencies of loops in Mathematica, I am still curious as to why-- while I know it is intentionally developed this way to allow for improved functionality elsewhere, what in the barebones of the language actually causes the loop inefficiencies?
Comment: I think it's the same in any scripting language: repeatedly calling functions (the inside of the loop) is much less efficient than calling one function that does all the work at low level. Every switch between the script level (the loop infrastructure) and the execution level (the loop body) has an overhead. Further, list processing functions can use hardware acceleration tricks like vectorization that script-level loops cannot access. This topic has been discussed at length in this and related fora.
Comment: You might want to look at https://mathematica.stackexchange.com/questions/2158/are-there-any-cases-when-for-loops-are-reasonable for `For` loops specifically. Most of the other explicit loop constructs (`While` and `Do`) would be most effective in such situations as well. However, because of the guarantees made by the stricter iteration constructs (e.g. `Map`), much more can be automatically performed to make them faster overall. `For` loops, on the other hand, can't be guaranteed to terminate at all for all interior expressions, much less parallelize.
Comment: @Roman I think it would be more useful to post this as an answer than to close the question. I fully agree with what you said.  It's not that *loops* are slow, it's that executing Mathematica code is slow. Using a single function that does everything is potentially faster as that function can be implemented in a lower-level language and optimized.  Using a loop to implement the same yourself *in Mathematica* is going to be slower.
Comment: @Szabolcs what I wrote is neither an answer nor a solution, it's merely a comment on an intuition from having written a Forth interpreter in the 1990s. Only somebody with deep knowledge of the Mathematica internals can answer this question. There are lots of subtleties, like just-in-time compilation of loop bodies, pattern-matching entire loops to a database of common loop functionalities (like gcc does to some extent), etc. that I would have no way of addressing here.
Answer: I'll try to list some reasons, though the following will not be exhaustive.

Mathematica being a high-level interpreted language, Mathematica code is generally slower than what is possible e.g. in C.
Writing something as a loop means that the loop body must be repeatedly executed by the Mathematica interpreter. If the same operation can be expressed as a single function call, there is a possibility to implement in (internally) in a lower-level language and allow it to run much faster.
Example:
Table[x^2, {x, 1, 10000000}]; // RepeatedTiming
(* {0.168, Null} *)

Range[1, 10000000]^2; // RepeatedTiming
(* {0.029, Null} *)

Doing arithmetic on an entire array, as above, is called vectorization. The internal implementation of such operations will often make use of multiple CPU cores as well as SIMD instructions, both of which would be basically impossible when the loop body can be arbitrary Mathematica code.

Along the same line of thought, using a construct that involves more pieces of Mathematica code being evaluated will be slower.
Example:
AbsoluteTiming[
 arr = ConstantArray[0, 100000];
 For[i = 1, i <= Length[arr], ++i,
  arr[[i]] = i^2
  ];
 ]
(* {0.136787, Null} *)

AbsoluteTiming[
 arr = ConstantArray[0, 100000];
 Do[
  arr[[i]] = i^2,
  {i, Length[arr]}
  ];
 ]
(* {0.086007, Null} *)

Observe that the For needs to evaluate more pieces of Mathematica code. Setting i=1 is explicit, incrementing it is explicit, comparing it to Length[arr] is also explicitly.  Some of these are done internally in Do so they can be faster.

Arguably Table is also a looping construct, but it is of a different sort. The body of the Table does not need to have side effects. Setting a value, as in arr[[i]] = ..., is a side effect of evaluating =.  Thus an operation like the above requires side effects with Do and For, but not with Table.
Functional construct with no side effects are much more amenable to automatic optimization. Table in particular can automatically Compile its body to allow it to run faster. This is why we get so much better performance with the following:
Table[i^2, {i, 100000}]; // RepeatedTiming
(* {0.0015, Null} *)

Such constructs are also very straightforward to parallelize.  Just switch the Table out for a ParallelTable.

The general idea is that if you use programming constructs that express what you are doing in a more specific way, the system has more freedom to choose the fastest way to run it.
Writing code in terms of loops basically means spelling out each small step of the algorithm.  It does not convey your high-level goal in a manner that a computer can understand—instead it focuses on the details.  Compare "take the square of each element of this array" to the same written as a For loop.  The For-based version will necessarily specify details such as initialize an array, initialize an iterator, increment an iterator, compare the iterator to a value and decide what to do based on the result, etc.  The very specific algorithm that you express with a typical For loop is not how the faster alternatives (such as Table or vectorized Power) work internally.  By specifying each step, you forbid the system for doing anything else.
The takeaway is that when programming in high-level languages, it is better to express our algorithms with higher-level constructs.  These higher level constructs can have very efficient internal implementations.

Cause of loop inefficiencies?


How to design DC Motor speed control, using PID

Question: I am looking to control the speed of a DC Motor using PID, it is speed control. I understand how the PID works, but i have a few questions. Like,how would I find my gains for each of the PID, what values of resistors and caps would I use? Also, would a simple 5V DC motor be suffice? If anyone has done something like this, a circuit schematic would be great. Thanks
Comment: Are you building a digital PID controller or an analog one?
Comment: Im building it using resistors, caps and opamps, for each of the P, I and D gains, they all go to a summing opamp which goes to the DC motor, as the output. I dont know how to figure out what the gains should be
Comment: there's no universally optimal set of gains - what works well under one mechanical load scenario may not be the best for a different one.
Answer: Generally you find the PID gain values by structured experimentation, something like this:
Start with only a P gain (I and D = 0), and make it as high as possible with little or no overshoot.
Add a little I gain.  Make it as high as possible without producing more than just a little ringing.
Up the P gain a little.  This will usually add a little stability now that the I term is there.
Iterate with the P and I terms to get the fastest settling time with whatever overshoot you can tolerate.
You can either stop here, or try to add a little D term.  The polarity of the D term depends on how exactly you implemented the equations.  A little D can add some stability, which allows you to make the P and I terms a bit more aggressive.  The point of the D term is basically to say if I'm already heading in the right direction, decrease the drive.  However, D is susceptible to noise.  Making it too high will cause the output to sortof "vibrate", which is basically amplifying the sensor noise onto the output.  A little D can be useful if you need the last bit of performance, but a lot of implementations leave it out.

I notice you plan on doing this all in analog electronics.  This makes no sense, especially for something slow like a motor.  For efficiency, you will want to drive the motor with PWM.  The natural way to do this is the motor speed sensor feeds into a microcontroller A/D.  The micro does the PID calculations and uses that to adjust the PWM duty cycle.  It can also do the direction changing with the H bridge, guarantee break before make, etc.  There are many small and cheap micros with A/D and PWM hardware built in.  Some even have H bridge drive PWM outputs.  This is such a common problem that there are whole subfamilies of micros optimized for this.
The compute power you need is modest.  Back in the late 1990s I used a PIC 16F877 to run two layered PID control loops that drove a DC motor.  The inner loop controlled the position of the motor and output PWM to the H bridge.  The outer loop controlled the speed of a gasoline engine and output a position value to the inner loop.  The PID computations were done in 24 bit floating point.  We used 8 ms per iteration, which left a little time to do all the other low priority tasks.  That micro was running at its maximum speed of 5 MIPS.  That is quite slow by today's standards.  Lots of micros are quite capable of doing what you need.
Doing this in analog will take more board space, take more components, be much harder to tweak, and does not provide a convenient interface to the motor driver power stage.  It just doesn't make sense.
Answer: A PID loop is essentially a second-order IIR filter in which the time constant for the first stage is very small while the time constant for the second stage is very large.  The output is the P term times the middle stage, plus the D term times the difference between the first two stages, normalized for the time constant, plus the I term times the difference between the second and third stages, normalized for the time constant.  Although the fact that the time constant between the first two stages isn't quite zero means the D term doesn't quite reflect the differential, and the fact that the time constant between the second two stages isn't quite infinite means that there's a limit to how much the integral can "wind up", in practical terms these are advantages rather than disadvantages.
A "true" derivative term will amplify high-frequency components in the feedback signal, doubling in strength with every doubling in frequency.  There's a limit, however, to the frequencies one is actually interested in.  If one has a 10KHz control loop, but the oscillation frequency of an undamped system would be 10Hz, using a 'straight' derivative could amplify noise by orders of magnitude more than the signal of interest.  If the first stage of the filter has a time constant of e.g. 1ms, the control loop will have no trouble damping a 10Hz oscillation, but noise will only be amplified 1/10 as much as if the time constant were one loop sample.
Likewise, a "true" integral will offer infinite wind-up, but that's not a good thing.  If something prevents the controlled device from reaching its intended position for an hour (e.g. something is obstructing the actuator), a "true" integral would wind up to the point that once the obstruction was cleared, it could take many minutes (or even hours) for the integral to wind down and allow the system to work.  Using a reasonably-long time constant on the integral term will ensure that even if the system is out of bounds for an extended time, the time required to recover will be finite.


Can I run BOINC using only a little computing power?

Question: I found that I can help find scientific results using BOINC. As I tried, it used so much cpu or memory that my desktop hanged. Is there a way to tell Ubuntu that run BOINC but use at most, say 20% of CPU power or memory?
Comment: Is it an option to use full CPU power but give the BOINC process less priority so it doesn't hang any other processes?
Comment: @golimar Yes it is an option. How can I do that?
Comment: The `nice` command lets you launch a process with less priority, and `renice` to change the priority of an already running one. Better to search this site for "process priority" or similar
Answer: Yes, such options exist in the BOINC Manager and also on the project websites.
In the BOINC Manager go to "Options" -> "Computing Preferences". Under the "Computing" tab you can set how many CPUs (=Cores) will be used and to what percentage. In the "Disk and Memory" tab, you can set the limit on RAM and hard drive usage.
On the project website, you find the same settings on the home screen under "Preferences" -> "Computing preferences". Note that your computer will only apply the settings from the website once it contacts the project server the next time.
Concerning process priority
You shouldn't need to use nice or similar tools to manually manipulate the BOINC processes on your computer. BOINC should already take care of this. For example, I see normal processes running with a "niceness" of 0, while the BOINC projects have 19, which is the lowest possible priority. If your BOINC client doesn't do this for some reason, it might be misconfigured or malfunctioning. You could seek out help and if no reason can be identified open a bug ticket for this.
Concerning memory
The best way to avoid excessive memory usage is to select projects and applications that have low memory requirements. Many projects have a website where you find the system requirements for each of their applications. The easiest way to find them is probably to search for <project name> system requirements in the search engine of your choice. If nothing comes up, you might want to try WU Prop. They gather statistics about CPU, memory and disk space and so on for all BOINC projects, so they are likely to have the information available. (Pro Tip: WU Prop is also a BOINC project, but doesn't require lengthy computations. If you run it on your PC, it just monitors the other BOINC processes, reports the results to the website and gives you a few extra credits.)
If this doesn't solve your problem or you want to know more, just write a comment or PM. I'm happy you want to contribute to scientific projects and it would be a shame if we couldn't figure out what settings work best for you and your computer.


How Bitcoin browsers update balance of an address?

Question: Suppose i have a Bitcoin address for the first time and Alice sends me 1 Bitcoin using P2SH. As far as I know, Bitcoin browsers will scan the entire blockchain. In this case, my public key is not present in the network, it is only present in the locking script and it is hashed.
So when i check my balance in Bitcoin browser, can i get a result?
Answer: P2SH Bitcoin addresses are just Base58Check encoded script hashes. A P2SH transaction output will mention this same script hash. So if we're just interested in the balance of the P2SH address, we just Base58Check decode the P2SH Bitcoin address to the script hash it encodes, and look for UTXOs that have that same script hash.
You don't need the script or any public keys until you're trying to spend.
Comment: @KHJUAF403456ZS3K564WAEF Right, but addresses aren't identifiers of your public key. They identify the entire locking condition. If you have a multisig script that involves your key, that is a distinct address from a single-key script with just key, and they will be counted separately. Block explorers in general give a weird address-centric view of the chain, because they cannot do better. Your own actual wallet can tell you the balance if the actual funds you can access, regardless of how things are split into addresses.
Comment: In some cases, the locking script will be complex and contain not only my public key, but possibly other public keys (multi-signature). And the browser doesn't seem to be able to match my public key with the script hash.


Minors and taxes?

Question: I am 15 years old and I just started freelance development. Currently I am making $200-$400 a week and I live in the US. Anyway, my question is do I have to pay taxes and how?
Comment: possible duplicate of [Indie Software Developers - How do I handle taxes?](http://money.stackexchange.com/questions/15494/indie-software-developers-how-do-i-handle-taxes)
Comment: @ChrisInEdmonton the question you marked this to be a dup of is relevant, but the situation is not the same. The answers there are irrelevant to this poster (and probably to the one who asked that question as well, although one answer was accepted).
Answer: Since you're a minor (I'm assuming you also live with your parents), you generally don't need to file your own tax return unless you earn quite a lot of money on your own.
How much is quite a lot? At least $6200 a year, for earned income only, which in your case it looks like you have. If you have un-earned income (interest/dividends/capital gains) then the limit is lower: $1000.
Since you are above the threshold, you'll need to file your own tax return (your parents will need to file it for you, more likely). The detailed instructions on what to do are published by the IRS in Publication 929.
As a sidenote, you may want to consider depositing your income to a Roth IRA account, where it will grow tax free and provide a very nice cushion (tax free as well) for your retirement in the future.

Minors and taxes?


What is the meaning of the bubbles / spikes in the shap values plot?

Question: Here are an example of shap values plot from here.
How to interpret the 'bubble' or 'spikes' on this shap values plot I highlighted in yellow color?
Answer: That's to help indicate the volume of points in that region, which would be lost due to overlap if all plotted along the horizontal line.  This kind of plot is referred to as a "bee-swarm", and is somewhat similar to violin plots, strip plots, or scatter plots with jitter.


Coinbase purchase bitcoin transaction pending, why is it painfully slow to purchase

Question: I have purchased bitcoin using coinbase app 3 hours ago and the transaction is still pending. Is it usually this painfully slow to transact on coinbase?
Comment: how much you bought? I bought for $100 and it was almost instantly
Answer: Coinbase is a service, your transaction is happening on their internal servers, not the bitcoin network. If you choose to withdraw your bitcoins to an external wallet, that would involve a transaction on the bitcoin network.
So the delay depends entirely on Coinbase, during high volume times I would guess their order fulfilment is slightly slower. Your order will come through though!
Answer: I haven't had any transactions be that slow with Coinbase, but I've only used it for a week now. I do know that during busy times, like the other person above answered, it can be slower. If their network is bogged down with requests, it will take longer.
I think it also depends how many confirmations are being used for the transfer. I did a transaction today that was 6 confirmations to completion and it took about 15 minutes, where others were practically instantaneous, and only 2 confirmations.