Interrupting or stopping a sleeping thread
How can I kill a thread? without using stop();
Label and caption without float I’d like to have an environment that works much like a float, except that it doesn’t float.  That is, in fact, I’d like to be able to define an environment that has a label and a caption.  I explicitly do not want to use a floating environment, though. For one thing, floats do many things fancy which I just don’t need, nor want (such as spacing) and for another, floats have their share of problems (for example consider the problem of ).  Is there a ready-made way to achieve this? Of course, I could always write my own based on the result of the other answer, i.e. harnessing \refstepcounter. But I’m not sure how to use that, documentation is scarce, and I’d prefer an existing solution. Terence Tao, Analysis I, Ex. 5.5.2: Entry point needed Terence Tao, Analysis I, 3e, Exercise 5.5.2:     Let $E$ be a non-empty subset of $\mathbb{R}$, let $n \ge 1$ be an   integer, and let $L &lt; K$ be integers. Suppose that $K/n$ is an upper   bound for $E$, but that $L/n$ is not an upper bound for $E$. Without   using Theorem 5.5.9, show that there exists an integer $L &lt; m \le K$   such that $m/n$ is an upper bound for $E$, but that $(m-1)/n$ is not   an upper bound for $E$. (Hint: prove by contradiction, and use   induction. It may also help to draw a picture of the situation.)    does not do the trick for me, since I'm looking for the proof by contradiction, equipped only with the set of propositions and theorems covered so far.  What I'm actually looking for is an entry point to the proof, since I find it quite hard to negate the assumption.  My attempt is to induct over $n$. Assume I have been able to prove the statement for $n = 1$, is the following a valid negation of the assumption?  For all integers in the range $(L, K]$, at least one of the following statements holds:   $(m-1)/(n+1)$ is not an upper bound and $m/(n+1)$ is not an upper bound. $(m-1)/(n+1)$ is an upper bound and $m/(n+1)$ is not an upper bound. $(m-1)/(n+1)$ is an upper bound and $m/(n+1)$ is an upper bound.   If I were able to prove that there is an integer in the given range such that none of the above holds, am I done?       Theorem 5.5.9 (Existence of least upper bound). Let $E$ be a non-empty subset of $\mathbb{R}$. If $E$ has an upper bound, (i.e.,   $E$ has some upper bound $M$), then it must have exactly one least   upper bound.     I went through another loop considering  of Steve Kass, but I ended up wondering why the proof needs induction at all:  Assume for all integers $m$ where $L &lt; m \le K$ we have that $m/n$ and $(m-1)/n$ are upper bounds of $E$. Then $(m-1)/n = L/n$ is also an upper bound. But $L/n$ is no upper bound, by assumption. Assume $m/n$ and $(m-1)/n$ are no upper bounds. Then $m/n = K/n$ is also no upper bound. But $K/n$ is an upper bound, by assumption.   Hence, there is an integer in the range $(L, K]$ s.t. $m/n$ is an upper bound for $E$, and $(m-1)/n$ is not. How to disable Ctrl+Shift+U? Best place to put bug reports? What websites or other resources do users of Blender have available to them to report bugs or problems with the program?  I would like to get this issue cleared in Q&amp;A format so that we can link new users with bug-report-style questions to this post. Why does strcmp() return 0 when its inputs are equal? When I make a call to the C string compare function like this:  strcmp("time","time")  It returns 0, which implies that the strings are not equal.  Can anyone tell me why C implementations seem to do this? I would think it would return a non-zero value if equal. I am curious to the reasons I am seeing this behavior. Mathematical Basis behind inflation of Standard errors of Regression estimates due to multicollinearity We know that due to multi-collinearity, the standard errors of beta estimates get inflated. But what is the mathematical basis to it?   I am looking for some mathematical relationship or something to explain this.   Like I understand if standard error of betas goes up, then t-statistics goes down and we might not be able to reject the null or the variables would appear non-significant.   But what is the mathematical relationship between multicolllinearity and inflation in variance of coefficients? A word or short phrase for 'better in every way'? When we're comparing two or more things, there are times when we have to weigh the advantages or disadvantages of each one.  There are other times when one of the things is better for every way in which it's being judged, and the final decision is not based upon trade-offs.  I know that I've heard a phrase for this (I want to say it was two words), but I've had no luck in remembering it.    I don't think 'clearly superior' or 'clear winner' quite fit the bill, as that might still suggest that the disadvantages are significantly outweighed by the advantages.  Is there such a phrase, or even a single word, that would convey this meaning without using idioms? prints out a lot of very detailed protocol statistics like number of TCP reset messages received or number of ICMP "echo request" messages sent or number of packets dropped because of a missing route.  When in Linux netstat is considered deprecated at nowadays, then is there an alternative?  Statistics provided by ss -s are superficial compared to the ones provided by netstat. Setting post meta data to random value during post status transition / on publish I am using Ubuntu 16.10 and recently I have not been able to connect to internet using Ethernet. The network manager shows device not managed. The WiFi network is working fine.      I've tried the solution from this questionn  with no use.  My /etc/network/interfaces file:  # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback   My /etc/NetworkManager/NetworkManager.conf file:  [main] plugins=ifupdown,keyfile,ofono dns=dnsmasq  [ifupdown] managed=true   Output of nmcli d:  DEVICE  TYPE      STATE      CONNECTION  wlp2s0  wifi      connected  eduroam     enp8s0  ethernet  unmanaged  --          lo      loopback  unmanaged  -- I'm trying to find out why my application is very slow on a certain machine (runs fine everywhere else). I think i have traced the performance-problems to hard-disk reads and writes and i think it's simply the very slow disk.  What tool could i use to measure hd read and write performance under Windows 2003 in a non-destructive way (the partitions on the drives have to remain intact)? What is the preferred way to mention Stack Overflow from Twitter? I wanted to tweet something on the lines of "Stack&nbsp;Overflow is awesome". When I do this kind of stuff, I usually use a username (for example: ) or a hashtag ()  I found , but it seems it is from someone unrelated with Stack&nbsp;Overflow.  Is there a Twitter account I can reference, or should I use a hash-tag? Should I just point to the site?  Thanks!  (Notice: I've seen lots of questions regarding Twitter and Stack&nbsp;Overflow, but those are mostly about integration/login with Twitter for the users accounts; I'm just asking for a single account for Stack&nbsp;Overflow; probably for announcements and PR, which is different) I read on here of an exercise in interviews known as validating a binary search tree.  How exactly does this work? What would one be looking for in validating a binary search tree? I have written a basic search tree, but never heard of this concept. How does password salt help against a rainbow table attack? I'm having some trouble understanding the purpose of a salt to a password.  It's my understanding that the primary use is to hamper a rainbow table attack.  However, the methods I've seen to implement this don't seem to really make the problem harder.  I've seen many tutorials suggesting that the salt be used as the following:  $hash =  md5($salt.$password)   The reasoning being that the hash now maps not to the original password, but a combination of the password and the salt.  But say $salt=foo and $password=bar and $hash=3858f62230ac3c915f300c664312c63f.  Now somebody with a rainbow table could reverse the hash and come up with the input "foobar".  They could then try all combinations of passwords (f, fo, foo, ... oobar, obar, bar, ar, ar).  It might take a few more milliseconds to get the password, but not much else.  The other use I've seen is on my linux system.  In the /etc/shadow the hashed passwords are actually stored with the salt.  For example, a salt of "foo" and password of "bar" would hash to this: $1$foo$te5SBM.7C25fFDu6bIRbX1.  If a hacker somehow were able to get his hands on this file, I don't see what purpose the salt serves, since the reverse hash of te5SBM.7C25fFDu6bIRbX is known to contain "foo".  Thanks for any light anybody can shed on this.  EDIT:  Thanks for the help.  To summarize what I understand, the salt makes the hashed password more complex, thus making it much less likely to exist in a precomputed rainbow table.  What I misunderstood before was that I was assuming a rainbow table existed for ALL hashes. My friend recently received a new digital drawing tablet (Wacom Intuos Pro). Among other features, there is a hole that resembles a charm hole found on mobile phones:    Other parts of the package (e.g. pen) do not have such holes, so it isn't possible to attach them using a band. What is the purpose of this hole? Is it just for attaching various charms and such? Organize uploads by year, month and day Can White Walkers talk? Through all the five seasons of Game of Thrones we had never seen a White Walker talking.  Does this mean they can't talk human language (e.g. they have their own language) or we will never see them talking (i.e. they can't talk at all)? Is there an equivalent of 'which' on the Windows command line? As I sometimes have path problems, where one of my own cmd scripts is hidden (shadowed) by another program (earlier on the path), I would like to be able to find the full path to a program on the Windows command line, given just its name.  Is there an equivalent to the UNIX command 'which'?  On UNIX, which command prints the full path of the given command to easily find and repair these shadowing problems. $\operatorname{Aut}(\mathbb Z_n)$ is isomorphic to $U_n$. Let $a_1,a_2,a_3,\ldots$ be reals. Prove that if $\sum_{n=1}^{\infty} a_n^{2}$ converges, then so does $\sum_{n=1}^{\infty} \frac {a_n}{n}$.   For this I have shown the case for when $ a_n^{2} \le\frac {|a_n|}{n}$ $\Rightarrow$ $ |a_n|\le\frac {1}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le \frac{1}{n^{2}}$ and we know that $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges and hence $\sum_{n=1}^{\infty}\frac {a_n}{n}$ converges by the comparison test. Now considering $ a_n^{2} \ge\frac {|a_n|}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le a_n^{2}$ $\rightarrow$ combining the two cases for any n we have: $\frac {|a_n|}{n}\le\frac{1}{n^{2}}+a_n^{2}$ Hence using the comparion test again we know that $\sum_{n=1}^{\infty} a_n^{2}$ converges and $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges hence the sum converges so we can conclude that $\sum_{n=1}^{\infty} \frac {a_n}{n}$ is absoluetly convergent $\Rightarrow$ convergent.  Not to sure if this is correct, any help would be much appreciated, many thanks.