Prove $\sum_{k=m}^n{k\choose k-m}{2n\choose 2k}=4^{n-m}\frac{n(2n-m-1)!}{(2n-2m)!m!}.$

Question: For $n\in\mathbb{Z}_{\ge 1}$ and $m\in\{0,1,\ldots,n\}$ I'd like to prove
$$\sum_{k=m}^n{k\choose k-m}{2n\choose 2k}=4^{n-m}\frac{n(2n-m-1)!}{(2n-2m)!m!}.$$
Though I've confirmed the identity for all $n\le 20$, sadly I don't have a proof.
Comment: A closed hypergeometric identity like this can always be proved by induction if you have no better ideas.
Answer: Nowadays it is a matter of machinery.
For a pencil-and-paper approach... the sum is equal to the coefficient of $x^{2n}$ in
$$\left(\sum_{k=m}^{\infty}\binom{k}{k-m}x^{2k}\right)\left(\sum_{k=0}^{2n}\binom{2n}{k}x^k\right)=\frac{x^{2m}}{(1-x^2)^{m+1}}(1+x)^{2n}=\frac{x^{2m}(1+x)^{2n-m-1}}{(1-x)^{m+1}}$$
which, by Cauchy integral formula, is equal to
$$\frac{1}{2\pi i}\oint_{|z|=r}\frac{(1+z)^{2n-m-1}\,dz}{z^{2n-2m+1}(1-z)^{m+1}}=\frac{1}{2\pi i}\oint_{|w|=1/r}\frac{w(w+1)^{2n-m-1}}{(w-1)^{m+1}}dw$$
(where $0<r<1$; the latter is obtained by substitution $z=1/w$).
Thus it is the coefficient of $z^m$ in $(z+1)(z+2)^{2n-m-1}$, equal to
$$2^{2n-2m-1}\binom{2n-m-1}{m}+2^{2n-2m}\binom{2n-m-1}{m-1},$$
which simplifies exactly to your formula.
Answer: I upvoted  the accepted answer  for its instructive management  of the
poles (pole at  zero disappears due to substitution but  a pole at one
appears inside the substituted contour and  the power series at one is
particularly easy to find).  What follows uses formal power series and
a different substitution and documents all the steps. Let's start with
$$\sum_{k=m}^n {k\choose k-m} {2n\choose 2k}
= \sum_{k=m}^n {k\choose k-m} {2n\choose 2n-2k}
\\ = \sum_{k=m}^n {k\choose k-m} [z^{2n-2k}] (1+z)^{2n}
= [z^{2n}] (1+z)^{2n} \sum_{k=m}^n {k\choose k-m} z^{2k}.$$
Now we may certainly extend $k$ beyond $n$ because there is no contribution
to $[z^{2n}]$ in that case. We get
$$[z^{2n}] (1+z)^{2n} \sum_{k\ge m} {k\choose k-m} z^{2k}
= [z^{2n}] (1+z)^{2n} z^{2m} \sum_{k\ge 0} {k+m\choose k} z^{2k}
\\ = [z^{2n-2m}] (1+z)^{2n}  \frac{1}{(1-z^2)^{m+1}}
= [z^{2n-2m}] (1+z)^{2n-m-1}  \frac{1}{(1-z)^{m+1}}.$$
This is
$$\mathrm{Res}_{z=0} \frac{1}{z^{2n-2m+1}}
(1+z)^{2n-m-1}  \frac{1}{(1-z)^{m+1}}.$$
The subsitution $z/(1+z) = w$ or $z=w/(1-w)$ now yields
$$\mathrm{Res}_{w=0} \frac{1}{w^{2n-2m+1}}
\frac{1}{(1-w)^{m-2}}
\frac{(1-w)^{m+1}}{(1-2w)^{m+1}}
\frac{1}{(1-w)^2}
\\ = \mathrm{Res}_{w=0} \frac{1}{w^{2n-2m+1}}
\frac{1-w}{(1-2w)^{m+1}}.$$
This is
$$[w^{2n-2m}] \frac{1-w}{(1-2w)^{m+1}}
= [w^{2n-2m}] \frac{1}{(1-2w)^{m+1}}
- [w^{2n-2m-1}] \frac{1}{(1-2w)^{m+1}}
\\ = 2^{2n-2m} {2n-m\choose m}
- 2^{2n-2m-1} {2n-m-1\choose m}
\\ = 4^{n-m} \frac{(2n-m-1)!}{(2n-2m)! m!}
\left(2n-m - \frac{1}{2} (2n-2m)\right).$$
which is indeed
$$\bbox[5px,border:2px solid #00A000]{
n 4^{n-m} \frac{(2n-m-1)!}{(2n-2m)! m!}.}$$
Answer: As mentioned by metamorphy, this can be done completely with machines now. So basically you do not have to prove it, a few lines of machine code can do it for you.
In the following, I will explain how CAS can prove this using creative telescoping algorithms.
The package that I used is called Sigma.
First the left-hand-side can be written as
$$
S(n_0)=\underset{k=0}{\overset{n_0}{\sum }}
f(n_0,k)
$$
where $n_0=n-m$ and
$$
f(n_0,k)=
\left(
\begin{array}{c}
 k+m \\
 k \\
\end{array}
\right) \left(
\begin{array}{c}
 2 \left(m+n_0\right) \\
 2 (k+m) \\
\end{array}
\right)
.
$$
Next, let
$$
c_0(n)=2 (1 + m + n_0) (m + 2 n_0) (1 + m + 2 n_0),
$$
and
$$
c_1(n)=-(1 + n_0) (m + n_0) (1 + 2 n_0)
$$
and
$$
g(n_0,k)=-\frac{k (2 k+2 m-1) \left(m+n_0+1\right) \binom{k+m}{k} \left(2 k m+4 k n_0+2 k-4 m n_0-3 m-6 n_0^2-7 n_0-2\right) \binom{2 m+2 n_0}{2 k+2 m}}{\left(2 k-2 n_0-1\right) \left(k-n_0-1\right)}.
$$
Then you can verify in your favorite CAS system that
$$
g\left(n_0,k+1\right)-g\left(n_0,k\right)=c_0\left(n_0\right) f\left(n_0,k\right)+c_1\left(n_0\right) f\left(n_0+1,k\right)
.
$$
This recursion is found by using the Mathematica package Sigma. This is where the computer becomes most useful--they find these recursions for you.
Now we sum over $k=1,..n_0-1$, we get.
$$
c_0(n_0) S\left(n_0\right)+c_1(n_0)  S\left(n_0+1\right)=0
.
$$
This is a simple recursion, plugin $S(0)=f(0,0)=1$, we get
$$
S(n_0)=
\frac{4^{n_0} \left(m+n_0\right) \left(m+2 n_0-1\right)!}{m! \left(2 n_0\right)!}
=
\frac{n 4^{n-m} (-m+2 n-1)!}{m! (2 n-2 m)!}
.
$$
where we substitute by $n_0=n-m$. This is exactly the right-hand-side.
Comment: Thank you for your explanation! It seems like this was particularly easy to prove for you. Could you maybe give a similar formula for $\sum_{k=m}^n{2n+1\choose 2k}{k\choose k-m}$?
Comment: Just type it into Wolfram Alpha -- https://www.wolframalpha.com/input/?i=Sum%5BBinomial%5B2+n+%2B+1,+2+k%5D+Binomial%5Bk,+k+-+m%5D,+%7Bk,+m,+n%7D%5D
Comment: Of course! thanks again


Fault tolerance (reliability) in SQA

