In Python, why are some built-in functions called using brackets with the method name before the object, e.g.  print("foobar") bool("foobar") ...   While others are built-in method attributes, called with a dot behind the object, e.g.  "foobar".capitalize()   Specifically I'm interested to learn if there is a general principle behind this instead of just common practice and memorization. In cases where you can't quite remember whether it was capitalize("foobar") or "foobar".capitalize(), how do you know?
example:  a_list = [1, 2, 3] a_list.len() # doesn't work len(a_list) # works   Python being (very) object oriented, I don't understand why the 'len' function isn't inherited by the object.  Plus I keep trying the wrong solution since it appears as the logical one to me
How long does the Truffle take to move in after building the mushroom biome? I currently find myself in a pickle because even after I've built the mushroom biome and met all other requirements, the Truffle NPC won't move in.   I've defeated not only the Wall of Flesh but Ocram already. Created a surface mushroom biome. Built a house made out of mushrooms with mushroom furniture.   I have no idea how long it takes for the NPC to move in or if I'm wrong in any of the steps. Define functions in structs Does a finally block always get executed in Java? Considering this code, can I be absolutely sure that the finally block always executes, no matter what something() is?  try {       something();       return success;   }   catch (Exception e) {        return failure;   }   finally {       System.out.println("I don't know if this will get printed out"); } I have researched and found out long time no see is a direct translate from the Chinese phrase, 好久不见. As much as we use it almost everyday in our lives, is it actually grammatically correct? Since it is a direct translate, is it grammatically approved? I noticed that Dolores Umbridge was born during the first Wizarding War, so it's very likely she wasn't a Death Eater then (but she is pretty evil -- who knows?).  After that Voldemort was not around in a way that could affect many people, and most wouldn't know he was planning to rise again.  During that time, and up through Voldemort's return (in Goblet of Fire), did Umbridge have any connection with the Death Eaters or with Voldemort?  Was she doing what she did on her own, or was it because of an association with Voldemort or his allies? If I run  export TEST=foo echo $TEST   It outputs foo.  If I run  TEST=foo echo $TEST   It does not. How can I get this functionality without using export or a script? this principled shader node cant be shown in blender 2.78? As you can see appears "undefined" the PBT Principled shader node from blender 2.79, and I need to use it.  Is there a way or other alternative for rendering PBR Textures with all the same input settings that this shader has? I'm trying to create a multi-page table with all cells having the same height (as well as certain fixed widths) so that certain manual cut-and-paste operations are a lot easier.  One issue is that one column in particular is text-heavy and should line-break within the cell.  As I don't want it justified, I looked into alternatives such as .  This is doing exactly what I want for horizontal alignment.  For vertical alignment, I've looked at  and the \vphantom method detailed in the above link doesn't seem to be working.  Here's what I'm currently working with:  \documentclass[11pt]{article} \usepackage{array}  \newcolumntype{P}[1]{&gt;{\raggedright\hspace{0pt}\arraybackslash}p{#1}} \def\Z{\vphantom{\parbox[c]{1.7in}{\Huge Something Long}}}  \begin{document} \begin{tabular}{| c || P{0.5in} || P{0.5in} || P{5in} |}\hline  1.  \Z &amp;&amp;&amp; Long long long long long long long long long             long long long long long long long text  \\\hline 2.  \Z &amp;&amp;&amp; More long long long long long long long long             long long long long long long long text  \\\hline \end{tabular}   When I compile, the cells do not have a uniform height, and none of them are as large as 1.7 inches vertically.  So this suggests that somehow the \vphantom method is failing.  Does anybody know of a relatively straightforward solution to this problem? Windows 8 opens notepad on boot- no startup entry found I just upgraded from windows 7 to windows 8 and everything is working fine except notepad keeps opening on boot with a "access denied" window that comes up as well. I've ran MBAM and removed some junk, I've disabled every "file not found" item in autoruns as well as something that had a text/xml title in it and I've ran CCleaner a few times. Nothing is working, any help is much appreciated! When is tension constant in a rope? Consider a massless rope with pulling forces applied at each end.  How do we decide if tension is constant or not in a rope? Consider a few example scenarios:  For example, if there is a knot in the rope the tension is not constant throughout (why?. Similarly, if the rope is hung over a cylindrical pulley of a non-negligible radius, the tension is not constant (why?). If there isn't anything touching the rope, for example, 2 people tugging on the rope at each end, the tension is constant (why?). I'm a first time Linux user. My laptop wasn't connecting to the wifi so I followed the instructions from .  On typing sudo apt-get update after that, I got this error:  E: Type 'sudo' is not known on line 2 in source list /etc/apt/sources.list E: The list of sources could not be read.   What can I do? How to divide aleph numbers If $\gcd(a,b)=1$, then there exists integers $x$ and $y$ such that $xa + yb = 1$ Did not find this from this website...  If $$ \gcd(a,b)=1,$$ then there exists integers $x$ and $y$ such that $$xa+yb=1.$$  Now, the tip is to use particular corollary, that states:  The class $[m]_{n}$ generates $\mathbb{Z}/n\mathbb{Z}\Leftrightarrow \gcd(m,n)=1.$  I am totally lost with the corollary.  Let's assume that $\gcd(m,n)=1$. Then, $[m]_{n}$ generates $\mathbb{Z}/n\mathbb{Z}$.  OK! Then what?  There is also follow up, where I have to prove the converse. I am familiar with Bezout's lemma. I am given this problem: let $a\ge0$,$b\ge0$, and the sequences $a_n$ and $b_n$ are defined in this way: $a_0:=a$, $b_0:=b$ and $a_{n+1}:= \sqrt{a_nb_n}$ and $b_{n+1}:=\frac{1}{2}(a_n+b_n)$ for all $n\in\Bbb{N}$    To prove is that both sequences converge and that they have the same limit. I don't know how to show this. I have spent 2 hours on this, no sign of success I understand that the  is given by  $$F^{\mu\nu}\mapsto\begin{pmatrix}0 &amp; -E_{x} &amp; -E_{y} &amp; -E_{z}\\ E_{x} &amp; 0 &amp; -B_{z} &amp; B_{y}\\ E_{y} &amp; B_{z} &amp; 0 &amp; -B_{x}\\ E_{z} &amp; -B_{y} &amp; B_{x} &amp; 0 \end{pmatrix}$$  where $\mu$, $\nu$ can take the values {0,1,2,3} or {$t,x,y,z$}.  So, for example  $$F^{01}=F^{tx}=-E_x$$  My question is, what would the following expression be?  $$F^{t\rho}=?$$ or $$F^{z\rho}=?$$  where $\rho=\sqrt{x^{2}+y^{2}}$ is the radial coordinate in ?  And more generally, how can we construct the Electromagnetic Tensor in cylindrical coordinates? Where $\mu$, $\nu$ now take the values {$t,\rho,\varphi,z$}. What is recursion and when should I use it? One of the topics that seems to come up regularly on mailing lists and online discussions is the merits (or lack thereof) of doing a Computer Science Degree. An argument that seems to come up time and again for the negative party is that they have been coding for some number of years and they have never used recursion.  So the question is:   What is recursion? When would I use recursion? Why don't people use recursion? Saving memoization to disk I want to find the probability that mean is less than 5 given that poisson distribution states it is 6 ie find p(x&lt;5|x~po(6))  Here is the actual question: Two grocers agree that the daily demand for a particular item has Poisson distribution. However, grocer A claims that the mean demand is 3 items per day, while grocer B claims that the mean demand is 6 items per day. They agree to resolve the disagreement by observing the demand on one particular day: B agrees to accept A’s claim if the observed demand is 4 or less, and A agrees to accept B’s claim if the observed demand is 5 or more. (a) Calculate the probability that A’s claim is accepted when, in fact, B’s claim is correct Postgres : Relation does not exist error Can I SSH into a specific directory?