Python: call to self function not working correctly
What is the difference between class and instance attributes?
Can I use a charger with more output amperage than the device needs? How can I increase my disk space when Ubuntu is installed inside Windows? Sum of a Hyper-geometric series. (NBHM 2011) How to find the sum of the following series $$\frac{1}{5} - \frac{1\cdot 4}{5\cdot 10} + \frac{1\cdot 4\cdot 7}{5\cdot 10\cdot 15} - \dots\,.?$$  I have no idea. I have written the general term and tested its convergence by Gauss' test for convergence, but they are neither the question nor the answer. How do I restrict my kids' computing time? Access to our computer (not only to the internet) needs to be restricted for the accounts of my kids (7, 8) until they are old enough to manage this by themselves. Until then we need to be able to define the following:   the hours of the day when computing is o.k. (e.g. 5 - 9 pm) the days of the week when computing is not o.k. (e.g. mondays to fridays) the amount of time allowed per day (e.g. 2 hours)   In 11.10 all of the following that used to do the job don't work any more:   : for > 11.10 no more available through the ppa. : command line alternative, but from 11.10 removed from the repositories. : Looks great but repeatedly crashes to force restarting X-server. So we can't use or recommed this program at the moment.   Are there any other alternatives? Why can't I just think the spin as rotating? I'm going mad about the problem.  I really don't understand why do electron have 1/2 spin number, why they are not actually spinning.  I can accept that the electrons have their own magnetic field, which is certain, but why do they have $\hbar\sqrt3/2$ of angular momentum, and I don't know what the heck is spin number.  I've read the definition of  and  more than a hundred times but there is no betterment. I've smashed my head in my desk more than a hundred times either.  My question is the title. Why can't I just think the spin as rotating?  What I've saw recently,     electron's hypothetical surface would have to be moving faster than the speed of light in order for it to rotate quickly enough to produce the necessary angular momentum. Can I use virtualbox with a 64 Bit image in a 32 bit host I have Virtualbox 4.1.20 in Ubuntu 12.04 32 Bit (With PAE) and I want to run Ubuntu Server 64 Bit on the Guest. Is this possible?. I ask since I get the following warning:    I want to make sure that there is no option to "emulate" this. I have a 64 bit CPU that supports virtualization. The Intel DZ68DB motherboard with an Intel I7 2600 CPU. How to initialize private static members in C++? What is the best way to initialize a private, static data member in C++?  I tried this in my header file, but it gives me weird linker errors:  class foo {     private:         static int i; };  int foo::i = 0;   I'm guessing this is because I can't initialize a private member from outside the class.  So what's the best way to do this? How do I install the Tor Browser Bundle in Ubuntu? In Ubuntu 13.04 I used to use the ppa:upubuntu-com/tor64  PPA to install the 64-bit Tor Browser Bundle. However, in Ubuntu 13.10 it doesn't work anymore. How do I install the Tor Browser Bundle in Ubuntu? How to start/stop/restart a thread in Java? What is the Python equivalent of Perl's chomp function, which removes the last character of a string if it is a newline? Is there a systematic way of solving cubic equations? In my text book, to solve cubic equations, I need to    find by trial &amp; error what $f(a)$ will make the equation 0. The factor will be $(x-a)$ then the other factor will be $Ax^2+Bx+C$ then I can solve using compare coefficient   But for te first part, is there any other way apart from trail &amp; error? Or is there some technique to guess the factor of an equation?   The question I am currently doing happens to be $2x^3+3x+4=9$   UPDATE:  $2x^3+3x+4=9$ should be $2x^3+3x+4=9x^2$   UPDATE 2  So I am going to try substituting   $x=\pm{1}, \pm\frac{1}{2}, \pm{2}, \pm{4}$  When $x=-\frac{1}{2}$, one of the provided answers,   $2(−0.5)^3−9(−0.5)^2+3(−0.5)+4=-18.75\neq 0$   did I make a mistake? Operators can be cyclically interchanged inside a trace: $${\rm Tr} (AB)~=~{\rm Tr} (BA).$$ This means the trace of a commutator of any two operators is zero: $${\rm Tr} ([A,B])~=~0.$$ But what about the commutator of the position and momentum operators for a quantum particle? On the one hand: $${\rm Tr}([x,p])~=~0,$$ while on the other hand: $$[x,p]~=~i\hbar.$$ How does this work out? How do I calculate the resistor value for a simple LED circuit? I have a simple circuit:    The max rating (current) of the LED is 30mA.  How can I work out what the resistance of the resistor needs to be? By using ohm's law I found it to be \$3V/0.03A = 100 \Omega\$. However using software called , and trial and error I got the minimum possible resistance to be 36&Omega;. However, if I use a 35&Omega; resistor, then the LED breaks. Is the software wrong, or (more likely) am I doing something wrong? How do you mark a struct template as friend? "Install VMware Tools" greyed out after installing ubuntu 15.04 on vmware player 7.1 "Install VMware Tools" greyed out after installing Ubuntu 15.04 on VMware Player 7.1. I tried checking "No proxy" instead of default "Windows proxy settings" at "File->Preferences->Software updates-> Connection Settings". This did not work either. Is there a way to install VMware Tools? I was wondering in C++ if I have an enum can I access the value at the second index?  For example I have  enum Test{hi, bye};   if I want 'hi', can I do something like Test[0], thanks. uwsgi errno 24 too many open files on CentOS / nginx Typesetting long division with tabular and overlining repeating part The security guard problem There was a security guard in a bank. In front of him were 100 lockers in rows of 10. He thought of something as he saw all the lockers were closed. He started opening all the lockers whose lock numbers were multiples of 1, then closed all lockers whose number was a multiple of 2,and did the same for 3 and so on. If the locker was open, he closed it, if closed, opened it. He went to open multiples of 1 (all),then 2,4,6,8...and then 3,6,9.. And then finally reached 100.  After all the opening and closing,in the end, how many lockers are open and how many closed? Custom kernel: fails to load firmware when module built-in I'd like to have all my modules built-in, but this fails with iwlagn:  iwlagn 0000:03:00.0: request for firmware file 'iwlwifi-6000-4.ucode' failed. iwlagn 0000:03:00.0: no suitable firmware found!   The microcode file exists in /lib/firmware and the whole thing works just fine if I compile iwlagn as module. I have no idea where it's looking for the file or what's wrong - any ideas?