Metric defined by $d(x,y)=\frac{||x|-|y||}{1+|x||y|}$
Do these define metrics on $\mathbb{R}$?
Sieve of eratosthenes infinite primes I don't understand why the sieve of eratosthenes doesn't prove an infinite number of primes.  For example the number 2 eliminates 1/2 of an infinite number of numbers.  The next prime, 3, eliminates 1/3 of the remainder, not 1/3 of all the numbers and so on.  5 would eliminate 1/5 of the remaining numbers. Why doesn't that prove an infinite number of primes? Thanks Why can't light escape from a classical black hole? Ubuntu 18.04 opening system settings logs me out Can you connect to a LAN server without being on the same internet connection How to use getElementsByClassName in javascript-function? How to activate bluetooth device for RTL8723DE? The wireless drivers for the RTL8723DE appeared for downloading and the module is now usable for Wi-Fi.   See   But the bluetooth part of it is yet not supported on Ubuntu. How this can be fixed?  lsusb shows  Bus 001 Device 003: ID 0bda:b009 Realtek Semiconductor Corp.    And usb-devices | awk '/0bda/' RS=  T:  Bus=01 Lev=02 Prnt=02 Port=03 Cnt=01 Dev#=  3 Spd=12  MxCh= 0 D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1 P:  Vendor=0bda ProdID=b009 Rev=02.00 S:  Manufacturer=Realtek S:  Product=802.11n WLAN Adapter S:  SerialNumber=00e04c000001 C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA I:  If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb I:  If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb How to filter IPv4 and IPv6 addresses? What is the association bonus, and how does it work? Can a concentration spell be cast without actually concentrating on it for an "instant" effect? The book says:     Concentration. Some spells require you to maintain concentration in order to keep   their magic active. If you lose concentration, such a spell ends.   So what happens if, for example, you are already concentrating on a spell, and cast Witch Bolt without concentrating. Would you get the initial arc of blue energy, or would it not even go off?  I am asking if you can cast a spell that says concentration without concentrating for an immediate effect. This would be useful to avoid interrupting your existing concentration. In essence, if you are concentrating on thing A (doesn't have to be a spell since other things need concentration), can you cast a concentration spell getting an immediate effect without losing concentration on thing A?  Since the definition of concentration is to keep the spell active (meaning it is already active) I would think that you would get the initial effect (if it had one) without the need to concentrate on it. I am relatively new to Java, and often find that I need to sort a Map&lt;Key, Value&gt; on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way? (A kind soul at  suggested I post here as well, sorry if out of bounds.)  I'm trying to programmatically model a damped harmonic spring for use in mobile UI animations (physics mathematics isn't my background, please pardon any misconceptions).  Having derived the parameters for the general case equation, I can iteratively calculate values until I reach a suitable threshold, though because this is bound to "simple" trigonometric and $e^{x}$ functions on the CPU, the 4000-some-odd steps can cause about 0.25 seconds lag on slow devices while it calculates. I'd like to speed this up using my platform's super-optimized vector and BLAS/LAPACK variants.  The requirement for doing this is precalculating the number of steps necessary to reach my threshold value.    In the underdamped case, where the roots of the characteristic function of the differential equation are non-real, I can use algebraic tricks to get my values:  $$x(t) = c_{1}e^{r_{1}}\cos(i_{1}t) + c_{2}e^{r_{2}}\sin(i_{2}t)$$  (Given $r_{1}$, $i_{1}$, $r_{2}$, and $i_{2}$ are the real and irrational components of my two roots, respectively.)  Knowing that $r_{1} = r_{2}$ and $i_{1} = -i_{2}$, I can simplify to:  $$x(t) = c_{1}e^{r_{1}}\cos(i_{1}t)$$  And get my desired value of $t$ for my threshold $a$:  $$t = \arccos(a / c_{1} / e^{r_{1}}) / i_{1}$$    When the roots are real, the equation looks a lot simpler:  $$x(t) = c_{1}e^{r_{1}} + c_{2}e^{r_{2}}$$  However, I don't have my trig functions floating around to help me solve it (even if I did, the irrational components being 0 would cause problems, of course).  Take the concrete example on pages 3-4 of  (my bible during this process), since they at least solve cleanly:  $$x(t) = 1.5e^{-t} - 0.5e^{-3t}$$  I know how I would solve for $t$ to get my for when $x(t) = a$ on paper, by setting $x=e^{t}$, solving, and back substituting, but I don't have that luxury here.  I can make a few assumptions: the roots and constants are all real. I'm always going to be looking for the smallest, first, positive value of $t$. Obviously, the iterative solution is the simplest for this case, but in the end that would involve more steps and therefore be slower no matter what my other optimizations would be. How, then, would I go about solving for my threshold value algorithmically in this (supposedly) simplified case?  Addendum  The underdamped solution presents an extra requirement. The motion curve will oscillate back and forth a few times across the endpoint. Therefore, "first and lowest" $t$ requirement is not necessarily true. In my current, iterative code, the threshold value is both checked against the distance from the current $x(t)$ to the endpoint, as well as to the distance from the previous $x(t)$ as well to allow for a number of oscillations. This might make a more efficient solution nearly impossible. I just fit a model in lme4, and I'm wondering what the heck I fit...  I have individuals id, and each is measured pass/fail on items that can be described using two factors, f1 and f2. My theory says that id and f2 can interact. So I want to compare these models:  # f2 doesn't matter m1 &lt;- lmer(pass ~ f1 + (1|id), family="binomial")  # f2 is a fixed effect, doesn't interact with individuals m2 &lt;- lmer(pass ~ f1 + f2 + (1|id), family="binomial")  # f2 is a nested random effect, interacting with individuals m3 &lt;- lmer(pass ~ f1 + (1|f2/id), family="binomial")   First, am I right that there's a random effect of each level of f2, and each individual's level of f2 is partially pooled, depending on the number of observations for that individual?  Second, does it make sense to fit f2 as a fixed effect with random individuals nested within each level of f2? How does one write that?  Third, what's this, with f2 and id reversed in the formula? I typed it by accident, but now I want to understand it.  m3weird &lt;- lmer(pass ~ f1 + (1|id/f2), family="binomial") If I live in the US, for example, where current interest rates are practically nil, how can I take advantage of the fact that ? How can I prove that prove $n^5 - n$ is divisible by $30$? I took $n^5 - n$ and got $n(n-1)(n+1)(n^2+1)$ Now, $n(n-1)(n+1)$ is divisible by $6$. Next I need to show that $n(n-1)(n+1)(n^2+1)$ is divisible by $5$. My guess is using Fermat's little theorem but I don't know how. Why can't I sort questions by "votes" or "unanswered" without logging in? On the "Questions" page of each Stack Exchange site, there are links at the top to sort the questions by "newest", "frequent", "votes", "active", and "unanswered".  At least that is what it looks like if I am logged in. If I am on a site that I don't have an account for, or if I am not logged in, the only one I see is "newest".  This seems to have been done recently. I could swear I saw the other links, even when I was not logged in, until a few weeks ago, or maybe later than that.  Why was this change made? "Any" followed by singular or plural countable nouns? This question has troubled me for ages despite my several attempts of looking it up in dictionaries or usage books. Do we say, "Do you have any ideas" or "Do you have any idea"? I do see an example where "any" means "it doesn't matter who/which/what", therefore "You can borrow any book you like." Also, does it matter between using it in questions and negatives? How can I execute a terminal command (like grep) from my Objective-C Cocoa application? Poisson Distribution of sum of two random independent variables $X$, $Y$ LAN not working on 17.04 Actually yesterday I've upgraded from Ubuntu 16.04 to 17.04 and I got a problem that, if connect LAN cable it does not showing anything and  remains disconnected. But i can connect with WiFi. I don't know what's the problem. Actually its showing "device not managed" under the "Ethernet Network" and both were disabled. I've searched for the solution, but did not found yet. With Glade Designer that lets you set up Gtk-Ui's you can check the option that windows are not shown in the launcher. If I take a look at the ui-file generated by Glade, it says &lt;property name="skip_taskbar_hint"&gt;True&lt;/property&gt;. In gtk code this hint is  window.set_property('skip-taskbar-hint', True). However I believe that this option is not exclusively Gtk-specific, and want to apply this one on my PyQt4-app. The Ubuntu window manager must be able to receive that hint, otherwise I would see the window of a gtk-application i use (stickynotes-indicator). So there MUST be a way of doing this in Qt or any other language, right?  Does anybody know such an option? Python or Qt syntax, doesn't matter!