Question: My last last question was closed as off-topic. Yet, the only thing that on-topic page ascertains is that questions are accepted from QA engeneers and must not be "too localized" and I do not understand how ensuring reliability (by injecting the code to check the success of operations and retrying the failures) does not assure quality? Was my question closed because it is too localized or because I am not a test engeneer or making programs fault-tolerant is not a topic of SQA?
Answer: Val. Questions are always evaluated on what is in them, not who is asking. So it definitely has nothing to do with you not being a test engineer. (I'm not either, actually. I'm a developer who has been unfortunate enough to never have a testing team at any of the firms I've worked at...)
So the real question is "Is making programs fault-tolerant on topic for SQA?" and I believe the answer is no. Making programs fault-tolerant is a development issue. Identifying and reproducing the faults is an SQA issue. Once the issue has been identified, it really is development's job to determine why it doesn't work the way it should and how to fix it. If the tester is able to identify the cause, that's great, but I personally don't see that in the responsibility of the tester.
Now for many of us developers, we're also the test team. I struggle with this every day. But you have to keep your different hats ready, and know which one you're wearing and when.
Comment: Thanks. This answer implies that we must ask to reopen my question because it is intended to fault identifications and reproduction. I also read the [topics on QA.](http://asq.org/pub/sqp/past/vol3_issue3/tian.html) Along with Wikipedia, they say that non-functional topics, i.e. robustness and tolerance, are QA topics. I do not mind to say that [A first major testing mistake is thinking hat programmers can't test their own code](http://www.exampler.com/testing-com/writings/classic/mistakes.html)
Answer: There are all kinds of development practices you can follow to improve the quality of your code, including "injecting the code to check the success of operations and retrying the failures".  However, SQA is more about how to test software than about how to write it.
The question we're currently discussing has four parts:

why nobody else does mention that

We didn't establish SQA to conjecture why people don't mention things.

and, secondly, which else operations are unreliable?

Too broad a question; Windows is a very large, complex system; it is unreasonable to ask for a list of Windows APIs that are unreliable.

Also, my reliability is based on assumed reliability of file.exists()
  function. It keeps the state of file system intact. But can it be considered
  reliable?

That is a question about a Windows API, not about testing software.  I'm sure there are people on stackoverflow who could answer this.

What if it is also unreliable?

I try not to rely on APIs that are unreliable.  Again, I do not think this is an appropriate question for SQA.
Val, I can see this is important to you, but you're asking your question in the wrong place.
Comment: By `test your SW`, do you mean a static test (as opposed to deciding what needs to be tested on-line)? `which else operations are unreliable?` is broad but it is not `a wrong place` and my Q has a primary focus on file create/remove ops and closing it because of this bonus seems very unjustified. Wikipedia says that [robustness is a topic of SW quality](http://bit.ly/1wU0Pa). [Quality Assurance topics deal with tolerance](http://bit.ly/1jfE2Th). Where is the right place for assuring reliability? You should see that my Q important not for me but all people who dislike their programs failing.
Answer: Val - Here are a few comments:

Without getting into a terminology war, it is important to keep focused on the two primary functions of testers: 1) Identify risk in a product and 2) communicate that risk to the team as early as possible. You can set up a test and call it anything you like, as long as the team (including any stakeholders) are on the same page so that communication of risks to the team is not impacted.
Assessing fault tolerance (fault injection) is a function that may involve running tests, working with the team to cooperatively run tests, or helping the developers to structure unit tests.
"Reliability" is one of the "ilities" that a tester may evaluate. That is different from fault injection, which is a variation of functional testing. Reliability testing can involve (for example) fail-over testing for databases which tests the effect of sudden system shut-downs on data integrity.
"Robustness" can have many definitions, such as the team's ability to quickly modify the code without breaking other sections (ie, maintainability). That definitely sounds like a development issue and not a test environment issue.
Retrying failures sounds like a check for defect reproduction repeatability, which is necessary for insuring the quality of defect reports and not the application itself.

Fault tolerance (reliability) in SQA


Is it correct that the Saturn V RP1 tank was pressurized by high pressure helium and the LOX tanks were pressurised by oxygen?

Question: I understand from many sites that in the first stage of the Saturn V, the RP1 tank was pressurized by high pressure Helium tanks, but the LOX tanks were pressurized using gaseous oxygen. Is this correct? If yes, why so?
Answer: Helium was used to pressurize the RP-1 tank to save weight. Nitrogen is much cheaper but its density is 1.250 kg/m$^3$, helium is 0.1785 kg/m$^3$, so 1.071 kg is saved for every cubic meter of emptied tank volume.
To pressurize a fuel tank with pure oxygen is a bad idea, only inert gases like nitrogen or helium may be used.
The first stage RP-1 tank volume of the Saturn V was 770 m$^3$, so 824 kg were saved by using helium instead of nitrogen. During the flight the tank pressure was 3 bar instead of 1 bar, so three times the weight, 2,474 kg was saved.
So the lighest noble gas helium is the optimal solution.
The tanks for compressed helium were mounted inside the LOX tank. The low temperature increased the density of helium thus a smaller and lighter tank could be used to store more helium at the same pressure. To avoid exceeding the rated tank pressure, helium loading could be finished only when tanks were cold.

The propellant tanks included special fill and drain points to handle
heavy-duty lines used to fill the big vessels at high rates; up to
7300 liters (2000 gallons) of RP-1 per minute. If left to its own
devices inside the tank, the RP-1 would have settled into strata of
varying temperatures, a highly undesirable situation, so the S-IC
incorporated a fuel conditioning system to "stir" over 730 000 liters
(200 000 gallons) of RP-1 gently by continuously bubbling gaseous
nitrogen through the feed lines and the fuel tank prior to launch. To
ensure proper engine start and operation, a fuel pressurization system
contributed to good pressure at the fuel turbopump inlets where 10
fuel lines (two per engine) funneled RP-1 to the engines at 4900
liters (1350 gallons) per second. During the countdown, pressurization
was supplied by a ground source, but during flight, a helium
pressurant was supplied from elongated bottles stored, not on the fuel
tank, but submerged in the liquid oxygen (LOX) tank. In this medium,
the liquid helium in the bottles was in a much more compatible
environment, because the cold temperature of the liquid helium
containers could have frozen the RP-1 fuel. There were additional
advantages to their location in the colder LOX tank. Immersed in
liquid oxygen, the cryogenic effect on the aluminum bottles allowed
them to be charged to higher pressures. They were also lighter,
because the cryogenic environment permitted manufacture of the helium
bottles with one-half the wall thickness of a noncryogenic bottle.
Produced by the Martin Company, the four helium bottles, 6 meters long
and 56 centimeters in diameter, were aluminum extensions of unique
length. Ducts carried the cooling helium down through heat exchangers
on the F-1 engines, then carried heated, expanded gaseous helium back
to the top of the fuel tank for ullage pressure.

From this NASA page.
Comment: I've seen a NASA document that says liquid helium was stored in the helium tanks in the 1st stage's LOX tank but I've also seen claims that the helium was stored at high pressure (3,100 psi). Clearly, there's no need to use high pressure with liquid helium. Does anyone know if the helium was really liquid or just high pressure gas?
Answer: Because all you have to do to get gaseous oxygen is take liquid oxygen and warm it up a bit.  That means just tapping off a little gas from the engine and routing it back to the tank to keep the ullage pressure where it needs to be.
Contrast that with RP-1, which doesn't really vaporize enough to get the pressure where it needs to be.  For that, they had to supply ullage gas.
Comment: Good graphics here if you'd like to use them: https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/20090016301.pdf
Comment: I guess technically, you could use the oxygen to pressure the fuel tank as well. Maybe adding a small spark might lead to even more pressure, at least for a while...


How to add custom ribbon button in Experience Editor

Question: I am currently using a custom Ribbon Button which has a command attached to it in the Content editor.
I want to create the same ribbon button in experience editor mode and use the same command.
Comment: Does this help your cause: https://doc.sitecore.com/xp/en/developers/102/sitecore-experience-manager/customize-the-experience-editor-ribbon.html?
Answer: I have implemented a custom button on the Experience Editor Ribbon. The requirement was to open a custom popup window by clicking on a button. So for this, I need to use Sitecore Rocks to create a button in the core database.
Then you need to create a class in your code that will be inherited with Sitecore.Shell.Framework.Commands.Command. This will have a method called Execute that will again call a Run method and here you need to write your logic.
After completing the things, you need to create a patch file and provide the entry of your class and assembly.
Then you have to create a JS file in your hosted application folder and it will generate the request.
I have only given you a brief idea that how it is going to be implemented. So I would like you to refer to this blog written by me that contains the step-by-step process to achieve this.
https://sbhatiablogs.wordpress.com/2019/09/02/add-a-custom-button-on-experience-editor-ribbon/
Hope this will give you an idea to complete your task.
Thanks
Comment: Without Sitecore rocks is it not possible ?


Is there a way to inject linear constrains during GAN training?

Question: Given that I'm training a generative model, (say a generative adversarial network), and I know that my (real) inputs (let's say vectors $\textbf{x} \in \mathbb{R}^n$) satisfy linear constraints of the form e.g. $a_1\textbf{x}_1 + \dots a_n\textbf{x}_n =0$, where the coefficients are fixed, is there a way to inject this knowledge during training?
Comment: no, actually the coefficients are thought to be specific, we would assume that the original data lie in the union of hyperplanes for some fixed coefficients.
Comment: are the $a$ coefficient specific values, or generic values? Cause if the latter I suspect the model will collapse and generate only zero values, since that's equivalent to ask the model to solve $XX^{T}=0$ which is true only for $X=0$
Comment: also, just as a side note, GANs are not models but rather training approaches, the generative model is only the generator architecture
Comment: @JamesArten Can you please include these details in the post itself and rewrite the title in the form of a question, i.e. your specific question? Thanks.
Answer: Maybe a bit too trivial to work out of the shelf, but I would try to add a component to the adversarial loss based precisely on the given set of coefficients.
Something like:
$L_{linear}= \frac{\gamma}{k} \prod_{k}A_{k}\hat{x}$
which combined with the adversarial loss (assuming minimax, but any other choice is fine as well) would become:
$L(G, D)=E_{x}[log(D(x))] + E_{z}[(log(1 - D(G(z)))] + \frac{\gamma}{k} \prod_{k}A_{k}\hat{x} $
where $A_{k}$ is a set of fixed coefficients of an hyperplane, and $\hat{x}$ the vector sampled from the generator. I would use a product operator since the loss should drop to zero when $\hat{x}$ lies in one of the hyperplanes.
Instead $\gamma$ can be used to scale the loss to a value in the range of the generator and discriminator losses.
Comment: precisely, I updated the answer to include the total loss, but I stress out again here that the choice of the adversarial loss doesn't matter, vanilla gan, non saturating gan, wasserstein gan are all good options. And you can add as many extra custom loss to it, as long as you formulate them to be converging to 0. (possibly smoothly, which is what my answer lack, it might be the case that as formulate naively now that extra component will assume large values now and then, fact that doesn't not prevent convergence per se).
Comment: many thanks, that looks interesting. When you say *adversarial loss* , are you considering the mean loss between generator and discriminator? Are you considering the standard GAN approach where binary classification loss is considered?
Comment: many thanks Edoardo. Just as a quick clarification, is the constraining term in the loss function intended to be $\frac{\gamma}{k} \mathbb{E}_z[\Pi_k A_k G(z)]$ , so we take the mean over the batch?
Comment: good point! Yes it's definitely the case that for batches larger than 1 the loss score should be averaged


Why isn't the date visible on the top bar?

