How to generate random numbers without repetition in Swift?
Unique (non-repeating) random numbers in O(1)?
How to prove that exponential grows faster than polynomial? In other words, how to prove:  For all real constants $a$ and $b$ such that $a &gt; 1$, $$\lim_{n\to\infty}\frac{n^b}{a^n} = 0$$  I know the definition of limit but I feel that it's not enough to prove this theorem. Extract all the polygon coordinates from a SpatialPolygonsDataframe? I want to do something relatively simply but it seems to be very difficult to do, though I am very new to using R for spatial data so apologies if I've missed something obvious.  I have a list containing 161 shapefiles of bird distributions in the world, they are each in the format of a SpatialPolygonsDataFrame. I also have world climate data in a raster stack format for 8 variables. Both sets of files are in the same projection (lat and long WGS84). I want to create new columns for the climate data with 1's where the species polygon overlaps with the climate data and 0 where it doesn't. I tried various functions to do this, quite a few initial options didn't work, the best option appeared to be:  pnt.in.poly(XY coordinates of climate data points, XY coordinates of species polygon)   I changed my raster of climate data into points to get the XY coordinates. I unified the polygons for each species shapefile and then used:  species@polygons[[1]]@Polygons[[1]]@cords   to get the coordinates for my species polygons as a matrix. However, I discovered that:  species@polygons[[1]]@Polygons[[1]]@coords    wasn't actually getting all the coordinates of the polygons only some of them.  I tried using fortify from the ggplot package, and it gives me a dataframe with coordinates but some of them are for holes in the polygons. I ran that with the pnt.in.poly function excluding the holes but it took an hour to run and when I looked at the output maps after it matched for some of the range but not all of it- there were holes in the distribution where there shouldn't be holes.   I also tried this method that I found somewhere else:  lonlat &lt;- lapply(slot(species, "polygons"), function(x) lapply(slot(x,"Polygons"), function(y) slot(y, "coords")))    which gives me a list with 436 items- but I'm still not sure how to get the coordinates into a matrix form that will work in pnt.in.poly.  I'm sure this should be easier to do! Does anyone know a better way? Post apocalyptic journey in search of knowledge from fallen society (ours) I'm racking my memory for a post-apocalyptic novel that I borrowed from a library maybe 15 years ago, but I'm sure it was published a few years before that though (maybe early 90s?).  I remember a party of people travelling across the flooded USA after some kind of apocalypse (climate change/flooding?). Towards the end of the book the group makes their way to New York(?) and finds a partially flooded library, discovering a set of books that gives hope for the return/rebuilding of society. GSC: How to move a site from a domain to sub domain, sub folder or new domain with a sub folder? So I have a torus, and I need it to "telescope" open -- kind of like Pacman's death animation, but with a torus instead of a sphere.  I'm very new to 3D modeling/animating so I really have no clue how to tackle this problem.  Any advice to help me get pointed in the right direction would be most appreciated :) How to monitor bandwidth use of each device on wifi network I am running 14.04 and have a HP Deskjet 2545 wireless printer which is supported by Ubuntu. I have run HpLIP, the latest version and installed the printer.  The printer is recognised by Ubuntu, printer and network, but LibreOffice do not see the printer. Only a Generic printer.  I don't know what to do anymore and would like to get some good advice 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? How to delete contacts from the Windows 8 People app? I never really bothered to keep my Hotmail contact information up to date, so now that I connected it to Windows 8, suddenly I see all this outdated contact information or people I've long stopped talking to.    I don't see any buttons or options where I can click to delete someone.  So how do I clean up my Windows 8 People app and remove these contacts? Boot Camp error "Windows cannot locate the disk and partition" I have a 2019 MacBook Pro 16 inch running on macOS Big Sur 11.1. I am trying to install windows using Bootcamp. I get the following error: Windows cannot locate the disk and partition specified in the unattended answer file's  setting. Make sure the setting references a valid partition and restart the installation. Can someone help me how to solve this? Thanks in advance How do I find out which DOM element has the focus? Applications Don't Show Up in Spotlight Spotlight has stopped showing any results for my Applications. I've tried reindexing and removing the index so it rebuilds it. No change. I've tried adding Applications to the Privacy tab and removing it, no change.  I tried repairing disk permissions and redoing the above, no change. I've tried removing everything from the index except Applications and then I just get nothing for any search at all (except dictionary entries).  I tried adding a symlink in my homedir to Applications and reindexing, but no change.  Any ideas on what to do?  I'm running Snow Leopard.  This is driving me crazy!  Update: I've noticed that when I start a reindex with sudo mdutil -E / and then immediately do a Spotlight search for an app that the app shows up temporarily until Spotlight gets disabled due to active indexing.  After the indexing is done, the app entries go away. Filtered Questions Asked By Accepted Answer/ No Accepted Answer I think it's helpful if we can go to a page and view all our own questions that   Does not have an accepted answer, and/or Does not have an answer yet.   The reason I asked for them is because, I sometimes need to review through all the questions, and pick those that don't have proper answers so that I can perform further operations on them ( such as offering a bounty, or accept an existing answer). Can it be assumed a evaluation order of the function parameters when calling it in C ? According to the following program, it seems that there is not a particular order when I executed it.   #include &lt;stdio.h&gt;  int main() {    int a[] = {1, 2, 3};    int * pa;      pa = &amp;a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa), *(pa++),*(++pa));    /* Result: a[0] = 3  a[1] = 2    a[2] = 2 */     pa = &amp;a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa++),*(pa),*(++pa));    /* Result: a[0] = 2  a[1] = 2     a[2] = 2 */     pa = &amp;a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa++),*(++pa), *(pa));    /* a[0] = 2  a[1] = 2 a[2] = 1 */  } The ability to undo reviews What really allows airplanes to fly? What aerodynamic effects actually contribute to producing the lift on an airplane?  I know there's a common belief that lift comes from the Bernoulli effect, where air moving over the wings is at reduced pressure because it's forced to travel further than air flowing under the wings. But I also know that this is wrong, or at best a minor contribution to the actual lift. The thing is, none of the many sources I've seen that discredit the Bernoulli effect explain what's actually going on, so I'm left wondering. Why do airplanes actually fly? Is this something that can be explained or summarized at a level appropriate for someone who isn't trained in fluid dynamics?  (Links to further reading for more detail would also be much appreciated) What is the meaning of p values and t values in statistical tests? How can I assign a Func conditionally between lambdas using the conditional ternary operator? Generally, when using the conditional operator, here's the syntax:  int x = 6; int y = x == 6 ? 5 : 9;   Nothing fancy, pretty straight forward.  Now, let's try to use this when assigning a Lambda to a Func type. Let me explain:  Func&lt;Order, bool&gt; predicate = id == null     ? p =&gt; p.EmployeeID == null     : p =&gt; p.EmployeeID == id;   That's the same syntax, and should work? Right? For some reason that doesn't. The compiler gives this nice cryptic message:     Error  1   Type of conditional expression cannot be determined because there is no implicit conversion between 'lambda expression' and 'lambda expression'   I then went ahead and changed the syntax and this way it did work:  Func&lt;Order, bool&gt; predicate = id == null     ? predicate = p =&gt; p.EmployeeID == null     : predicate = p =&gt; p.EmployeeID == id;   I'm just curious as to why it doesn't work the first way?  (Side note: I ended up not needing this code, as I found out that when comparing an int value against null, you just use object.Equals) Seems like a bug:  The user:   Edits a question Then, he decide to close it. Clicks on the Close button. The popup doesn't appear. Refreshes the page. Click on the close button. The popup appears.   After editing in the link appears a hash: #. But I don't think that this is the problem because if I add the hash without editing the close popup appears.  It's minor, but I think that is good to be reported and solved.  Edit: The close popup doesn't open after we click an edit has been made to this post; click to load. I would like to try a different video display driver, but I'm not sure which one I'm currently using.    What's the simple way to see what driver my system is using currently?