Python Theoretical Question  I'd like to learn theory behind why "print(i.extend(j))" DOESN'T work. It's OUTPUT is: "None".  print(j) DOES work (It's OUTPUT is:  "[4, 5, 6, 7, 8, 9]")  i = [1, 2, 3] j = [4, 5, 6] k = [7, 8, 9] # I'd like to learn theory as to why following doesn't work # OUTPUT is: "None"   print(i.extend(j)) # Following does work (OUTPUT is:  "[1, 2, 3, 4, 5]") j.extend(k) print(j)
Why does python 2.5.2 have the following behavior  &gt;&gt;&gt;[2].extend([]) == [2] False  &gt;&gt;&gt; [2].extend([]) == None True  $ python --version Python 2.5.2   I assume I'm not understanding something here, but intuitively I'd think that [2].extend([]) should yield [2]
Deriving the Coulomb force equation from the idea of photon exchange? Since Newton's law of gravitation can be gotten out of Einstein's field equatons as an approximation, I was wondering whether the same applies for the electromagnetic force being the exchange of photons. Is there an equation governing the force from the exchange of photons? Are there any links which would show how the Coulomb force comes out of the equations for photon exchange? I know that my question is somewhat similar to the one posted here , but it doesn't really have an answer to my question specifically. Limit involving binomial coefficients: $\lim_{n\to\infty}\left(\binom{n}{0}\binom{n}{1}\dots\binom{n}{n}\right)^{\frac{1}{n(n+1)}}$ I am facing difficulty with the following limit. $$ \lim_{n\to\infty}\left(\binom{n}{0}\binom{n}{1}\dots\binom{n}{n}\right)^{\frac{1}{n(n+1)}} $$ I tried to take log both sides but I could not simplify the resulting expression. Please help in this regard. Thanks. How are the number of views in a question calculated? I do as follows  $(1+x)^n= \binom{n}{0}+\binom{n}{1}x+\binom{n}{2}x^2+...+\binom{n}{n}x^n$   differentiating in both sides  $n(1+x)^{n-1}= \binom{n}{1}+2\binom{n}{2}x+3\binom{n}{3}x^2...+n\binom{n}{n}x^{n-1}$  then, for $x=1$  $n \cdot2^{n-1} = \sum_{k=1}^{n}k\binom{n}{k}$  From here, I don't know how to proceed, I have tried to multiply both sides for $(1+x)$ to make $n \cdot2^{n}$ but then the summatory changes, I don't know how to prove the equality. Why does the Taylor expansion of $e^x$ satisfy exponential properties? $C(n,p)$: even or odd? I'm thinking that one way Jeff and the Stack Overflow team could squeeze some extra money out of this site would be to automatically convert all Amazon links posted here into affiliate links, e.g. Stick "tag=codinghorror-20" (or more likely a new site-specific tag) onto every Amazon link. This would bring in some additional revenue every time someone purchased a book via a link on this site.   They could do similar things with other links as well. Amazon's simply the most obvious choice.  So my question is, would anyone have a problem with this?  I know I wouldn't mind, but I don't know how other people would react.  What does everyone think? Is this a horrible idea, a great idea, a waste of time? Using the itemize environment inside a caption The following code does not compile. However, if I remove the itemize environment it does. I googled for this problem, and found suggestions that using the caption package would solve the problem, though I did not find any clear description of why the problem occurred in the first place. See for example    I'm using Debian squeeze with TeX Live 2009-11. The included version of caption has   \ProvidesPackage{caption}[2009/10/09 v3.1k Customizing captions (AR)]   I also tried downloading and using the caption package from     but this doesn't change anything. I put the sty files in my current directory. I assume that overrides the system files. This one corresponds to  \ProvidesPackage{caption}[2010/01/09 v3.1m Customizing captions (AR)]   Error message and example file follow.  *******************************************     ERROR: Argument of \@caption has an extra }.  --- TeX said --- &lt;inserted text&gt;                  \par  l.13     }  --- HELP --- From the .log file...  I've run across a `}' that doesn't seem to match anything. For example, `\def\a#1{...}' and `\a}' would produce this error. If you simply proceed now, the `\par' that I've just inserted will cause me to report a runaway argument that might be the root of the problem. But if your `}' was spurious, just type `2' and it will go away. ******************************************************  \documentclass{article} \usepackage{caption} \begin{document}  \begin{figure}     \captionsetup{singlelinecheck=off}     \caption     {       foo       \begin{itemize}       \item bar       \end{itemize}     } \end{figure} \end{document} PDO SQL-state "00000" but still error? Explain the plane scene in The Dark Knight Rises? In The Dark Knight Rises, at the beginning of the film Bane kidnapped a guy from the plane, then he drew blood from the guy he kidnapped. And then throughout the movie I didn't see any news regarding this kidnap scene. But, before the end of the movie we find out that the guy kidnapped by Bane was Dr Pavel. Bane needed him to convert the fusion project into a nuclear bomb and Dr Pavel was the only guy who could have done it.   But I don't understand, why did he draw blood from Dr Pavel? Kernels and reduced row echelon form - explanation The following text is written in my textbook and I don't really understand it:     If $A = (a_{ij}) \in$ Mat$(m x N, F)$ is a matrix in reduced row echelon form with $r$ nonzero rows and pivots in the columns numbered $j_1 &lt; ... &lt; j_r$, then the kernel ker$(A)$ is generated by the $n-r$ elements $ w_k = e_k - \sum\limits_{1 \le i \le r, j_i \le k} a_{ik}e_{j_i}$ for $k \in {1, \cdots , n} \ {j_1, \cdots, j_r}$, where $e_1, \cdots, e_n$ are the standard generators of $F^n$.    There are no computational examples and the notation is a bit overwhelming so I don't know how I can use it. Can somebody give an example of this in practice? How to do relative imports in Python? I have a Queue&lt;T&gt; object that I have initialised to a capacity of 2, but obviously that is just the capacity and it keeps expanding as I add items.  Is there already an object that automatically dequeues an item when the limit is reached, or is the best solution to create my own inherited class? Is there a maximum number of devices allowed on a Google Play Account? How to check which package created a user? It is suspected that some packages have scripts run at install time which create user accounts in /etc/passwd. How can I check which package created a specific user? When a land becomes creature, can you kill it? Problem with package lineno I'm using package lineno for proofreading of my documents.  So I usually have something like the following MWE:  \documentclass{article}  \usepackage{blindtext}  \usepackage{ifthen}           % to use if then else \newboolean{korrektur}        % for proofreading: true/false  \setboolean{korrektur}{true} % choose one, comment the other %\setboolean{korrektur}{false}  % What we need for proofreading \ifthenelse{\boolean{korrektur}}% proofreading wanted? {% YES:   \usepackage{showframe}          % shows type area   \usepackage{lineno}             % numbers lines   \pagewiselinenumbers            % lines per page }% {% NO: % error if lineno was used before:   \typeout{***** Please delete .aux files if you get errors! *****} % What to add here so that I get no errors?  %&lt;================= }  \begin{document} \Blindtext \end{document}   Run it two times. Everything should be well, blindtext is numbered.  Now please move the % sign from line 8 (false) to line 7 (true).    Because we had had the run before there is an .aux-file, including lines with the macro \@LN.  If you compile now you will get the following error message (and some more):   ***** Please delete .aux files if you get errors! ***** (C:\Users\...\LaTeX\_TeX.SX\lineno\test-lineno.aux ! Undefined control sequence. l.2 \@LN         {0}{0}   Question:  Is it possible to add in line 20 (see %&lt;===========) something to get rid of the error messages? Something that resets the meaning of macro \@LN? How to pin either a Shortcut or a Batch file to the new Windows 7, 8 and 10 Taskbar and start menu? We are having trouble adding our batch scripts to the Windows 7, 8 or 10 taskbar or start menu.  Our batchfiles take some arguments and just execute other application based on those arguments . To keep it simple, we created some shortcuts for our customers which they just need to click in order to get everything running.  The question here is: How can we pin those shortcuts or batch files to the taskbar or start menu?  (The customers aren't supposed to access the file system and that's why they can only see the taskbar) Error: invalid environment block. Press any key to continue...   The error message appears immediately after the boot screen on purple background. Ubuntu 12.04.1 LTS. I was surprised to discover my dictionary had this entry for dilemma:     a situation in which a difficult choice has to be made between two or more alternatives, esp. equally undesirable ones   The notion of dilemma meaning two or more flies against what I was taught about the word. The very idea of a  is specifically based on the number two.  Has my dictionary merely updated its definition to encapsulate the many people who use dilemma for more than two equal choices? Or was someone in my youth being unnecessarily pedantic?