accumulator variable
Floating point calculations in LaTeX?
jquery disable form submit on enter Position vs Part Spring Data JPA Update @Query not updating? I am working on a large C++ project in Visual Studio 2008, and there are a lot of files with unnecessary #include directives. Sometimes the #includes are just artifacts and everything will compile fine with them removed, and in other cases classes could be forward declared and the #include could be moved to the .cpp file.  Are there any good tools for detecting both of these cases? Do I need Transit Visa to visit London for 4-5 hours during layover? Marginal probability derived from joint probability distribution of a poisson process and binomial process I thought I figured out this problem, but my answer is different than the solutions manual. Hoping someone here can stear me in the correct direction:     Assume the number of automobile collisions that occur on a given stretch of highway per year is a Poisson random variable $X$ with $\mu = 20$. The probability is $p=0.05$ that there will be one or more fatalities in each accident; occurrences of fatalities are independent from one collision to the next. If $Y$ is the number of collisions with one or more fatalities on this stretch of road in one year, find the probability law for $Y$.   So as said, X is poisson, so:  $$p_X(x) = \frac{20^x}{x!}e^{-20}$$  The conditional probability of $Y$ given $X=x$ is a Binomial random variable:  $$p_{Y\mid X}(y\mid x) = \binom{x}{y}p^yq^{x-y}$$  where $Y =$ number of fatal traffic accidents and $x =$ given number of accidents (from poisson distribution)  Therefore the joint probability for $X$ and $Y$ is:  $$p_{X,Y}(x,y)= p_{Y\mid X}\cdot p_X(x) = \binom{x}{y}p^yq^{x-y}\frac{20^x}{x!} e^{-20}$$  to find the marginal probability of $Y$, I sum over $P_{X,Y}$ for all $x$:  \begin{align} p_Y(y) &amp; = \sum_{x=y}^\infty{\binom{x}{y}p^yq^{x-y}\frac{20^x}{x!}e^{-20}} = \frac{(20p)^ye^{-20}}{y!} \sum_{x=y}^\infty {20^{x-y}\frac{q^{x-y}}{(x-y)!}} \\[10pt] &amp; = \frac{(20p)^ye^{-20}}{y!} \sum_{x-y=0}^\infty {20^{x-y}\frac{q^{x-y}}{(x-y)!}} = \frac{(20p)^ye^{-20}}{y!}e^{20q} \end{align}  So:   $$p_Y(y) = \frac{(20p)^ye^{-20p}}{y!}$$  however, the correct answer is apparently $p_Y(y)=\dfrac{e^{-1}}{y!}$ Looking for a single word for 'blind worship' Is there a single word for 'blind worship' as in worshiping an actor blindly notwithstanding the bad performance? Definite article, repetition in lists Which would be correct?        The fridge, the shelves, the walls, the floor, and John himself, were all covered in foam.   The fridge, shelves, walls, floor, and John himself, were all covered in foam.      The the can be applied to all the nouns, so is there a need to repeat it? Aligning Vertices Diagonally How do you declare an interface in C++? How do I setup a class that represents an interface?  Is this just an abstract base class? Automatically run commands over SSH on many servers There is a list of IP addresses in a .txt file, ex.:  1.1.1.1 2.2.2.2 3.3.3.3   Behind every IP address there is a server, and on every server there is an sshd running on port 22. Not every server is in the known_hosts list (on my PC, Ubuntu 10.04 LTS/bash).  How can I run commands on these servers, and collect the output?  Ideally, I'd like to run the commands in parallel on all the servers.  I'll be using public key authentication on all the servers.  Here are some potential pitfalls:   The ssh prompts me to put the given servers ssh key to my known_hosts file. The given commands might return a nonzero exit code, indicating that the output is potentially invalid. I need to recognize that. A connection might fail to be established to a given server, for example because of a network error. There should be a timeout, in case the command runs for longer than expected or the server goes down while running the command.   The servers are AIX/ksh (but I think that doesn't really matter. Boy Born on a Tuesday - is it just a language trick? Add space before and after tabular environment The tabular environment does not add any vertical space before or after it. This looks odd, in my view. What is the "correct" or "best" way to add some space? Also, why is there more space after the tabular environment than before it, as seen in the example below?  \documentclass{article} \begin{document} \noindent Here is a line with some text in it.  \begin{tabular}{*4{l}}     Worg &amp; Worg &amp; Worg &amp; Worg\\     Worg &amp; Worg &amp; Worg &amp; Worg\\ \end{tabular}  \noindent Here is another line with some text in it. \end{document} Given the key, the plain text and the cipher text can I calculate the IV used in CBC mode? If I have the plain text, the ciphertext and the key for an AES-128 CBC operation, can I determine the IV, even if I don't know the padding (assuming the padding follows one of the more common formats)?  I believe it should be possible since my understanding is that the IV is only used as an initial XOR of the plain text in encryption, and should, therefore, be able to be available like this:  AESDecrypt(key, ciphertext) =&gt; (PlainText XOR IV); IV = ((Plaintext XOR IV) XOR (Plaintext))   Is this correct? Proving that: $\lim\limits_{n\to\infty} \left(\frac{a^{\frac{1}{n}}+b^{\frac{1}{n}}}{2}\right)^n =\sqrt{ab}$ Let $a$ and $b$ be positive reals. Show that $$\lim\limits_{n\to\infty} \left(\frac{a^{\frac{1}{n}}+b^{\frac{1}{n}}}{2}\right)^n =\sqrt{ab}$$ I have a file: Base.h  class Base; class DerivedA : public Base; class DerivedB : public Base;  /*etc...*/   and another file: BaseFactory.h  #include "Base.h"  class BaseFactory { public:   BaseFactory(const string &amp;sClassName){msClassName = sClassName;};    Base * Create()   {     if(msClassName == "DerivedA")     {       return new DerivedA();     }     else if(msClassName == "DerivedB")     {       return new DerivedB();     }     else if(/*etc...*/)     {       /*etc...*/     }   }; private:   string msClassName; };  /*etc.*/   Is there a way to somehow convert this string to an actual type (class), so that BaseFactory wouldn't have to know all the possible Derived classes, and have if() for each one of them? Can I produce a class from this string?   I think this can be done in C# through Reflection. Is there something similar in C++? What would be an English equivalent for the Mexican Spanish word tocayo? In Mexican Spanish (not sure if other Spanish speaking countries use the word too) we call "tocayo" to those people that share the same name as us (but not necessarily the same last name i.e., Juan Gonzalez and Juan Carlos Castillo are tocayos).  I was wondering if an equivalent for this word exists at all in English or maybe even an expression? Agreement in "[Singular Noun] Is/Are [Plural Noun]"? My fish's native habitat is rice fields. My fish's native habitat are rice fields.   Which one is correct? I'm pretty sure it's the first, since 'is' modifies 'habitat,' but it still sounds weird... As I am seeing this,  the man and boat will have different displacement from ground frame,  so there should be a net work done by friction .  The books says,  total work done by friction is zero when friction is static and internal to system. Please explain.. Do spell targets know they were targeted? Assuming a target of a Pathfinder spell did not see/hear/notice a caster casting the spell, do they know/feel they were targeted?  Is it relevant if the spell worked or not, if a save was involved (either successful nor not)? Does it depend on the spell?  Example: A cleric casts detect evil through a door. What do the NPCs on the other side know now?