React - A More Comprehensive Email Validation
How to validate an email address in JavaScript
"An hour" or "a hour" Weight Painting Won't Get Rid of Weird Protrusions I tried adding weight, removing weight and removing doubles. The mesh popping out won't go away. Any ideas?    Blend File: What would be your preferred way to concatenate strings from a sequence such that between every two consecutive pairs a comma is added. That is, how do you map, for instance, ['a', 'b', 'c'] to 'a,b,c'? (The cases ['s'] and [] should be mapped to 's' and '', respectively.)  I usually end up using something like ''.join(map(lambda x: x+',',l))[:-1], but also feeling somewhat unsatisfied. how many semantically different boolean functions are there for n boolean variables? In short, this is an assignment question for a course I am taking - the exact wording is this:  "Given n Boolean variables, how many 'semantically' different Boolean functions can you construct?"  Now, I had a crack at this myself - and got pretty stuck. The question doesnt state how many boolean operators there are (and, or, xor, nand, nor, iff, implies, not) nor does it state whether brackets should be used, i.e. a ^ (b v c) is different from (a ^ b) v c.  So, my question for you is - is this question possible given the limited information available?   Is it going to be something like ${n^x}$ where x is the number of boolean operators.  Any direction here would be greatly appreciated. I am not a native speaker. On a previous question of mine, I thanked for an answer by saying:     So the phrase is not an idiom, since it is applied in its literal sense.   I consciously chose since over because, because — well, I like that usage of since, even though I know that some (native speakers) don't like it. Nonetheless, that choice got me thinking for a while, and it occurred to me that I even could have used more alternatives, namely as or for, without changing the meaning.   So, on a general note, here are the alternatives:        Statement A (is true), because statement B (is true).   Statement A (is true), since statement B (is true).   Statement A (is true), as statement B (is true).   Statement A (is true), for statement B (is true).      Are these completely interchangeable? Or interchangeable in certain situations? Or can you point out any (not-so-)subtle differences between any of them? Are there even more synonyms? Were there any canon examples of Harry being an innately powerful wizard? Was Harry Potter an innately powerful/skillful Wizard in any way, based on canon?  It seems that whenever Harry Potter performed some unusually potent bit of magic (potent as far as require raw power AND/OR skill), most of the time we find that it wasn’t innately Harry’s skill, but a combination of:   some extraneous magic forces/rules/powers circumstance great reaction time (which is obviously extraordinary from his Quidditch playing; and is likely a larger factor in his dueling than the strength of his magic) general smartness or (the part that Harry’s detractors, including Voldemort missed) Harry’s strength of character/personality   The only two counter-examples I can think of which show him as having extraordinary or at least obviously above average magical abilities are:   His skill at flying brooms - while a part of it is pure physical skill, at least part is magical. His (corporeal) Patronus charm   As far as examples of his unusual feats being due to reasons listed above:   Obviously, surviving Avada Kedavra as an infant - due to Lily’s sacrifice Parselmouth talent - proxied via Voldemort’s piece of soul. Ability to see the Sorcerer’s Stone in the Mirror of Erised - due to purity of his character, nothing magical. Obvious lack of talent at potion making throughout all of the books (sans cheating in HBP) His win over the Basilisk - due to Hermione’s research, character traits, and as a consequence of the last one, getting Fawkes and Gryffindor’s Sword’s help.  Just to be clear, before someone flames me - what he did was obviously super extraordinary, BUT IMHO he would have achieved the same result if he was turned into a Squib for the duration of Chamber of Secrets fight. TriWizard Tournament entry - wasn’t him, it was Barty Crouch TriWizard Tournament second challenge - a combination of character and outside help (someone told him about Gillyweed) TriWizard Tournament third challenge - Mostly, Barty Crouch’s cheating  Note that I’m omitting the first challenge, since that one was the aforementioned Broom flying skills. His survival in the cemetery after Voldemort’s return - again, a combination of superior strength of character and super powerful wandlore magic that had nothing to do with his skill as a Wizard. The whole “last Horcrux” thing when surviving the second Avada Kedavra from Voldemort His ownership of the Elder Wand in the very last duel with Voldemort.   So, to paraphrase my original question, was there any canon/JKR evidence that Harry was anything but a completely average/mediocre wizard in any way, shape, or form if you take into account only his own magical abilities and skills? Find the smallest integer $n$ greater than $1$ such that the last $3$ digits of $n^2$ are the same as the last $3$ digits of $n$. Find the smallest integer $n$ greater than $1$ such that the last $3$ digits of $n^2$ are the same as the last $3$ digits of $n$.  So far I've got $n^2 = 1000k + n$ which means $n^2 ≡ n \mod 1000$. I  don't know how to proceed since 1000 seems to be a bit high. Is it possible to build a single mysql query (without variables) to remove all records from the table, except latest N (sorted by id desc)?  Something like this, only it doesn't work :)  delete from table order by id ASC limit ((select count(*) from table ) - N)   Thanks. How do I handle the window close event in Tkinter? Pivot in SQL 2008 R2 In the series finale, Admiral Janeway travels back to 2378 to take Voyager back to Earth. Out-of-universe, of course, this point in time was chosen to fit in with the continuity of the rest of the series. In-universe, however, it seems that Janeway could have chosen any point in time, since she had the ability to travel to and from the Delta Quadrant at will. Is there a reason given, in-universe, for why she chose that particular incident to travel back to? Consider a complete metric space $(X,d)$ and $T\colon X\to X$. Suppose there exists $n\in\mathbb{N}$ such that the n-th power of $T$ is $q$-contractive. Show that then $T$ has exactly one fixed point $\overline{x}\in X$.      The n-th power is defined inductively: $$ T^{n+1}(x):=T(T^{n}(x)), n\in\mathbb{N}. $$ And for a function $T\colon X\to X$, $q$-contractive means  $$ \exists 0\leq q&lt;1~\forall~x,y\in X: d(T(x),T(y))\leq q d(x,y). $$    Now to the proof.  I think I have to show, that $T$ is q-contractive, because then it follows with Banach, that $T$ does have exactly one fixed point. So I have to show, that there exists a $0\leq q&lt;1$ so that for all $x,y\in X$ it is $$ d(T(x),T(y))\leq q\cdot d(x,y). $$ And most likely I have to use the q-contractivity of $T^n$, i.e. that there exists a $0\leq q &lt;1$ so that for all $x,y\in X$ it is $$ d(T^n(x),T^n(y))\leq q\cdot d(x,y). $$  Can you help me? $\mathbb{R}$ with the lower limit topology is not second-countable I am trying to prove that $\mathbb{R}$ with the lower limit topology is not second-countable.  To do this, I'm trying to form an uncountable union $A$ of disjoint, half-open intervals of the form $[a, b)$, $a &lt; b$. Is this possible? I think this would imply the $A$ is open but no countable union of basis elements could coincide with $A$ therefore making the real numbers with the lower limit topology not second-countable.  I think there must exist something like $A$ described above but I am having trouble visualizing it and coming up with a formula to represent it.  Maybe there is some other way to show it is not second-countable. How to change background colour in texworks I am using texworks for the first time, I want to change the background of the editor from dark to white, as the code is not visible in dark background. I am using texworks in Manjaro Linux on GNOME desktop environment. Please help me. Why not use development provisioning instead of ad hoc? What is the origin of BrEng ‘bird’ meaning “young woman”? Bird:         (Brit.) a girl or young woman, esp one's girlfriend ()      According to  bird:         "maiden, young girl," c.1300, confused with   (q.v.), but felt by later writers as a figurative use of  (n.1). Modern slang meaning "young woman" is from 1915, and probably arose independently of the older word.      also :         , bird was used for ‘girl’, but this was probably owing to confusion with another similar middle English word, burde, which also meant ‘young woman’. The usage crops up from time to time in later centuries, clearly as an independent metaphorical application, but there does not really seem to be an unbroken chain of occurrences leading up to the sudden explosion in the use of bird for ‘young woman’ in the 20th century.   (www.dictionarycentral.com)      Modern usage of bird meaning girl appears to be unrelated to the old Middle Ages meaning. Etymonline dates it back precisely to 1915.    What is the modern origin of bird meaning young woman?  In what context did they start to use it at the beginning of the 20th century? What setting causes OS X to let you resize windows behind the dock? I've set up my fair share of Macs over the years, but I've never been able to pinpoint what setting tells OS X that you're ok with being able to drag-resize a window vertically so that it goes behind the dock (assuming the dock is in its default position at the bottom of the screen), as opposed to only being able to resize it vertically so that it is touching the top of the dock's "space".  My work computer is a 21" iMac Core 2 Duo and it drives me crazy because I'll quickly drag-resize a window larger by pulling down and to the right but instead of staying locked vertically above the dock it'll slide behind it which I don't like so then I've gotta jiggle the window around to get it all back into visible space... my home computer (6 core tower) doesn't have this problem even though I've, from what I can tell, set it up nearly identically.  Both machines running the latest version of snow leopard.  Here's a video captured from my machine at home showing the window resize behaviour I prefer. If it helps at all I can do another one from my work machine tomorrow showing the windows resizing behind the dock. Find $\lim_{n \to \infty} \left[\frac{(n+1)^{n + 1}}{n^n} - \frac{n^{n}}{(n-1)^{n-1}} \right]$ (a question asked at trivia) My friend's trivia league had this math question:  $$\lim_{n \to \infty} \left[\frac{(n+1)^{n + 1}}{n^n} - \frac{n^{n}}{(n-1)^{n-1}} \right]$$  After computing a few values, one could guess the answer is $e$ = 2.718...But how can we prove that is the limit?  Someone offered up a hand-wavy proof like this:  \begin{align} \lim_{n \to \infty} \left[\frac{(n+1)^{n + 1}}{n^n} - \frac{n^{n}}{(n-1)^{n-1}} \right] &amp; = \lim_{n \to \infty} \left[\frac{(n+1)(n+1)^{n}}{n^n} - \frac{n \cdot n^{n-1}}{(n-1)^{n-1}} \right] \\ &amp;= \lim_{n \to \infty} \left[(n+1)\frac{(n+1)^{n}}{n^n} - n\frac{n^{n-1}}{(n-1)^{n-1}} \right] \\ &amp;= \lim_{n \to \infty} \left[(n+1)\left(1 + \frac{1}{n} \right)^n - n\left(\frac{n - 1 + 1}{n-1} \right)^{{n-1}} \right] \\ &amp;= \lim_{n \to \infty} \left[(n+1)\left(1 + \frac{1}{n} \right)^n - n\left(1 + \frac{1}{n-1} \right)^{n-1} \right] \\ &amp;= \lim_{n \to \infty} \left[(n+1)e - n \cdot e \right] \\ &amp;= \lim_{n \to \infty} e \\ &amp;= e \end{align}  The part about substituting $e$ is hand-wavy since technically this is an indeterminate form of $\infty - \infty$. And using $e$ as as upper bound did not lead me to an easy proof either.  Is there a way to rigorously prove the limit? I tried a few approaches: (a) sandwiching the limit--I could prove $e$ was a lower bound, but I could not find a suitable upper bound converging to $e$, (b) using L'Hopital's rule with no luck, (c) using the mean value theorem--but that also got complicated.  So this is a pretty tough problem to ask at trivia! Is there a way to prove this limit formally?  Sources  Trivia question:   Thread on trivia:   Hand-wavy proof:   Idea for mean value theorem: I created a bunch of filters in Gmail for a "master account" that receives forwarded mail from all of my accounts.  The filter list and web of labels/folders has grown to be rather long, and therefore a bit burdensome to manage. I would like to edit / delete / consolidate a lot of these filter rules (and folders) but it seems the only way I can interface with them is through the laundry list at Setting/Filters. It'd be cool there was an option to "View/Edit Filter" on an individual email's page, but I'm not sure if something like that currently exists.  What's the best way to view a filter rule currently being applied to an email (in Gmail)? Extra semicolon near answers header On all the SE sites that I checked, the text that normally says something like “1 Answer” now says “1 Answer;” (with a semicolon seemingly in superscript):    The HTML for that part of the page looks like this (the semicolon is on the fourth line from bottom):              &lt;div id="answers"&gt;                  &lt;a name="tab-top"&gt;&lt;/a&gt;                 &lt;div id="answers-header"&gt;                     &lt;div class="subheader answers-subheader"&gt;                         &lt;h2&gt;                                 1 Answer                         &lt;/h2&gt;                         &lt;div&gt;                             &lt;div id="tabs"&gt;         &lt;a href="/questions/18587301/which-is-good-il-editor?answertab=active#tab-top" title="Answers with the latest activity first"&gt;             active         &lt;/a&gt;         &lt;a href="/questions/18587301/which-is-good-il-editor?answertab=oldest#tab-top" title="Answers in the order they were provided"&gt;             oldest         &lt;/a&gt;         &lt;a class="youarehere" href="/questions/18587301/which-is-good-il-editor?answertab=votes#tab-top" title="Answers with the highest score first"&gt;             votes         &lt;/a&gt; &lt;/div&gt; ;                         &lt;/div&gt;                     &lt;/div&gt;                 &lt;/div&gt;