I need help with very simples question, a conditional using regex with multiline string. No make sense to me why this not work:  if(re.match(r"\w", " \n\n\n  aaaaaaaaaaaa\n\n", re.MULTILINE)):     print('ok') else:     print('fail')  fail   I expected that result be ok, but no match any data. I trying using , but there works and in my code not works.
What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.
Let $T=\{z:|z|=1 \mathbin{\text{and}} z \in \mathbb C\}$ be the unit circle in the complex plane, considered as a topological group under complex multiplication and the usual topology. Show that every subgroup of $T$ is either dense in $T$ or finite.  How to prove the denseness? Why do we yawn? I've read a new study which suggests that yawning may help you keep a cool head. Also, the findings might hold some hope for sufferers of insomnia, migraines, and even epilepsy.  Is there any conclusion about what the function of yawning is and why do we yawn? Why is Ubuntu Software Center dropping previously provided applications? Ubuntu Software used to provide Pinta, KolourPaint, Audacity, and others, but they are no longer available there. I have to use apt to install them.   Why has Ubuntu Software 3.20.5 stopped providing applications that it used to?  Ubuntu 16.04 Ubuntu Software Center 3.20.5  Thanks in advance for your help! Does Linux have the capability to use "junctioned" symbolic links? I'm not sure if this is an actual term or not, so let me explain the concept.  I have a git repository containing all my configuration dot files in ~/dotfiles. I use symbolic links into this directory in order to "activate" them. For example, by executing ln -s ~/dotfiles/bash/bash_profile ~/.bash_profile to produce the link:  ~/.bash_profile -&gt; ~/dotfiles/bash/bash_profile   However, I find myself in a situation where I want to combine the contents of multiple files. For example, I want the ~/.bash_profile symbolic link to point to two separate files, one for each project. E.g.:  ~/.bash_profile (1) -&gt; ~/dotfiles/bash/bash_profile (2) -&gt; ~/dotfiles/proj/bash_profile   I know I can simply concatenate the two files (e.g., cat ~/dotfiles/{bash,proj}/bash_profile &gt; ~/.bash_profile), but if I can do the same thing with symbolic links, I would prefer to.  I imagine that if such a feature exists (Nix is pretty huge), then under the hood it would have to map the two different files together, hiding all sorts of complexities under the hood (mapping file offsets of all non-first "mapped" files, locking all files when writing to the junctioned symbolic link, etc, etc).  If such a feature doesn't exist, are there are plans to implement it? Why can't I associate files with Excel after upgrading to 2010? I am trying to prove the following statement but have trouble  comprehending/going forward with some parts! Here is the statement:     If $A$ is any set, then  $|A|$ $&lt;$ $|P(A)|$   Here is what I have so far:  We need to show that there is an injection from $A$ to $P(A)$ but not a surjection.   A natural choice for an injection is the function $ f(x)$ $=$ $\{x \}$, which in plain English, takes any element $x$ (that is in $A$) and sends it to the one-element set $\{x \}$. Thus $f(x)$ is injective!  To show that there is no surjection, for the sake of contradiction, assume there is a surjection. Here is where I start to have trouble. Surjectivity means that every element of the co-domain is mapped to an element of the domain, correct? Consequently, in this particular case, we are "matching" sets (from $P(A)$) to elements (from $A$) right?  If the above is correct, my problem arises here. I am not sure how to prove that $f$ is not surjective. Unfortunately, I am easily confused by notation so please explain in English.  Thank you in advance!! :) How is it possible that Dumbledore worked on the Philosopher's stone with Flamel? I apologize in advance if this is a common question, I searched for "flamel" here first and couldn't find the answer.  If Nicolas Flamel is several hundreds of years old, how did Dumbledore work on the Philosopher's Stone with him? Did he use it a bit himself?  To clarify, Flamel would've died without the PS, at a reasonable age -- so it can be assumed he made it about ~500 years ago. But I seem to recall the book saying that Dumbledore helped him make it. So either Dumbledore used the stone as well (unlikely it seems) or Flamel had already artificially extended his life, or Dumbledore is somehow hundreds of years old.  Am I remembering this incorrectly?  Thank you! Book about mages who can harvest magical energy from the environment I have a vague recollection of a book I devoured while in college; it was from the late 80's or early 90's. I remember that there were two 'classes' of mages, the ones who could harvest magical energy from the environment and supply that power to the other 'class' of mages.  The main character learned that he could reverse the flow and sap the other mage of his/her power. I also seem to remember that there was a lot of technological warfare and travel to the planets moon(s)? Dot Product Intuition I'm searching to develop the intuition (rather than memorization) in relating the two forms of a dot product (by an angle theta between the vectors and by the components of the vector ).      For example, suppose I have vector $\mathbf{a} = (a_1,a_2)$ and vector $\mathbf{b}=(b_1,b_2)$.  What's the physical or geometrical meaning that   $$a_1b_1 + a_2b_2 = |\mathbf{a}||\mathbf{b}|\cos(\theta)\;?$$  Why is multiplying $|\mathbf{b}|$ times $|\mathbf{a}|$ in direction of $\mathbf{b}$ the same as multiplying the first and second components of $\mathbf{a}$ and $\mathbf{b}$ and summing ?       I know this relationship comes out when we use the law of cosines to prove, but even then i cant get a intuition in this relationship.  This image clarifies my doubt:    Thanks Validity and Equivalence of two definitions of the real exponential function The Problem :  We state the following two definitions of the real exponential function from the . We're interested in showing that the two definitions are valid $($i.e. the defining sequence/series does converge to a unique real number$)$ and that the two definitions are equivalent.   I'm stuck at a couple of points $($which are described in highlighted lines$)$. Any help would be much appreciated. Thank you!     Definition $1$. The exponential function can be defined as the following limit of a sequence $$\exp x := \lim_{n \to \infty} \left({1 + \frac x n}\right)^n$$      Definition $2$. The exponential function can be defined as a  $$\exp x := \sum_{n = 0}^\infty \frac {x^n} {n!}$$   My Progress and two places where I'm stuck : Essentially the solution consists of three parts,  namely validity of definition $1$, validity of definition $2$ and equivalence of the two definitions.     Validity of Definition $1$. I'm stuck here! Can we show that the sequence $(a_n)$ given by $a_n = \left(1+\frac{x}{n}\right)^n$ converges for every $x \in \mathbb{R} ??$ Is it eventually monotone and bounded $??$   Validity of Definition $2$. The  of the power series is $$r=\lim_{n \to \infty}\left| \frac{\frac{1}{n!}}{\frac{1}{(n+1)!}} \right|=\lim_{n \to \infty}\left| \frac{(n+1)!}{n!} \right|=\lim_{n \to \infty}(n+1)=+\infty$$ Thus the infinite series in the right-hand side of Definition $2$ converges to a unique real number for all $x \in \mathbb{R}$. Hence the definition is well-defined.  Equivalence of Definition $1$ and Definition $2$.  There's this  of Definition $1$ $\implies$ Definition $2$ in the Pr$\infty$fWiki page, but it's kind of under construction and I'm not really convinced by it. So I decided to try to take my own shot at it.  For all $n \in \mathbb{N} \cup \{0\},$ let  $$T_n=\left(1+\frac{x}{n} \right)^n, ~S_n=\sum_{k=0}^n \frac{x^k}{k!}$$ We have to show that $\lim_{n \to \infty} T_n = \lim_{n \to \infty} S_n$  Now, \begin{align} T_n &amp;= \left(1+\frac{x}{n}\right)^n\\ &amp;= 1+n\cdot\frac{x}{n}+\frac{n(n-1)}{2!}\cdot\frac{x^2}{n^2}+\cdots +\frac{n(n-1)\cdots 1}{n!}\cdot\frac{x^n}{n^n}\\ &amp;= 1+x+\left(1-\frac{1}{n}\right)\cdot \frac{x^2}{2!}+\cdots +\left(1-\frac{1}{n}\right)\cdots \left(1-\frac{n-1}{n}\right)\cdot \frac{x^n}{n!} \end{align}  Clearly, $$S_n-T_n=\left\{1-\left(1-\frac{1}{n}\right)\right\}\frac{x^2}{2!}+\cdots +\left\{1-\left(1-\frac{1}{n}\right)\cdots \left(1-\frac{n-1}{n}\right)\right\}\cdot \frac{x^n}{n!}\geq 0$$     I'm stuck at this point. Can we show that $S_n-T_n \leq B_n$ such that $B_n \to 0$ as $n \to \infty ??$ Computing $ \lim_{n\rightarrow \infty}\left(\frac{1^n+2^n+\cdots \cdots +n^n}{n^n}\right)$ Can I start and stop a tile floor job? I am tiling my bathroom floor and don't soon have a full day to dedicate to the job. Is it ok to lay down a few tiles each day and come back to the job when I have time? I would only lay mortar for the tiles I have time to lay each day.    My concern is that the mortar wouldn't properly "join" to the previously laid sections of tile and cause an inferior result, but I'm not really basing this concern on any facts. That is what I'm hoping to learn with this question. Where does the extra kinetic energy of the rocket come from? Man travelling alone across a planet, thinks about a fearsome creature that he hears behind him About fifteen years ago I read a short story about a man on a planet (possibly Mars or the Moon), travelling alone between bases. It's written in the first person and as he's walking across the planet, he's thinking to himself about this fearsome creature that preys on people. It sneaks up on them, makes some noise and then attacks them. Just as he turns the final corner of the canyon he was walking through and sees the door to the other base, he hears the creature behind him making its noise and the story ends.  It was in a short story collection but I don't remember the name of the story or the book it was in. Any help would be much appreciated. subsurf splits the mirrored model into two objects I tried to subsurf this model that I mirrored but when I use subsurf it splits the model into two objects.  Before Subsurf:   After Subsurf:   Any help would be appreciated. Long names cut off in questions and answers The Unhandled Exception's name is cut off in this  and in the answer too. The last 'n' looks like an 'r'.  Using Firefox 3.6.6.  Examples: What is the proper usage of "not only... but also"? I'm trying to figure out how to use "not only... but also" properly. Basically, my goal is to combine two clauses by using "not only".  For negations, I've figured out two styles that both sound correct:   He knew that if he fractures his finger, not only would he not be able to compete in the water polo tournament, he would not be able to take the SAT on Monday, either. He knew that if he fractures his finger, neither would he be able to compete in the water polo tournament, nor would he be able to take the SAT on Monday.   However, I don't know how to form a sentence that does not include a negation while using "not only". Here are a few possibilities that I've considered:   Thanks to his remarkable performance on the SAT, not only was he accepted into Harvard, but he was also given a full scholarship. Thanks to his remarkable performance on the SAT, not only was he accepted into Harvard, but he was given a full scholarship. Thanks to his remarkable performance on the SAT, not only was he accepted into Harvard, he was given a full scholarship. Thanks to his remarkable performance on the SAT, not only was he accepted into Harvard, he was also given a full scholarship.   In those four possibilities, I'm varying the usage of "but" and "also" in the last clause.  What is the proper usage of "not only"? How can I disable a USB port in Windows XP to make it available only for smart phone battery charging?   I don’t want the users to be able to see the USB drive in My Computer, and the USB device should stay disabled in Device Manager.   Is there any way to accomplish this? CK2 is a big game with lots of variables, so I'll stick to adding them upon being requested to minimize the hassle.  Anyway, let's say that you have a lot of children and the oldest one claims all the land according to laws of succession. After the father dies, the circumstances will obviously piss off a lot of people (in my case that would be 6 out of 8 vassals and 4 siblings with an opinion of -50 and below one of which is a sister married to the Basileus of the Byzantine friggin' Empire, a case of excommunication, 4 failed assassination attempts under 3 years... and lots and lots of vikings). Let's also say that the current playable character is completely incompetent compare to the next sibling in line.  So, what would be the most optimal methods to off myself without further screwing over the countryside so the next heir in line has to fix it (if we assume that said heir is actually capable of doing so)?  This is my list of DLCs (not including music and unit packs):   Charlemange Legacy of Rome Sword of Islam The Republic Way of Life Explicit formula for Bernoulli numbers by using only the recurrence relation It is not hard to show, by induction on $m\in\mathbb N$, that there exist a sequence $(B_n)_{n\geq0}$ of rational numbers such that  $$\sum_{k=1}^nk^m=\frac1{m+1}\sum_{k=0}^m\binom{m+1}kB_k\,n^{m+1-k},\ \style{font-family:inherit;}{\text{for all}}\ n\geq1\,.$$  These are the Bernoulli numbers of the second kind, that is, $B_1=+1/2$. A corollary of the proof (by induction) of the fact above is a recurrence formula for such numbers $B_n$, which are known as Bernoulli numbers:  $$\sum_{k=0}^{n-1}\binom nkB_k=0\,.\tag{$\ast$}$$  On the other hand, there are a number of explicit formulae for $B_n$, which are obtained using the equality $\frac x{e^x-1}=\sum_{n=0}^\infty B_n\,\frac{x^n}{n!}$; see  and . For example:  $$B_n=\sum_{k=0}^n\frac1{k+1}\sum_{r=0}^k(-1)^r\binom krr^n\,.\tag{$\ast\ast$}$$  Is there some clever way to manipulate the recurrence $(\ast)$ in order to obtain $(\ast\ast)$?