Question: The day of the week time is displayed on the top bar...
Why isn't the date displayed there, like it was in previous versions???
Why on earth would this capability have been removed???
Comment: Which version do you have?
Comment: What version of Ubuntu are you using? After a fresh install, you should install Gnome Tweaks and from it, you can tweak the date and more.
Comment: I have just upgraded to ubuntu 18.04...   I found somewhere else someone recommended   I use dconf to customize the TopBar, and that seemed to work fine..    or would Gnome-Tweak-Tool be a better solution?
Comment: @MattB No, they do the same thing. Tweaks is less advanced, but more user-friendly imo (so you're unlikely to mess things up with Tweaks unlike dconf editor).
Answer: Assuming you are referring to Ubuntu 18.04...
... the format of the "top bar" is controlled by "Gnome Tweaks".
Install it, Start it, then you will find "top bar" configurations for enabling

Battery Percentage
Date
Seconds
Calendar weeks
Comment: I used dconf, and that seemed to work for what I wanted to do.  Would Gnome Tweaks be better?
Comment: (Again assuming you refer to Ubuntu 18.04 or 18.10), the man page for gnome-control-center (what is invoked when you go into "settings" (the tool icon)), says the following about your followup question:
"Note that gnome-control-center is not meant to expose each and every setting that is available. The settings that can be found here represent what is considered useful and commonly needed options. For more exotic or uncommon options, you can look at  gnome-tweak-tool or the gsettings commandline utility."


Build Mint.com like data pulling system from financial accounts

Question: Mint.com, during registration, takes financial information from the user and fetches the data from those financial accounts. For my portfolio website, I would like to build Mint.com like data pulling system that can get me their stocks and funds details. What would be the best way to do it?
Answer: Look at Yodlee. Mint used to use Yodlee before their acquisition by Intuit. Also, Personalcapital, FutureAdvisor use Yodlee to get financial transaction information.
Answer: You'll probably have to do this one at a time with each company.  Look first if there's an API avail thats the easiest.  If not then you might have to scrape the information, it'll be a tough as there's so many financial institutions and any change on their side could break your downloading process.


CARP Interface Doesn't Respond to Traffic

Question: I have two OpenBSD boxes on running as Gen1 VMs on Hyper-V 2016; the VMs are split across two Hyper-V hosts. The NICs associated with the CARP pseudo interface do have MAC address spoofing enabled; the CARP pseudo interfaces have a static MAC address in Hyper-V. I'm unable to ping the CARP interface, but can ping the IP of the NICs which support the CARP pseudo interface. In addition, the CARP interface is correctly assigning MASTER/BACKUP and I can see CARP traffic from the OpenBSD box when using tcpdump -ni hnv1 (the physical interface).
My /etc/sysctl.conf file is:
net.inet.carp.allow=1
net.inet.carp.preempt=1
net.inet.ip.forwarding=1

There's no change if I move them to the same Hyper-V host. Pf on the OpenBSD boxes is disabled.
HAProxy is performing as a TCP proxy for multiple web servers. I do not want/need offloading, etc. hence not operating as an HTTPS proxy; will also be load balancing an RDS box over tcp/443. HAProxy works if I target the IP for the FQDN at the non-CARP interface.
What else can I look at here? Are there any other groups I can look to for help with CARP? Most of the CARP information out there surrounds pfSense box configurations.
The switching infrastructure is simple. Both Hyper-V boxes are attached to an Ubnt ES-250W-PoE and there is a Ubnt ERLite as the router.
ERL (10.10.20.1/24 untagged; VLAN ID 1: 172.16.5.0/23; VLAN ID 4: 192.168.80.1/24) -> ES-250W (10.10.20.2; LACP bonds for Hyper-V boxes carry untagged, VLAN ID 1 & 4). Hyper-V boxes LACP switch passes on traffic, no IP assigned. OpenBSD boxes have hnv0 on the untagged VLAN, assigned space in the 10.10.20.0/24 subnet. hnv1 is used by the carp0 pseudo interface. hvn1 NICs use 192.168.80.2/24 and 192.168.80.3/24, for the respective OpenBSD VM. carp0 is assigned at 192.168.80.21/24.
The hnv1 NICs and carp0 do not have a gateway address assigned. Web servers are on the VLAN ID 1 assigned subnet.
I can ping 192.168.80.2 and .3 from any location on the network. I cannot ping 192.168.80.21 from any location except for the OpenBSD boxes themselves.
Answer: Turns out there must simply have been a bug in the CentOS 6.1 release build. I upgraded to -current from 7/13/2017 and CARP immediately began working with no other changes.


Confused about the anapole (toroidal) moment

Question: I am a bit confused about the existence of the anapole moment. As far as I understand, in order to fully describe a charge-current distribution, one needs, beside the normal electric and magnetic moments, toroidal moments. In the static regime, the lowest order, toroidal dipole moment, is called anapole moment. I can understand so far. Now, if I understand this well, the anapole moment appears when doing the expansion of the vector potential in term of $1/R$ i.e. a term of this expansion is associated with the anapole moment. However, in Griffiths and Jackson (these are the 2 books I used), when they derive the multipole exapnsion of the vector potential, they obtain the magnetic dipole, quadrupole and so on, but it doesn't seem to be any term left behind. Actually, as far as I understand, the anapole moment should appear at the same order as the magnetic quadrupole. So, assuming their derivation is general (and I assume it is as they took a random current distribution), where is the anapole moment term hidden? And where are all the other higher order toroidal moments, too? A second thing I am confused about is the fact that the anapole moment seem to produce parity violation in atoms. How can this be possible, as the anapole moment is a QED phenomena and QED doesn't violate parity. Is the weak interaction involved somehow? Thank you!
Answer: I'm not going to answer all your questions, but I'll try to clarify a few things.  I leave mathematical details to the references cited below. Additionally, I'll talk about classical electrodynamics and not QED.
There is a little bit of confusion about the nomenclature here, although even some published articles are not always coherent between them either.
There is no anapole term or moment or mode; the anapole resonance or state, occurs when the dipole (the one we are used to) and the toroidal dipole have identical amplitudes but opposite phases, hence canceling the total dipolar radiation ("ana" meaning "without" in Greek). It is thus an interference effect.
The confusing thing about the toroidal dipole is that it is, as you observed, omitted in most textbook derivations. The reason why is that those derivations are made in the static (or quasistatic) regime, where phase variations of the field across the structure (retardations) are neglected; this is also called long-wavelength limit.
When one takes retardations into account and derives the Taylor expansion new terms appear, the most important one being the toroidal moment. And it does not stop to the toroidal moment, there is an endless amount of higher order dipole moment in the expansions, although one could indeed expect them to be negligible in most cases.
If you are familiar with what is often called Mie theory (the theory of the field scattered by a sphere illuminated by a planewave), and the expansion of a scattered field onto vector spherical harmonics, the  anapole can appear clearly in the $a_1$ coefficient (the so called dipolar coefficient) as a sharp dip into an otherwise broad resonance (see Fig. 1 in [1]).
Plotting the $a_1$ coefficient in the complex frequency plane reveals multiple poles corresponding to the various terms mentioned above (the imaginary part of the frequency being related to the width of the resonance).

This very recent paper contains some interesting discussions; The figure 1 illustrates what I said about the dipolar Mie coefficient (called "c" in this paper):
[1] https://arxiv.org/abs/1908.00956
A very good and comprehensive reference about all this toroidal stuff is the following book: "Toroidal Multipole Moments in Classical Electrodynamics", by Stefan Nanz.
Inside should be the answer to the few questions of yours that I did not directly address.
If you do not have access to this book, the same author has published several articles on the matter; I could only find those two on arXiv: https://arxiv.org/abs/1507.00752 and https://arxiv.org/abs/1507.00755


Editing product images in gimp or other free software

Question: I am currently paying a Photoshop whizz to edit product photos for me (e.g, a lampshade), replacing the pattern with other patterns and colours, to use on my nursery décor website. I wondered if there was a free and easy way to do this myself, bearing in mind I have zero photo editing experience?
Comment: Free software shouldn't be the only criteria. GIMP is a nightmare for a beginner. Due it's distributed development every function has different basic user interface. Check if you can get an old photoshop for acceptable price. The last non-CC versions CS5-CS6 cost ridiculous sums of money, but Photosop 7 and all CS versions are solid pro quality stuff. CS2 even was freely available due the ending of Adobe support. More easy freeware: Paint.NET. A low cost pro level tool: Sherif Affinity Photo. Photoshop is the best choice due the enormous amount of tutorials.
Comment: The problem with older versions of software is generally newer versions of *operating systems*. You are not going to run Photoshop CS5 or older on MacOS 10.8 or newer or Windows 10
Comment: Possible duplicate of [Gimp: removing background from product images](https://graphicdesign.stackexchange.com/questions/29815/gimp-removing-background-from-product-images)

Not an exact duplicate but the method should work for isolating the shade portion nicely.
Answer: I'm not going to answer with a "how to".  There are tutorials online for this kind of thing, and other answers here on GDSE that would help.  However I would like to answer more generally on the question of whether you should do it yourself, or hire someone with the relevant skills.
GIMP has a steep learning curve like Photoshop, but it is capable of many of the things Photoshop can do. However, it's not easier, and in fact arguably it has less automation, and requires more manual effort than Photoshop.
The thing you need to ask yourself is if you have the time to devote to learning how to use the software. Or is your time better spent elsewhere, and your money better spent getting someone with the right skills. After all, time is as much a cost as money spent.
I'm not trying to put you off trying, or attempting to learn. I just want to let you know that GIMP is not an "easy" option. As for tutorials, youtube is a great resource for these.
Comment: Thank you. I am happy to learn, I just need to know what to look for. I don't have the time to learn gimp inside and out for one small edit, I was hoping someone could direct me to where I could learn this without wasting time on features that aren't important.
Comment: @RiannaBateman, no problems. Probably best if you look up tutorials on how to use layers, and layer masks, which are some of the pivotal concepts and functions required in photomanipulation work. Also basic tutorials on understanding the user interface might be beneficial.
Answer: @RiannaBateman, often it's simpler, faster and more easily reproducible, if it's feasible, to have a simple 3D model of the item in question, working in some program like Blender or modo, and then switch out the material of the given part being graphically versioned, and re-render.
Just a thought.


Galatians 4:13: What was Paul's "infirmity of the flesh"?

Question: Galatians 4:13 A.V.

Ye know how through infirmity of the flesh I preached the gospel unto you at the first.
Comment: Sadly we don't know and probably never will.
Comment: The affliction appears to be poor eyesight, the scriptures however  do not tell us so we will never know. Besides what it mentioned in the answers below, I  add the following.
Dim eyesight may be the reason why  Paul dictated most of his letters. Another possible reason, it appears that his poor eyesight failed him, we read in Acts 23:1-5 that he looked intently at the Sanhedrin and spoke sharply to the high priest, then apologized. And Paul said, "I was not aware, brethren, that he was high priest; for it is written, 'You shall not speak evil of a ruler of your "
Comment: He says, 1 Cor 16:,8 and last of all he appeared to me also, as to one abnormally born. To me, this suggests a congenital problem.
Answer: It seems probable that when Paul was blinded on the Damascus road and subsequently healed at the hands of Ananias, the healing was partial and his eyes continued to give him ongoing trouble. This is strongly hinted at in the immediate context of Gal 4:13; in v 15, Paul says that had it been possible, the Galatians would have plucked out their own eyes and given them to him. But why would they have had such an inclination unless he had difficulty with his eyes?
A further hint may be found in Gal 6:11, where (on the most probable interpretation) Paul notes the large size of the letters with which he is writing the closing section of the letter.
Comment: Very interesting. But that would suck some of the miraculous out of his conversion story.
Comment: If Scripture does not clearly say can't we say - Scripture does not clearly say - and leave it at that?
Answer: There are 3 accounts in the book of Acts that give an account of Paul's healing from blindness after seeing the glorious light of Jesus Christ, chapters 9, 22, & 26.  None of the accounts give mention to a partial healing & seem inconsistent with the analogy our Lord purposed saying in 26:18, "...I am  sending you to open their eyes so that they may turn from darkness to light and from the power of Satan to God ...".  Upon observing in 2 Corinthians 11:23ff the partial list of affections the Apostle suffered it is anyone's guess as to which suffering may have left him  with a lasting affliction; however the mentioning of eyes being given if possible & Paul writing with his own hand in large letters, something not normal for the time with limited surface to write on, might indicate that his eyes may have suffered from the many beatings or stoning so that he would learn that God will use our weakness for His strength so that He receives the glory.  In Athens, before Paul's 3rd missionary journey that would take him through Galatia, Paul had no problem viewing all the false idols or the inscription, "To the unknown God".   I would suggest his eyes were fine following his receiving his sight from the Almighty at his conversion & perhaps from suffering for Christ bad eyesight might be one of the "marks I bear in my body" mentioned at the end of Galatians 6?
Answer: We do not know what Paul's "infirmity of the flesh" or "thorn in the flesh" was and so all suggestions are educated guesses.  I understand the arguments for poor eyesight but none of the reasons advanced hold much water because each can be explained as ordinary literary devices and hyperbole.
Here is another suggestion (that is only an educated guess) based on Paul's remarks in 2 Cor 1:8-11.  Paul may have suffered from sporadic bouts of depression - his remarks in 2 Cor 1:8 where he "despaired of life itself" suggests extreme mental anguish.  This would be consistent his remark in 2 Cor 12:7 where he says that this was, "a thorn in my flesh, a messenger of Satan, to torment me."
This may be a question that we will need to wait for the next life in order to ask Paul himself.
Answer: The context is Paul's defense of his apostleship. If Paul is able to boast according to the standard of the flesh, then he has more reason to boast than anyone else and he begins to compile a list of reasons to prove why this is true, 11:16-28.
Beginning in verse 22, he says, "Are they Hebrews? So am I. Are they Israelites? So am I. Are they descendants of Abraham? So am I." These are all genealogical factors that he has in common with all other Jews. Then in verse 23, he begins to set forth a list of comparisons in which he is proven to excel above them all. "Are they servants of Christ? (I speak as if insane) I MORE SO; in far more labors, in far more imprisonments, beaten times without number, often in danger of death."

"Five times I received from the Jews thirty-nine lashes."
"Three times I was beaten with rods, once I was stoned, three times I was shipwrecked, a night and a day I have spent in the deep."
"I have been on frequent journeys, in dangers from rivers, dangers from robbers, dangers from my countrymen, dangers from the Gentiles, dangers in the city, dangers in the wilderness, dangers on the sea, dangers among false brethren;
"I have been in labor and hardship, through many sleepless nights, in hunger and thirst, often without food, in cold and exposure."
"Apart from such external things, there is the daily pressure on me of concern for all the churches. From 11:29 through 12:8 he stresses the fact that these are all things that Paul regards as weaknesses of the flesh. These are things that are hard to endure and that he had the right to boast in the fact that he has suffered in the flesh more than all of them. In 12:6 he says that he does not wish to boast in these things, "... but I refrain from this, so that no one will credit me with more than he sees in me or hears from me."

In verse 7, Paul gives the paramount reason for his capacity for boasting which was "the surpassing greatness of the revelations." To keep him from boasting and exalting himself in this he was given a "thorn in the flesh." The 'thorn' represents something that is external to the flesh but that is intrusive to the flesh. In spite of his petition to God to remove it, God says "My grace is sufficient for you." It is not through Paul's own power that he is able to endure these suffering that have been imposed upon his flesh (not to mention the psychological stress that accompanies these types of experiences), it was the grace of God that enabled him to endure them and to continue to preach in spite of them. The connecting statement that links all of this to gather is in verse 10 when he says, "THEREFORE." Whatever he says next is rooted in everything he has said up to this point and he connects it to the thorn that was given him. "Therefore, I am well content with weaknesses, insults, distresses, persecutions, and difficulties for Christ's sake. Why? Because "when I am weak THEN I am strong." The thorn made him weak. The grace made him strong. NOW, he is able to rejoice in his sufferings - in his thorn.
So, because of the "the surpassing greatness of the revelations," Paul was allowed to suffer all of these hardships - thorn in the flesh - in order to keep him from exalting himself. One is not so likely to be self-exalting when he is having the hide stripped from his back with a scourge or having to go hungry or floating around in the sea or having his bones broken from being beaten with rods or lying in a pit left for dead after having been stoned. God allowed these things so that Paul would learn humility in spite of the exalted status that God had granted him. Remember what God told Ananias in Acts 9:16 "I will show him how much he must suffer for My name's sake."
I know this is a very brief exegesis of this text and I certainly do not claim it to be infallible. It is possible that I have missed it but, it seems to me that Paul has been very clear in explaining the nature of the thorn that he had been given. If anyone has a better exegesis of this text than this, I am certainly open to correction.
His problem with his eyesight has been a favored speculation even among many commentators. We do know from Gal. 6:11 that Paul seems to have had some type of deficiency with his eyes but the nature of what the thorn was seems very clearly defined in the context of 2Cor. 12. Paul uses three different descriptive terms all of which refer to the same thing. He calls it a 'thorn in the flesh', a 'messenger from Satan', and 'my weaknesses'. These weaknesses are not of a singular nature. They are described as insults, distresses, persecutions, and difficulties all of which are in the plural. I do not doubt that his seeming deficiency with his eyes would certainly fall within this menagerie of weaknesses. The 'thorn in the flesh' is simply a descriptive term which he employed to describe a host of things he was called to endure for the cause of Christ. Their purpose was to keep him humble in the midst of his exalted position. It is hard to be proud and self-exalting when someone is beating the hide off of your back with a scourge or breaking your bones with rods or stoning you. These types of experiences are by their very nature, humbling.
Answer: Go back to Acts 14:19-20. After he was stoned and almost died in Lystra, he and Barnabas went to Derbe the next day, this was in the region of Galatia. That was the first time (first journey) he went to the region of Galatia which he mentioned in Galatians 4:13. If you are stoned to the point of death, you will sustain some very serious injuries and I guess it's the problem that he was referring to in Galatians 4:13. My greek is not the best but the concordance G769 used in the KJV (infirmity) refers more to weakness, lack of energy or feebleness than a specific disease. This could be the result of damages done to his body due to the stoning.
Comment: Interesting idea - what evidence to we have of such an assertion?
Answer: It makes more sense that it would be symptomatic, rather than a specific disease. Judging from the previous answers relating to scripture, Paul's poor eyesight was ongoing; and he was still able to continue his spreading of the gospel. Therefore, an acute, rather than chronic, illness would more than likely be the reason for postponing travel.
Comment: Welcome to BHSX.  Thanks for your contribution.  Please take the tour (link below) to better understand how this site works.  This answer could be greatly improved by quoting some Bible references or other references.
Comment: I have up-voted +1, to encourage more and in expectation of some scripture quotation being added.
Answer: According to the Book of Galatians,  Apostle Paul seems to have developed bad eyesight during his persecutions in the hands of persecutors as evident in Act 14:19

From now on let no one trouble me [by making it necessary for me to justify my authority as an apostle, and the absolute truth of the gospel], for I bear on my body the branding-marks of Jesus [the wounds, scars, and other outward evidence of persecutions—these testify to His ownership of me]. (Galatians 6:17 AMP)

Act 14:19

But Jews came from Antioch and Iconium, and having won over the crowds, they stoned Paul and dragged him out of the city, supposing him to be dead
Comment: Being beaten can escalate any natural ailment.  For example: Slapping someone with diabetic retinopathy can develop into full single blurred eye within a short period of time compared to similar patient not beaten in the eye. I had a similar experience.
Comment: Very good answer, but kindly avoid paraphrase translation like AMP. Use a literal one like ESV. Use Stepbible.org. I think if he had got blinded by one ye, he would have been called "a blind" in his debates by opponents. Eyesight doesn't diminish by stoning, but only one eye can get damaged. But it's still possible.
Comment: Its very clear that Apostle Paul had an eye problem which could have resulted from his frequent persecutions during his early ministry.  You know it was because of a bodily ailment that I preached the gospel to you at first, and though my condition was a trial to you, you did not scorn or despise me, but received me as an angel of God, as Christ Jesus.
Galatians 4:13-14 ESV
Comment: I agree but it is more likely to be a natural illness rather than beating.
Answer: The Answer is revealed in Acts!
According to Gal 4:13-15, Pauls "infirmity of the flesh" was during "the first time" Paul preached in Galatia.
In Paul's first mission in Galatia, Paul was rejected and stoned in Lystra (Acts 14:19). The next day, he walked miles to Debre (a province of Galatia) (Acts 14:20-21).
So he's making a clear reference that his flesh was outwardly beaten and bruised when he preached to them during this "first" mission trip. He likely had bruises on his eyes.
Comment: Welcome to Biblical Hermeneutics.  When you have a moment, please take our Tour to understand how we are different to other sites:  https://hermeneutics.stackexchange.com/tour
Answer: Zzzz. Wrong.
Saint Paul …. Gave us the answers in his Writings, as did the Good lord & Lord Jesus.
That's the beauty of The Good Word- it constantly reveals to us as we grow and change in the lord.
Truly Blessed we are.
Am3n
Comment: This is not the tone we want to have on this site. Also, we are looking for more supporting information and details, such as citations of scripture or other commentaries, as part of a well-reasoned argument.
Answer: Honestly, I would like to know what his infirmity was - or as someone else (above) noted from the translation - that it was some weakness not from a disease. And… in v 14 of chapter 4 (right after v 13 "through infirmity of the flesh I preached") - Paul denotes it as his "temptation" that the Galatians knew about & "despised not, nor rejected, but received" him.
What is the context of Galatians?  Chapter 3 calls the Galatians foolish for being caught up in the law Vs faith.
So - what is truth?  We are all human. We all sin. And yes - even Paul sinned. I think this is what he is speaking to. We can't not sin until Christs return and our transfiguration. Does it really matter what Paul's sin was?  Consider - if we knew - then it might become a stumbling block for some.  Based on his other writings - I highly doubt that it was a sexual sin. Perhaps he drank or took something for his pain & it was noticeable. But regardless - we all sin.
Consider lying - we try not to - but everyone does at some point. Some even excuse it away - saying it was to protect someone. But we know in Rev 21:8 "But the fearful, and unbelieving, and the abominable, and murderers, and whoremongers, and sorcerers, and idolaters, and all liars, shall have their part in the lake which burneth with fire and brimstone: which is the second death."
Perhaps we all need to read Galatians again & consider. Could this be speaking about how we shouldn't judge other people? Are there deeper revelations here?  I would like to know.
Comment: This does not provide an answer to the question. Once you have sufficient [reputation](https://hermeneutics.stackexchange.com/help/whats-reputation) you will be able to [comment on any post](https://hermeneutics.stackexchange.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/47161)
Answer: <code> Thorns in the old testament seems to refer to people. Numbers 33:55 "But if you do not drive out the inhabitants of the land, those you allow to remain will become barbs in your eyes and thorns in your sides. They will give you trouble in the land where you will live".
</code>
Judges 2:3 "Wherefore I also said, I will not drive them out from before you; but they shall be as thorns in your sides, and their gods shall be a snare unto you".
Joshua 23:13 "then you may be sure that the LORD your God will no longer drive out these nations before you. Instead, they will become snares and traps for you, whips on your backs and thorns in your eyes, until you perish from this good land, which the LORD your God has given you".
Comment: Welcome to Biblical Hermeneutics! and thank you for your contribution. When you get a chance, please take the [tour] to understand how the site works and [how it is different than others](https://hermeneutics.meta.stackexchange.com/questions/653/how-can-we-educate-new-users-about-our-site-distinctives/803#803). I also recommend going through the [Help Center](https://hermeneutics.stackexchange.com/help)'s sections on both asking and answering questions.
Comment: This does not provide an answer to the question. Once you have sufficient [reputation](https://hermeneutics.stackexchange.com/help/whats-reputation) you will be able to [comment on any post](https://hermeneutics.stackexchange.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/48613)


How does lichess lessons compare to chess.com's?

Question: Both Lichess and chess.com have lessons that I have tried out briefly. I have the perception chess.com (paid) lessons (https://www.chess.com/lessons) and even Youtube lessons are much broader and higher quality than lichess practice sets (https://lichess.org/practice). Lichess also has community studies (https://lichess.org/study) which I feel tend to be pretty basic and also not written or explained well. Is this perception objectively correct? From experience, are lichess lessons inadequate for anyone other than a beginner?
Answer: A lot more resources are put into chess.com lectures than into lichess studies/practice.
This can be seen for example in the coverage of wrong moves and explanations for them being wrong. Chess.com pays trainers and employees to create high-quality material, but that means that you will also have to pay for them.
On the other hand, lichess studies are usually created by amateur chess players. Overall, you can hardly compare chess.com lectures and lichess studies.
I am sure that there are great community studies on lichess, but you have to find them. The quality of lichess studies only depends on the individual creator of that study. However, you can be sure that all chess.com lectures have a certain standard. Most lichess studies cover openings, whereas chess.com has many lectures on all parts of the game.
Comment: That's exactly why lichess created the staff picks: https://lichess.org/study/staff-picks . So now you know which studies are actually good.
Comment: Thanks for the list and for creating these studies! That's really cool - there they are - the good community studies.
Comment: So, OP can start with the lichess staff picks without having to spend on a chess.com membership. If OP is looking for an extensive range of topics or larger amount of lectures, he can consider chess.com later.


Remote node to check wallet.dat

Question: I don't have enough disk space to download 500GB full node. I want to check my old wallet.dat balance. Is there any free public remote full-node available to check my wallet.dat?
Comment: There is a network of free public remote full nodes available to download valid blocks from. You want to download blocks from them, you don't want to send them your wallet.
Answer: You could run the node in pruning mode. It will then process the entire blockchain but discard old block data after processing it. This will reduce the required disk space to ~10 GiB, but maintain the security and privacy of your wallet.
You could also open the wallet in a fresh install of Bitcoin Core configured with <code>-maxconnections=0</code> to prevent it from downloading the blockchain. It should still show you the latest state of the wallet in the GUI, from how far the node was synchronized when you made the backup. You could then use the listed receive addresses to look up on a block explorer whether the funds have meanwhile been spent.
Comment: Thank you very much for your reply, this is all about my download. My question is how can I check the balance in my wallet.dat file by accessing the remote public server without download. In bitcoincore how to get balance of a wallet.dat on free public node?
Comment: No, you cannot load your wallet.dat into public nodes, they do not offer such a function, as it would defeat their purpose. Your options are either running a node  yourself, or dumping all addresses from it and looking those up or importing them into more lightweight wallet software (and accepting the privacy loss that entails).
Comment: Thank you lot reply right answer of my query

Remote node to check wallet.dat


Merge 2 different Google my Business accounts with 2 different locations for same company

Question: I have for a client 2 different GMB accounts, 2 different locations since it has 2 shops but I want to merge these accounts since they belong to the same brand name.
How is that possible?
Answer: Google My Business only supports merging of duplicate accounts and not locations, therefore you will need to go ahead and delete one. Then you simply attach another location to the main GMB account, it'll send a postcode out where you will need to verify the address again.
Comment: And for attaching another location I have to use exactly the same company name?
Comment: An address doesn't include a company name therefore there is no database Google can use to verify if true or false.


How to proceed with iodometric titration to determine caffeine concentration in liquid coffee?

Question: Context
I'm a high school student who decided to investigate the relationship between caffeine concentration and brewing temperature of coffee out of their love for the substance. For my method, I opted for iodometric back titration, as detailed in this paper and shown in the image below. I've verified the method is viable with a known concentration of caffeine obtained by using caffeine tablets, but I am struggling to repeat the results on brewed coffee.

Problem
When performing iodometric back titration on brewed coffee (as opposed to pure caffeine solution) with starch as an indicator, the end point isn't clearly defined because it is no longer colorless due to the natural brown pigments in brewed coffee.
I've looked into several potential routes that could help me mitigate the issue (detailed below), but I'm looking for advice on the most convenient (requiring the least time, resources, and skills) way to proceed. Of course, I'd like to maintain a certain level of quality, but it isn't as vital.
Paths I've considered
1. Titration with spectroscopy
Carrying on with titration as previously, but using a colorimeter to detect the end point. From my limited understanding of the technology, I presume that I would be able to detect when the concentration of a certain compound (e.g. iodine-starch complex) would reach zero. A limitation I can foresee is that I would need to test a sample of the solution every time I add a drop of the titrant, which would become very time-consuming on many trials.
2. Extracting caffeine
Using an organic solvent to isolate caffeine and then perform the titration on that substance. The problem is that I'm not sure if the titration reaction (described in the paper linked above) will still hold. Furthermore, I am limited by the availability of organic solvents (can't use chloroform and likely not DCM either). Some other solvents are addressed in this question.
3. Filtrating the color of coffee away
Practically the inverse of the above, using a filter (activated carbon) to produce colorless liquid by removing pigments (melanoidins?). The problem is that information on this is quite limited when it comes to coffee and from my research both caffeine and iodine would be adsorbed by activated carbon. Perhaps I could mitigate this by pre-saturating the activated carbon with caffeine or iodine?
4. Switching to green tea
My supervisor actually advised this in the beginning, but I insisted on coffee (I know, I know). I wouldn't prefer this path because of the costs already sunk into preparing coffee samples, but if there is no other alternative...

All in all, these are just some of the possibilities I've thought of, but I am sure there are some missing. What would be your advice on how to proceed with iodometric back titration, considering the limitations in time, resources and skills?
Comment: Maybe take an aliquot after the precipitation reaction and dilute several times before titration to make the solution translucent enough to be able to see the blue-colourless change.
Answer: Classical volumetric titrations are not selective. This means if there are multiple components in the mixture, they will react with the reagents used in the titration. Since coffee and tea are real-world samples with hundreds of other compounds besides caffeine, there will be other oxidizable materials, which may/will react with iodine. One would suspect that tannins would also be oxidized by iodine. Your results will always be overestimated. What is the solution? A real sample titration requires sample preparation. Ask your teacher to help with extracting caffeine from tea or coffee with a suitable solvent in a separatory funnel. After extraction, you will have to evaporate the solvent. Those colors would not be extracted in a non-polar solvents. I will let you research more on what solvents starting from here Caffeine extraction. After that one may proceed normally as suggested in the Olympiad manual.


looking for you tube video downloder app

Question: I am looking for a software, that can download video's from youtube like website.
And also it should be able to download flash video's
Answer: Not sure about flash videos as they may contain active content but a great tool is youtube-dl which runs under python it also can require one of FFMPEG/AVCONV for some operations.
Windows Installation Options:
Python Installation: Install as a part of python with, after installing python if you don't have it, pip install --upgrade youtube-dl, the homepage gives other methods for Linux & Mac users, or
Windows Only Executable file: Download the pre-built exe and place it in a local directory or anywhere on your PATH other than C:\Windows\System32 then run from the command line.
Usage
There are lots of options but the simplest use is to find the video that you wish to download on YouTube, or dozens of other services, copy the video URL and from the command line run youtube-dl URL for it to go and get the video.
Features

Free, gratis & Open Source
Windows executable or scripts that run on Linux & Mac.
Options to throttle download speed
Options to supply password if needed
Options to specify downloaded video quality
Options to specify downloaded video format &/or convert
Options to include subtitle file(s)
By default works faster than realtime, (depending on your connection speed)
Currently 3gp, aac, flv, m4a, mp3, mp4, ogg, wav, webm are supported video download formats to select for download Note that some videos may not be available in some formats from some URLs You can use youtube-dl --list-formats URL to find out which formats are available.
Answer: If you want web-only solution you can use Savefrom.net of Savemedia. No need to install (potentially unwanted) video downloader. I used both for downloading my favorite Youtube videos and there's almost no problem using them.


Generate sample of a random process with given correlation function

Question: My task is in numerical modeling evolution of a random quantity.
For this, I need first to  generate a multitude of sample sequences that correspond to a predefined correlation function. In other words, considering  the process $a(\mathbf{x})$  is a function of N-dimensional vector $\mathbf{x}=(x_1,\ldots,x_N)$ and supposing its stationarity, i.e. $\langle{}a^{\ast}(\mathbf{x}')a(\mathbf{x}'')\rangle=K(\mathbf{x}''-\mathbf{x}')$, which way can I generate random samples of $a(\mathbf{x})$ that obey $K(\mathbf{x}''-\mathbf{x}')$ ?
Comment: Do you have any more specific requirements other than just the covariance function, e.g. that the process should be Gaussian?
Comment: It would be great if the only requirement is stationarity, however, Gaussianity can be added to first approximation.
Comment: I mean without something else it will be impossible to specify how to draw samples.
Comment: Ok. To be more specific, suppose that the process is Gaussian.
Answer: I'll assume you have some finite grid  $\{x_1,\dots, x_n\}$ of x values on which you want to draw samples. In this case, $a$ is simply an n-dimensional multivariate gaussian with covariance matrix $C_{ij}=K(x_i-x_j)$. Many libraries (for example numpy) have builtin functionality to sample from such distributions.
However, if you need to take many samples, this can be rather slow. One trick is to do a PCA and keep only the first few components. That is, let $v_i,\lambda_i$ be the eigenvectors/eigenvalues of $C$, with $\lambda_1\ge\lambda_2\ge...$. Now fix $K$ and consider the random veector  $a_K=\sum_{i\leq K} \sqrt{\lambda_i} X_iv_i$ where $X_i$ are iid unit normals. If $K=n$ (so we include all eigenvalues)then it is not hard to show that $a$ satisfies the desired covariance structure (in fact it is a gaussian process).
Often there exists $K<<n$ so that, for example $\sum_{i\leq K} \lambda_i/\sum_i\lambda_i>.95$. In this case, the truncated sum will be an excellent approximation to samples from the true distribution, and will be much faster, because each sample of $a_K$ requires $K$ independent gaussian samples, rather than the $n$ correlated samples required by the naive method.
Note this can also be done in the continuous case, and is called a Karhonen-Loeve decomosition.


Method to compute empirical derivative about some point

Question: I have black-box access to some function and I want to compute the derivative about the point X. Is there a method that does this?
Comment: https://en.wikipedia.org/wiki/Numerical_differentiation. Or did you have a more specific question?
Comment: @DaveKielpinski No this was it. There's at least one notion of a "simplex gradient" that was introduced for this reason: this inspires me to look further.
Answer: http://en.wikipedia.org/wiki/Numerical_differentiation
Or did you have a more specific question?
(posted following @gung's encouragement above)
Comment: Although error estimates were not mentioned in the question, I was trying to put forward the view that any discussion of numerical differentiation in such a context (a "black box") on this site (which concerns *statistical* analysis) *needs* to acknowledge the possibility of making such estimates and the importance of doing so.  Indeed, whenever the answer to a question here on CV is a single line, that's a sign the answer is incomplete and perhaps ought to be expanded (or perhaps the question ought to be closed as unsuitable for our format).
Comment: That's an interesting point of view. You're obviously one of the people who runs things around here, so do what you like, but I wouldn't have assumed that. I just try to answer the questions as they're posed, and the OP was satisfied.
Comment: Thank you for pointing in the right direction.  I think Wikipedia skirts around the issue, though: the key is to compute the derivative *while obtaining an error estimate for the answer.*  It doesn't seem to address that issue at all.
Comment: Error estimates for derivatives are not mentioned in the question. If you want to create a new question around that, I can try to answer. Upvoting my current answer would be encouraging in that regard :)


how to run 2 different servo (continuous rotation and regular servo) in parallel, not run one after other?

Question: I need to control 2 servos in parallel, whereas one is of continuous rotation and another is of regular positioning control (angle) on arduino IDE. I tried but it works one after another, not parallel. How can I do that, please suggest. Thanks.
Comment: Please post the code that is not working as expected in a minimum example. Then I can try to help.
Comment: you can only control one at a time. You can switch between both servo after, so that, it seems to be happening in parallel
Answer: I am proposing one answer
https://wokwi.com/arduino/projects/297646292038844936
Here, we are not using the delay function. We are using the millis()
Based on your actual application, you can control individual servo accordingly.
Here is the Arduino simulation:
https://wokwi.com/arduino/projects/297646292038844936

/* Sweep
  by BARRAGAN <http://barraganstudio.com>
  This example code is in the public domain.

  modified 8 Nov 2013
  by Scott Fitzgerald
  http://www.arduino.cc/en/Tutorial/Sweep
*/

#include <Servo.h>

Servo myservo;  // create servo object to control a servo
Servo myservo2;  // create servo object to control a servo

// twelve servo objects can be created on most boards
unsigned long previousMillis = 0;        // will store last time LED was updated
const long interval = 15;           // interval at which to blink (milliseconds)

int pos = 0;    // variable to store the servo position
int pos2 = 0;    // variable to store the servo position

void setup() {
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
  myservo2.attach(10);  // attaches the servo on pin 9 to the servo object

}

void loop() {
  unsigned long currentMillis = millis();

  if (currentMillis - previousMillis >= interval) {
    // save the last time you blinked the LED
    previousMillis = currentMillis;

    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    pos = pos + 1;
    if (pos > 180) {
      pos = 0;
    }                      // waits 15ms for the servo to reach the position

    myservo2.write(pos2);              // tell servo to go to position in variable 'pos'
    pos2 = pos2 + 1;
    if (pos2 > 90) {
      pos2 = 0;
    }

  }

}

Answer: The angel of two Servomotors should be same ?
If yes,
Try this for 180 deg. Servos :
You can connect signal pin of ech servo to a specific PWM pin of Arduino like pin number '9' in this example
It's just for test but you can change this how you want to
I hope it will work you,
Good luck
#include <Servo.h>

Servo myservo;

int PWMpin = 9;  // change this for your circuit configuration

int a = 0;

void setup() {
  myservo.attach(9);
  myservo.write(0);  // set servo to mid-point
}
void loop() {
  for (int i = 0; i < 180; i++) {
   myservo.write(i);
    delay(10);
  If (i == 180) {
    analogWrite(PWMpin, a);
    }
  }
}

Comment: Please don't post code as a image.
Comment: Thanks @Hamid 'Smith' Salehi for your reply. well, the servos I am using are not the same, i mean one is of continuous rotation and one is regular, so what i wish to have it like the continuous rotation servos should be rotate with the regular servo which should run between 0~180 deg in parallel. ans these are connected to pin 9 and 10 respectively.
Comment: The only difference of servomotors is their rotation limitations? Both of them works by standard PWM ?
Answer: As i know, there is no way for a single arduino or any other microcontrollers to command on pins in exactly same time and it's because of microcontrollers nature.
When you have to command 2 outputs
Microcontroller will be act like this :
Command 1 .... To pin number 9
Command 2 .... To pin number 10
and for example if your microcontroller, like arduino or others do each command in one complete clock cycle and your clock frequency will be 16 MHz, so each cycle's time period is 62.5 nano-seconds.
So your microcontroller will do your command in first clock cycle and do the second command in next clock cycle,
In the other words, command 2 will do 62.5 nano-second after command one (if each those commands takes just one clock cycle) but in normal 16 MHz arduino boards it takes much much more time to do commands like this and it was just an example to understand it's principle, and because of this reason i suggest you to connect both servomotors into same output PWM pin if you are using two standard servomotors;
But the main issue is different angle limitations of your servomotors and it's impossible to control them when you want one of them to rotate 360 deg. and the other must rotate 180 deg. .
If you connect those signal pin to a same output, you have two options with two issuse.
First, if you command to the output pin to turn 360 deg. , All things will be good but when your output pin command for angles more than 180 deg. , The little servo will stop.
Second, if you limit your rotation to 180 deg., You will not be able to rotate 360 deg. Your bigger servomotor.
I hope my description will be useful and face you by your complete pattern of what's going on in this project's issue


Is length/distance a vector?

Question: I have heard that area is a vector quantity in 3 dimensions, e.g. this Phys.SE post, what about the length/distance? Since area is the product of two lengths, does this mean that length is also a vector quantity, and why?
Comment: Would be fine if you could give us what you mean by area, length and vector. The answer to your question depend on the definition you use.
Answer: Length and distance are not vector quantities (they are scalar quantities), but position and displacement are vector quantities (at least according to common terminological conventions).  Here is how all of these are defined.  Note that I am restricting the discussion here to vectors in three-dimensional Euclidean space $\mathbb R^3$.
Every point in three-dimensional space can be specified by a triple of real numbers $\mathbf x = (x,y,z)$ given its coordinates with respect to three axes.  This triple is called the position of the point and is clearly a vector.
The length of any vector, such as a position vector, is defined as
$$
  |\mathbf x| = \sqrt{x^2 + y^2 + z^2}
$$
Notice that, by definition, length is a positive real number.  Given two points $\mathbf x_1=(x_1, y_1, z_1)$ and $\mathbf x_2=(x_2, y_2, z_2)$, the displacement vector pointing from point $1$ to point $2$ is defined as
$$
  \mathbf x_{21} = \mathbf x_2 - \mathbf x_1 = (x_2-x_1, y_2-y_1, z_2-z_1)
$$
The length of the displacement vector is called the distance between the two points and is therefore given by
$$
  d(\mathbf x_1, \mathbf x_2) = |\mathbf x_{21}| = \sqrt{(x_2-x_1)^2+(y_2-y_1)^2+(z_2-z_1)^2}
$$
Note. I have heard some using the terms distance and displacement interchangeably, or using the term displacement for what I have called distance, and using distance to refer to the total length of a path along which an object travels.
Having said all of this, there is in fact a product that allows one to construct area vectors given two position vectors.  It's called the cross product.  If you take the cross product
$$
  \mathbf x_1\times\mathbf x_2
$$
of two position vectors, then you get a vector whose length is the area of the parallelogram spanned by these vectors, and whose direction is perpendicular to this parallelogram.
Comment: I disagree that position is a vector, position is specified by coordinates, but it's not a vector; it's not a quantity with a magnitude or direction...the displacement vector is a different thing and is a vector. Just thinking in terms of differential geometry, coordinates and vectors are not the same thing.                                         @Oaoa What you are saying would be right in a different context, but not in this one.
Comment: @JLA Huh? In the classical mechanics of systems of particles, positions are represented by elements of $\mathbb R^3$ which forms a vector space under the standard operations of scalar multiplication and component-wise addition.  As a result, there is absolutely nothing wrong with using the (completely standard) terminology "position vector."  Certainly positions, like those of points in spacetime as in GR, *can* in some contexts be represented by points on manifolds which aren't necessarily equipped with a vector space structure, but that's a context which I doubt the OP was referring to.
Comment: I'm not saying it's not standard terminology, I just don't think they are the same kind of vector, and it can be confusing to bag them together...It is standard to call angular momentum a vector, but it's clearly not the same kind as a velocity vector. If you change the place of the origin, the position vector changes, a velocity vector won't.
Comment: Vector is just defined as an element of a vector space (see http://en.wikipedia.org/wiki/Vector_space#Definition for instance). As such, a length could be seen as a vector if you allow negative length to exist. Otherwise inverse does not exist in general. It is clear that the definition of length given by joshphysics is not a vector for this reason. This is because the length he defined (the most common definition in everyday life) first requires the notion of scalar product to be defined. This is not necessary to define a vector.
Comment: I didn't interpret the OP's question in the formal sense of a vector space, that isn't usually what physics people mean when they use the term vector, otherwise anything could be a vector. They usually mean vectors as in velocity vectors, formally tangents to curves or whatever. It makes sense to write the position of a particle at $(0,1)$ as $\hat{y}$ in cartesian coordinates, but how would you do so in polar coordinates? In polar coordinates the same position is written $(1,\frac{\pi}{2})$, but I don't think identifying that with $\hat{r}+\frac{\pi}{2}\hat{\theta}$ works.
Comment: @JLA I'm not actually clear on what your claim is exactly, but I think this suffices to demonstrate that I'm using terminology in a standard way: http://en.wikipedia.org/wiki/Position_(vector)
Comment: @JLA I believe this question is ill-defined, the reason why you misunderstood it. Since there is no definition of either length, area or vector, one can answer whatever we want. Be careful though, position requires a priori a manifold to exist, whereas a vector doesn't. Polar coordinates define a local basis also, what is sometimes called a moving frame. So the transition from Cartesian coordinates to polar ones you gave is wrong. Putting $\theta = \pi/2$ and $r=1$ in the definition $x=r\cos \theta$ and $y=r\sin \theta$ works.

Is length/distance a vector?


Is there any way to obtain contact list of specific path in a journey?

Question: Here we have a case which needs to export contacts who passed a specific path in journey to 3rd party system. Is there any way to catch those contacts and add them to specified data extension?
Answer: We run a large number of journeys that have a similar requirement. Our solution was to create a Journey_Flags DE and update this within each Journey via an 'Update Contact' step with relevant campaign codes, entry/exit datetimes, path flags, etc.
This way we can keep a rich record of customers' journey progressions in one DE, makes that data easily available for other journeys/filters/etc to reference, gives us plenty of flexibility to expand and adjust, and makes it simple to export for reporting and other tasks.
Comment: Hi Rainer, it seems to be a good idea, there's more information long for your elaboration. 1) Since 'Update Contact' activity uses Contact Key to map and update DE attribute value, it means I can have only one record for each contact, how can I record contact journey history in multiple journeys in one single DE? 2) Does that mean I have to use different DE for each Journey? Many thanks!
Comment: Our solution was to expand horizontally, in that we created a number of standard columns that we add to the table for each new journey we add. This way there's one master record of all the customers' journey activity, making it easy to integrate into the data model, simple to reference in filters, easy to export, and so on. This doesn't work as well if you have journeys that allow for an anytime re-entry, but this can be worked around. If you prefer to keep use a transactional model, that's possible with a some basic SQL + 2 DE's to store current activity and a historical record.
Comment: Got it. Just curious how many fields have you created in this DE so far?  :)
Comment: We have 107 fields so far, covering 21 unique journeys.


Power waves and scattering matrix

Question: I have some doubts about the concept of power waves used in the description of the scattering matrix of an N-port component. In particular, I was wondering what is the most general and correct definition of incident and reflected power wave.
In almost all the texts and sites on which I have searched, it is taken as the impedance of normalization the same characteristic impedance of the LdT connected to the port. However, from what I understand, in the more general case it is possible to assume a normalization impedance different from that characteristic of the transmission line connected to the considered port. In this case, how are the incident and the reflected power waves defined? Is there any text where I can find this argument?
Answer:
However from what I understand, in the more general case it is
possible to assume a normalization impedance different from that
characteristic of the transmission line connected to the considered
port.

That doesn't sound useful or right.
If you don't use the same impedance of the transmission line (\$Z_0\$) you can't properly define reflections based on reflection coefficient (\$\Gamma\$): -
$$\Gamma = \dfrac{Z_L - Z_0}{Z_L + Z_0}$$
And this means you can't define standing wave ratio: -
$$SWR = \dfrac{1 + |\Gamma|}{1 - |\Gamma|}$$
And you can't define return loss: -
$$RL = -20\log_{10}(|\Gamma|)$$
I'm at a loss to think how using a non-\$Z_0\$ value has any significant use or merit. I've been wrong before of course!
Comment: You can calculate the S-parameters of a segment of (for example) 75 ohm line in a 50 ohm system. You might use it as an equivalent (in a certain band) of a series inductor in your system. Or you might want to know the effect if your PCB trace comes out as 45 ohms or 55 ohms due to manufacturing variations.
Comment: but in that case if i chose the reference impedence Zo not equal to the Zc of the line connected to that port, when i have to find the parameter S11 and S21, i have to put as load for the port 2 an impedence equal to Zo e not equal to Zc, so the incidente power wave a2 will be zero, right?
Answer: The choice of Z0 is arbitrary and does not affect the actual V and I in a circuit.
The S parameters are defined w.r.t. to a Z0 in order to normalize V and I to a common "square-root of power" quantity. The magnitude of S depends on Z0.
Now careful...
S parameters for a section of a network describe reflection, absorption and transference as a constituent of super-imposed waves in each section. The real reflection is a sum of reflections etc... from various sections. So the choice of Z0 affects the magnitude of the constituent waves, not their sum. In a ZG and ZL matched system, and a choice of Z0 that equals neither, the reflections will cancel out regardless Z0.
If you choose a Z0=100Ohm in a 50Ohm system (coax, source, load...) there will be non-zero Gammas all abound, but the resultant sum of super-imposed waves, the absorption into a load etc... are unaffected by that choice, and will still "match".
Where the constituent parts DO matter is in transient systems. In order to match-up a calculated Gamma with any observed/real reflections (e.g. spikes/pulses refelecting in a long open-ended or mismatched wire) you will have to use Z0 equal to the nominal Z of your system. If you don't, your Gamma is different, still correct, but it only paints part of the picture, a layer to be super-imposed so to say.

Power waves and scattering matrix


Arduino AES128 - CMAC

Question: I'm looking for AES128 library with CMAC for Arduino. Help me to find one
Comment: Did you ask Professor [Google](https://www.google.co.uk/search?q=aes128+arduino+library+cmac&oq=aes128+arduino+library+cmac&aqs=chrome..69i57.9580j0j8&sourceid=chrome&ie=UTF-8)?
Comment: Yes, i search in google but i don't find any library aes128 cmac with example to use it, thank you
Answer: I happen to know some libraries which use this. AES128-CMAC is for example used in the LoRaWAN MAC / driver implementation (LoRa is a low-power-wide-range radio technology). For example, the library Arduino-LMIC (LoRa MAC in C) uses this AES-CMAC implementation (has actually 2 built-in, Ideetron is the other one):

https://github.com/matthijskooijman/arduino-lmic/tree/master/src/aes

Other stacks use the mbedtls library with only the AES and CMAC layer activated. The library, written by ARM, is entirely in C and thus easily configrable (config.h) and compilable for the Arduino platform:

https://github.com/ARMmbed/mbedtls
https://github.com/ARMmbed/mbedtls/blob/development/library/cmac.c

Semetech's LoRa stack even has AES and CMAC abstracted in 4 four files:

https://github.com/arduino-org/arduino-library-lora-node-shield/tree/master/src/system/crypto

Another good point would be to search PlatformIO's library index for "AES CMAC". Then this library comes up:

https://platformio.org/lib/search?query=AES%20CMAC
https://github.com/DavyLandman/AESLib

This also offers a CMAC implementation specifically designed for the Atmel AVR MCUs (Arduino Uno and likes) and partially written in Assembler. This should be best suited for you.

https://github.com/DavyLandman/AESLib/blob/master/bcal-cmac.c
Comment: Thanks for your answer, I am already working on **LoraWan** device and a network server .

Arduino AES128 - CMAC


Tower of Hanoi using Solidity

Question: Trying to create a Tower of Hanoi algorithm using Solidity. I come from Java background, and I'm having trouble to figure where to start. For example, would you write the whole thing in one contract? Any tips?
Comment: It looks like you need a place to start with solidity development. I suggest you look at [https://cryptozombies.io/](https://cryptozombies.io/) and [Learning Solidity](https://www.youtube.com/watch?v=v_hU0jPtLto).
Answer: In Ethereum you pay for each executed instruction when executing a function in a smart contract. And since the solution of the Tower of Hanoi has exponential running time in the number of disks, you will quickly run out of gas. The current Ethereum gas limit is 5.4m, so you will hit that limit around 18 or 19 disks. For algorithms to solve Tower of Hanoi, you can have a look at:
https://www.hackerearth.com/blog/algorithms/tower-hanoi-recursion-game-algorithm-explained/
How would you get the return value through a Ethereum client console? I would store the return value in a constant in the contract (as a field of the contract) and then have a method that can return this value.
And, yes, I would write the whole thing in one contract. But I would run it on a private blockchain since it might become expensive to actually publish and run this Tower of Hanoi contract.

Tower of Hanoi using Solidity


Any elementary-level text or notes on (i) measure theory? (ii) Lebesgue integration?

Question: I still have no background in measure theory or Lebesgue integration. So is there any elementary-level resource --- book, set of notes, tutorial paper, website, or online video lecture series --- which I can use for getting some knowledge of these fields?
Comment: Terence Tao's book Analysis II gives a good, relatively short introduction to measure theory and Lebesgue integration.  After Tao's book, I recommend checking out [Wheeden and Zygmund](https://www.amazon.com/Measure-Integral-Introduction-Analysis-Mathematics/dp/0824764994), or perhaps [Stein and Shakarchi](https://www.amazon.com/Real-Analysis-Integration-Princeton-Lectures/dp/0691113866/ref=pd_lpo_sbs_14_t_2?_encoding=UTF8&psc=1&refRID=PTFF1RF364XFXTBB3J7M).
Comment: Define "elementary level", please!
Comment: I found the part of Folland's "Real Analysis" dealing with measure theory and the Lebesgue integral explained concisely and clearly. I also personally enjoyed reading Billingsley's "Probability and Measure", but you have to beware that there is a lot of information in that book, and that it is big. You could maybe consult Folland's book first, and then, if you have some  time and want to know more, consult Billingsley's book.
Comment: @user436658 by "elementary-level" I mean a book suitable for not-very-mathematically-mature undergraduate-level students.
Answer: I would like to suggest three books which helped me-
1) Royden's  Real  Analysis,here in this it gives motivation towards the topic as well as illustrative text,nice examples,excercises.
2)Measure Theory and Integration by G. de Barra.
3)Paul Halmos,Measure theory.
Also there are some similar questions asked and may contain some references as per your requirement -  Reference book on measure theory and here.
And some online notes here and here.
Hope this helps!
Answer: This is an introductory video course on measure and integration by Prof.Inder Rana of IIT Bombay. There are total 40 lectures with each one almost of an hour. Also he uses his own book on measure and integration along with Paul Halmos's and Royden's as mentioned in @BAYMAX's answer.
The syllabus of the course as well as the references are mentioned in the link.


$S(E,V)$ for an ideal gas

Question: So, $$dS = \frac{dE}{T}+\frac{P}{T}$$
For an ideal gas, the above relation reduces to,
$$dS = \frac{C_VdE}{E}+\frac{nR}{V}$$
Integrating both sides, I can obtain,
$$S(E,V) = C_V\ \ln{E}+nR\ \ln{V}+\textrm{constant}$$
That's fine for me, but I am struggling to find same relation from the partial derivative of $S(E,V)$. Using, $$\left ( \frac{\partial S }{\partial V} \right )_E = \frac{P}{T}= \frac{nR}{V}$$
Integrating both sides, I can obtain: $$S(E,V) = nR \ln{V}+f(E)$$
And using,$$\left ( \frac{\partial S }{\partial E} \right )_V = \frac{1}{T}= \frac{C_V}{E}$$
Again, integrating, I can obtain:
$$S(E,V) = C_V \ln{E}+f(V)$$
So, comparing these two relations I can say:
$$S(E,V) = nR \ln{V} + C_V\ln{E} $$
So, there is an extra constant term missing, which I can't produce with these two relations. I think that my conundrum is more due to Maths than the underlying physics in here. Would be very grateful if anyone can suggest, what's wrong I am doing in here. Thanks.
Answer: You have neglected constants of integration when comparing terms.
You have :
$$S(E,V)=nR\ln V +f(E)$$
and
$$S(E,V)=C_V\ln E +g(V)$$
You assume :
$$f(E)=C_V\ln E$$
but should say :
$$f(E)=C_V\ln E + K_1$$
for some constant $K_1$ and similarly for $g(V)$.
Doing that you get :
$$S(E,V)=nR\ln V + C_V\ln E + K_1$$
And hence your desired result.
Comment: So, basically it should have been $S(E,V) = C_V \ln{E}+f(V)+K_1$ after integrating partial derivative?
Comment: Sorry, I think I got your point now.
Answer: You can look at it like this: when evaluating $\left ( \frac{\partial S }{\partial E} \right )_V = \frac{C_V}{E}$ you should keep in mind what you already calculated:
$$ \left ( \frac{\partial S }{\partial E} \right )_V = \left ( \frac{\partial\ (nR \ln{V}+f(E))}{\partial E} \right )_V = \left ( \frac{\partial\ nR \ln{V}}{\partial E} \right )_V + \left ( \frac{\partial f(E)}{\partial E} \right )_V = \left ( \frac{\partial f(E)}{\partial E} \right )_V = \frac{C_V}{E}$$
Because V is constant in the first partial derivative, the derivative is $0$. So after integrating you have information about $f(E)$ more so than about $S$. By integration you get:
$$ f(E) = C_V \ln{E}+ \text{constant}$$
This constant can no longer depend on $V$ anymore because you defined $f$ to be only dependant on $E$. Filling in your value for $f$ in the equation you got earlier gives:
$$ S(E,V) = nR \ln{V}+f(E) = nR \ln{V} +  C_V \ln{E}+ \text{constant}$$

$S(E,V)$ for an ideal gas


How did the turtles acquire their weapons?

Question: I would think that human/animal hybrids living in the sewers would have difficulty getting hold of swords or a bo staff or the materials to make them- was this ever addressed in any of the comics or tv series?
Comment: Have you ever been in the NYC sewers?  You could probably find flamethrowers and bazookas down there.  It's New York, FFS.
Comment: Mail order? (Or nowadays, shopping online?)
Comment: @WadCheber +1 :D :D :D
Comment: I mean, high quality katanas I'll grant you, but the no staff should really not be part of your question. It's just a stick with some cloth tied to it for grip.
Answer: I vaguely recall the recent movie saying that the turtles found their weapons in the sewers, but I could be wrong.
However, in a city like New York, you could probably find low quality versions of each of these weapons by searching through garbage for a relatively short time.  They certainly wouldn't steal them, at least in the current cartoon series (which began in 2012).
In the 2012-present series, they seem to lose weapons pretty frequently.  In the original movie, on the other hand, Raphael's reaction to losing a sai suggests that he doesn't expect to get an opportunity to obtain another one anytime soon.
At the very least, it would be fairly easy to find enough money in the sewers to buy the weapons.
Comment: @Nu'Daq - There's actually a guy who makes a living by hanging out in the "Diamond District", where all the jewelers work, and harvesting the gunk in sidewalk cracks.  He finds lots of gems, some gold, even actual diamonds, and separates them from the dirt, then sells them.  There are a lot of ways to make money in the big city.
Comment: I suppose that answers my other question- where they got the scratch to pay for pizza.
Comment: There was also a recent Cracked article on cleaning Porta-Johns that mentioned the surprising amount of money and jewelry they find: http://www.cracked.com/personal-experiences-1724-we-find-corpses-5-weird-truths-cleaning-porta-johns.html
Comment: Do New Yorkers literally flush money down the toilet?
Comment: @Nu'Daq - There are 8 million people in the city and another 12 million in the metropolitan area.  People drop money all the time, and much of it probably ends up in the sewers.
Answer: I saw from the Nick series episode Lone Rat and Cubs that the Turtles got their weapons because of their actions with them:

Leonardo was holding onto Splinter's katana as he was pushing them in a cart in the sewers, running from the Krang.
Raphael got his sais after he fell from the cart because a sai was lodged in a wheel, and he picked it up off the ground.
Donatello got his Bo staff because he... well, the episode didn't really say why he got his Bo, because there was one in the cart, but he didn't interact with it.
The youngest, Michelangelo, got his nunchucks because when Splinter reached for his chucks to fight a Krang droid, it looked at the end, where Mikey was sucking on it. One of the other million things I found cute in the episode.
Comment: Welcome to SFF:SE. We recommend having a look at the [tour](https://scifi.stackexchange.com/tour), which contains helpful hints for using the site.


Are the Pop Fizz and Hot Dog Skylanders figurines only compatible with the Giants game?

Question: My son is asking for the Pop Fizz and Hot Dog figurines for Christmas, but he said he wants the ones for the original Skylanders game, not the Giants game.  Are these figurines only available for the Giants game?  That's all I seem to be finding.
Answer: Yes, those figures are for Skylanders 2 only.
Original Series:

Spyro, Double Trouble, Wrecking Ball, Voodoo
Bash, Dino-Rang, Terrafin, Prism Break
Slam Bam, Zap, Wham-Shell, Gill Grunt
Ignitor, Sunburn,Flameslinger, Eruptor
Boomer, Drill Sergeant, Drobot, Trigger Happy
Hex, Cynder, Chop Chop, Ghost Roaster
Whirlwind, Warnado, Sonic Boom, Lightning Rod
Camo, Stump Smash, Zook, Stealth Elf
Answer: yes hot dog and pop fizz are only available for the giants game if he wants s2 zap then pick up the sqorpion striker pack if not just get the single hot dog and if he wants s2 whirlwind and s2 trigger happy get the triple pack with them in if not just get pop fizz single. but then if you get the pop fizz single don't worry because you can get s2 trigger happy and s2 whirlwind single aswell.


What is the best way to remove and reuse wooden fence boards?

Question: I ask the question generally, but for my situation these are 6' tall and 7.5" wide boards with two nails each at top and bottom rails.   My access is on the front face (nail head side).
Comment: There's a good chance that nail heads will pull through old fence boards rather than pulling them out, leaving larger holes.
Comment: You have no access to the back?  Because the easiest way is to hit it from the back and knock the boards off with the nails, then remove the nails.  I guess once you remove a few boards you _will_ have access to the back for the rest of them...
Comment: @JPhi1618 It's a shared fence with the neighbor and they have their own fence boards on the 'back'
Answer: Flat prybar:

(Almost self explanatory, but...)
Just reach over the top, get a flat prybar between the top rail and the board, pry the top off, then pull the top down - the board may pull the nails out of the rail, or you may have to use the prybar again on the bottom.  This will leave the nails with the boards, drive them back out by hitting the points from the back, and pull them out with pliers or a nail puller.
After the first one, you'll be able to easily get between the rail and the board top and bottom and it should go pretty fast.
If the wood's rotten or very soft, the heads may tear through.  The first one is probably the one most likely to get mangled so pick an ugly one.  This isn't exactly restoration architect technique, but it should work.
Another gentler way is to get a small hole saw just bigger than the nail head, and cut around each nail.  With a good hole saw and cordless drill this will actually go pretty fast.  This will leave holes in the boards but they will be perfectly round and easy to plug if need be.


Magnetic monopoles in spin ice and Dirac string comparison

Question:
In spin ice systems magnetic monopole-like excitations are sources or sinks of $H$, not the $B$ field, why is that? Is it because the strings carries magnetic moment $M$ and not solenoidal $B$ filed like the Dirac string.
How is it different from Dirac construction of magnetic monopole?
In the Dirac case we still have incoming flux from the solenoid and out going from the monopole that will result in 0 for any sphere around the end. How he goes around this (why is it justified to not count the singularity) and why is not possible for the spin ice case?
Comment: Just a nice [image](http://www.mpg.de/768130/zoom.jpg) to explain the formations of monopoles from spin flip , with comments "The emergence of magnetic monopoles: If two of the spins point into the tetrahedron and two out of it (top left), their magnetic charges cancel (bottom left). When a spin flips, two monopoles form (top and bottom right)." Extracted from this [paper](http://www.mpg.de/810268/Magnetic_Monopoles?filter_order=LT&page=3&research_topic=PA-KS)
Comment: @dj_mummy : Yes, I agree. This is what the image strongly suggest. Each spin (top images)could be looked as a  couple of pseudo-monopoles (bottom images). In standard situations (2 spin pointing in the tetrahedron, 2 spin pointing out) (left images) there is no net result pseudo-monopole at the center of the tetrahedrons. But, if one spin flip (right images), then appears a pseudo monopole $+$ at one tetrahedron center, and another  pseudo monopole $-$ at the center of the next tetrahedron.
Answer: A magnetic monopole for B (not H) is the situation discussed by Dirac, 't Hooft, and many other particle physicists, and that's the situation which would be interesting for various fundamental physics reasons.
For 75+ years, physicists were using the term "magnetic monopole" to refer to a very specific thing: Magnetic monopoles for B. People had analyzed them theoretically and searched for them experimentally. Whole books were written about them.
Then in the 2000s, certain scientists discovered phenomena in spin ice and other systems that had nothing whatsoever to do with that, but nevertheless they made the decision to call these things "magnetic monopoles". Pause to think about this. For 75+ years, "magnetic monopoles" was a term with a specific technical meaning in physics that everyone agreed on ... but then these scientists used the same term to describe a completely unrelated phenomenon. Why would they do this?? Um, well, presumably, they intended to mislead gullable science journalists and the general public into thinking that they made the long-awaited discovery of "true" magnetic monopoles (for B). The spin-ice and other experiments were legitimately interesting and exciting works of condensed-matter physics, but it sounds much more exciting when it is described in this extremely misleading way! [I don't know their actual thought process, I'm speculating.]
Well, if they were trying to mislead people, they were successful! In many many popular-science articles in the weeks and months following this work, journalists confused the spin-ice (so-called) monopoles with the (true) magnetic monopoles. In the wikipedia article, which I was monitoring at the time, well-intentioned readers changed the article again and again to say that the Dirac monopole has now been discovered.
To be clear: Electrons are not (true) magnetic monopoles, i.e. they are not sources or sinks for B. The same is true for protons and neutrons, and all known particles. Therefore if you put together electrons and protons and neutrons into any possible configuration, no matter how many there are or what the configuration looks like, it is mathematically impossible to create a source or sink of B. Therefore a "true" magnetic monopole will never ever be created using condensed-matter physics wizardry.
It seems to me that the right starting point is to say that the Dirac monopole and the spin-ice "monopole" are two completely unrelated phenomena in different branches of physics. They were only mixed up due to false advertising. If you have a question about Dirac's discussion of magnetic monopoles, you should pose it as a separate stackexchange question, and likewise if you have a question about spin-ice monopoles, you should pose it as a separate question. I will try to summarize quickly:
The "Dirac string" isn't a real thing, it's merely a mathematical construction. We expect and demand that the string is unobservable, because in reality there is no string. On the other hand, a spin-ice "monopole" has an actual "string" - a chain of flipped spins - that is an observable physical object.
To prove charge quantization from a Dirac monopole, you start with the assumption that the Dirac string is unobservable (in one mathematical approach). If the string is a real physical string that can be observed, the argument doesn't work -- so charge does not have to be quantized.
Comment: Well, I wouldn't call it "genius", because it's somewhat natural and justifiable. If the term "magnetic monopole" wasn't already taken, it would have been an obvious and appropriate phrase to use. But the term was already taken! It's analogous to if you found an unusually heat-conductive material and called it "super-conductivity". Or if you found some weird new phenomenon related to electron spins in iron heterostructures, and you called it "ferro-magnetism". Or if you start a company writing microwave software and call it "microsoft".
Comment: I couldn't agree more. I have been working in the field of frustrated spin systems for years and I think the use of "monopole" and especially "Dirac string" is completely bonkers. Nowadays these scientists even use "anti-monopole"...nuts. These are magnetic north and south poles connected by the according flux closure. Unfortunately, once this nonsense has been established, you need to use this pseudo science to get your projects financed. Nobody gives you money for frustrated spin systems, but a Higgs mechanism in spin ice with magnetic monopoles and Dirac strings...that's a different animal.