Python variable names
Short description of the scoping rules?
If $\sum_{n=1}^{\infty} a_n$ is absolutely convergent, then $\sum_{n=1}^{\infty} (a_n)^2$ is convergent Would a 9V alkaline power a 12V DC motor? I am thinking about buying a 12V DC motor but want to keep everything, including the motor, battery, and power switch somewhat compact. I am not very knowledgeable about these kind of things and am curious whether or not my 12V DC motor would run at all on a 9V battery. Why do I get compiler errors with this Java code?  1  public List&lt;? extends Foo&gt; getFoos() 2  { 3    List&lt;? extends Foo&gt; foos = new ArrayList&lt;? extends Foo&gt;(); 4    foos.add(new SubFoo()); 5    return foos; 6  }  Where 'SubFoo' is a concrete class that implements Foo, and Foo is an interface.  Errors I get with this code:   On Line 3: "Cannot instantiate ArrayList&lt;? extends Foo&gt;" On Line 4: "The method add(capture#1-of ? extends Foo) in the type List&lt;capture#1-of ? extends Foo&gt; is not applicable for the arguments (SubFoo)"   Update: Thanks to Jeff C, I can change Line 3 to say "new ArrayList&lt;Foo&gt;();".  But I'm still having the issue with Line 4. Install python packages for specific python version I understand that in Ubuntu 14.04, you have access to both python 2.7.6 and python 3.4.0. When getting python packages through the command line, how do I make sure that I am installing packages meant for python 2.7.6 and not for python 3.4.0? Error: The processing instruction target matching "[xX][mM][lL]" is not allowed Is it possible to get a fully transparent window in Pygame (see the desktop through it)?  I've found how to create a window without a frame, but there doesn't seem to be any obvious way to make it transparent.  I'd be willing to tie into system-specific technology/frameworks as long as there are solutions for both Windows and Mac OS X, but I'm not sure which direction to be looking.  The only topic I was able to find , which isn't something I can do for this particular project (needs to be Pygame). How many physical degrees of freedom does the $\mathrm{SU(N)}$ Yang-Mills theory have? The $\mathrm{U(1)}$ QED case has two physical degrees of freedom, which is easy to understand because the free electromagnetic field must be transverse to the direction of propagation. But what are the physical degrees of freedom the $\mathrm{SU(N)}$ Yang-Mills theory?   I believe that the $\mathrm{SU(N)}$ Y.M. theory has four degrees of freedom, and it is easy to see that by gauge fixing (such as the Lorentz condition or the Coulomb condition) that we can always remove one redundant degree of freedom. But then we still haven't completely fixed the redundant degrees of freedom. Thus my question is:     How many physical degrees and how many are redundant degrees of freedom does the Y.M. theory have?    I would be interested to understand how we can determine this mathematically, and also to understand what the physical intuition behind this is? How do I know if food left at room temperature is still safe to eat? Why don't players get extra xp for large encounters? Based on the table Encounter XP Multipliers from the Basic Rules' DM section, Page 57, when you're building encounters in 5E, you include an XP modifier depending on the number of creatures your PCs will be fighting: 1.5x for a pair, 2x for 3-6 and so on. However, the PCs only get the base XP as a reward.     This doesn't change the actual xp reward ... just your calculations of how difficult the encounter is.   Why is this? After acknowledging that battles vs multiple opponents are more difficult, why not reward them as such? Prove that a group is infinite and nonabelian. I'm trying to solve a question of Hungerford's Algebra:     Show that the group defined by generators $a,b$ and relations   $a^2=b^3=e$ is infinite and nonabelian.   I guess a good approach would be to find an infinite and nonabelian group with two generators satisfying the same conditions and let Van Dyck do all the work. I've been thinking about the group of permutations $S_{\mathbb N}$, some groups of matrices, but I couldn't get it. Could anyone give me a hint? Thanks in advance! Embedding a link (or other html) in a JSF message How can top principal components retain the predictive power on a dependent variable (or even lead to better predictions)? Suppose I am running a regression $Y \sim X$. Why by selecting top $k$ principle components of $X$, does the model retain its predictive power on $Y$?   I understand that from dimensionality-reduction/feature-selection point of view, if $v_1, v_2, ... v_k$ are the eigenvectors of covariance matrix of $X$ with top $k$ eigenvalues, then $Xv_1, Xv_2 ... Xv_k$ are top $k$ principal components with maximum variances. We can thereby reduce the number of features to $k$ and retain most of the predictive power, as I understand it.   But why do top $k$ components retain the predictive power on $Y$?   If we talk about a general OLS $Y \sim Z$, there is no reason to suggest that if feature $Z_i$ has maximum variance, then $Z_i$ has the most predictive power on $Y$.   Update after seeing comments: I guess I have seen tons of examples of using PCA for dimensionality reduction. I have been assuming that means the dimensions we are left with have the most predictive power. Otherwise what's the point of dimensionality reduction? Why don't Stack Exchange sites use a rich text editor? Why does the Stack Exchange network of sites use Markdown instead of some other rich text editor like FCKEditor or TinyMCE? Sometimes it’s possible to use either a noun adjunct or the possessive case.     the shop door   the shop’s door   However, in certain phrases it’s not OK to do so.     the ship’s crew (the ship crew is wrong)   The questions are:   How can one find out what to use in such cases as “the shop(’s) door” when a noun adjunct option and the possessive case option are available?  How can one know which option is wrong in order to avoid the construction “ship crew”? Is there a difference in meaning between (a) the shop door (b) the shop’s door? Install ffmpeg in Ubuntu 12.04 LTS Background :  I used ffmpeg to merge two videos side by side. First I install ffmpeg by following command as it suggest by Ubuntu itself.  sudo apt-get install libav-tools   or   sudo apt-get install ffmpeg   But then I realize it is not the correct version since it doesn't support for -filter_complex and few other functions.   After a few hours researcher I found  and I succeed with video conversion as well. As per that article, it is suggesting we need to build it our own.        Question :  What is easiest way to install that ffmpeg version (which is support for -filter_complex ) without following all those steps ? $D_8$ as a derived subgroup Every undergraduate student knows that there are (exactly) two non-abelian groups of order 8: Dihedral ($D_8$) and Quaternion ($Q_8$). The group $Q_8$ has many interesting properties; simple of them are: it has unique element of order $2$, all subgroups are normal, etc. A property, which is strange and not obvious, the group $Q_8$ has, is that there is no group $G$ such that $G/Z(G)$ is isomorphic to $Q_8$. On the other hand, $D_8$ has no such property; there are (infinitely many) groups $G$ such that $G/Z(G)$ is isomorphic to $D_8$; example - $D_{16}$.   The question, I would like to ask, is related to a property of $D_8$, which is not shared by $Q_8$. There are (infinitely many) groups whose derived subgroup is $Q_8$; example- $SL_2(3)$. For groups $G$ of order &lt;100, one can check on GAP that $D_8$ is not a derived subgroup of any group. The natural question is then:  Question 1: Does there exist a finite/infinite group whose derived subgroup is equal to $D_8$?  Question 2: Does there exist a finite/infinite group whose derived subgroup is equal to (general) dihedral group $D_{2n}$ of order $2n$ ($n&gt;2$)? How can I determine the current brew package count? I tried to get the number of available brew packages by running  brew search | wc -l   but I don't know how accurate this really is. What do I need to take into account to get a more correct number?  PS: macports lists 19,889 packages online Getting error using JMeter behind a proxy I am new to JMeter and trying to run a test from behind a corporate proxy. I read on the same from apache site and followed the same process so as to run the test. However, i am still  unable to record a test from behind the proxy.      This message always appears after pressing on 'Start' recording:     After that, I have changed apache port to 8000 as in below and made it different      This time after pressing on start was this message How do you properly use namespaces in C++? minitoc package adds extra page when used with float and lastpage packages The minitoc package adds extra page when used with float and lastpage packages. I figured out that this problem can be resolved by loading minitoc package before float and lastpage packages. In LyX the float package is loaded automatically and could not figure out how to force LyX  use minitoc package before loading float and lastpage packages. Thanks in advance for your help.  \documentclass[a4paper,12pt]{book} \usepackage[english]{babel} \usepackage{blindtext} \usepackage{lastpage} \usepackage{fancyhdr} \usepackage{float} \usepackage{minitoc} \begin{document} \dominitoc \tableofcontents \mainmatter \chapter{First Chapter} \minitoc \section{Introduction} \blindtext[1] \section{Material \&amp; Method} \blindmathpaper \chapter{Second Chapter} \minitoc \section{Introduction} \blindtext[1] \section{Material \&amp; Method} \blindmathpaper \end{document}   Edited  It is also working in LyX 2.1.1 if I remove \includepdf[pages={1},scale=1]{Back.pdf} at the end of the document. However if I include \includepdf[pages={1},scale=1]{Back.pdf} at the end of the document it adds extra page. Any thoughts.   Updated  I've narrow downed the problem. My following MWE in .Rnw format adds extra page at the end of document when using minitoc package. Thanks again for your help.  \documentclass[a4paper,12pt]{book} \usepackage{minitoc} \usepackage[english]{babel} \usepackage{blindtext} \usepackage{lastpage} \usepackage{fancyhdr} \usepackage{float} \usepackage{pdfpages} \begin{document} \dominitoc \tableofcontents \mainmatter  \chapter{First Chapter} \minitoc \section{Introduction} &lt;&lt; Test &gt;&gt;= 1:50 @  \blindtext[1] \section{Material \&amp; Method} \blindmathpaper \includepdf[pages={1},scale=1]{Back.pdf} \end{document}