Elegant way of obtaining the envelope of oscillating function
Mathematica envelope for the bottom of a plot, a generic function
Is there a reasonable statistic test one can do to standard random number generators (say, one of those that come built in in Python libs) which shows they are not really random?  (By reasonable I mean to exclude silly things like «generate a looong list and see that it is periodic»)  Later: Notice I am looking for a test that fails on standard generators. Dual VGA Cards Intel/ Nvidia This is my first post in this forum. I am new to Linux, just installed Ubuntu 11.10 on my Sony Vaio VGN-Z12 with two graphic cards Intel and NVidia Geforce 9300 GS.  After the installation the lightdm works on Intel card but with very law display quality. I installed Nvidia driver from the official website as well as this PPA.  sudo apt-add-repository ppa:ubuntu-x-swat/x-updates sudo apt-get update sudo apt-get install nvidia-current       Once I installed the driver and run nvidia-xconfig which creates xorg.conf file, the xserver will not start with error "no screen". If I delete the xorg.conf file then I am able to start the xserver normally but with intel display (bad quality) Is there an Extended Backus–Naur form (EBNF) that covers all of English? What is the correct way to create a single-instance WPF application? Using C# and WPF under .NET (rather than  or console), what is the correct way to create an application that can only be run as a single instance?  I know it has something to do with some mythical thing called a mutex, rarely can I find someone that bothers to stop and explain what one of these are.  The code needs to also inform the already-running instance that the user tried to start a second one, and maybe also pass any command-line arguments if any existed. Battery mAh meaning What exactly does mAh rating means? I know that it means the milliamperes supplied by the battery in one hour but i need a more conceptual and practical definition/example.   How does mAh rating tell the current supplied to the load? How does it vary with the load specification.   Also, suppose a mobile phone's battery has 3000mAh, if i supply it with 1000mA, then does it mean that the battery will be fully charged in 3 hours?   And will a 3000 mAh battery deliver a current of 3000mA for 1 hour to a load? Will this rating degrade in a practical scenario. Please explain. future or present with when 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? I am in 1.13 Pre-Release 7 trying to make a one command creation and I need an item with a specific name. The command I use is /give @p diamond_sword{display:{Name:"Sword of Power"}} and it gives my a diamond sword, but it doesn't have the name.   This is me running the command.   This is the command not working. Glucagon stimulates glycogenolysis and gluconeogenesis, thus increasing the plasma glucose concentration — so that tissues get enough glucose in the fasting state. However glucagon also inhibits glycolysis. In this case, what is the point of having high blood glucose if it cannot be catabolized? How can an encryption scheme be indistinguishable with multiple messages but vulnerable to an adaptive chosen-plaintext attack? In order to be indistinguishable with respect to multiple messages, wouldn't the scheme need to be nondeterministic? How would this then possibly be vulnerable to an adaptive CPA? For example, here are top five accounts in each site (this picture was taken when I was in Biology SE).    As you can see, all the badges are DNA, while Academia's badges should be hats, so on.  What do you think? Origin —  Elementary Number Theory — Jones — p35 — Exercise 2.17 — For which primes $p$ is $p^2 + 2$ also prime? Only for $p = 3$. If $p \neq 3$ then $p = 3q ± 1$ for some integer $q$, so $p^2 + 2 = 9q^2 ± 6q + 3$ is divisible by $3$, and is therefore composite. (1) The key here looks like writing $p = 3q ± 1$. Where does this hail from? I know $3q - 1, 3q, 3q + 1$ are consecutive. $p$ is prime therefore $p \neq 3q$? (2) How can you prefigure $p = 3$ is the only solution? Does $p^2 + 2$ expose this? On an exam, I can't calculate $p^2 + 2$ for many primes $p$ with a computer — or make random conjectures. I am not sure if  works. Can someone please help me? My phone is new and in its warranty period so I can't root it yet. I tried this app but I am not sure if it actually did something. Unlike the other famous app on the PlayStore for fstrim, it doesn't require root access which is quite incredible. Bind a key for multiple units to use the same spell Is there a way for me to bind a key that will allow multiple units in my control group to all use the same spell at once?  For example, if I have 3 centaurs as chen, and I have them all selected. Can I press one key to make them all warstomp at the same time?   Or if I have 3 familiars as Visage. When I have all three selected, is there a button I can press to have them all stun at the same time? Can matter really fall through an event horizon? Prove that two distinct numbers of the form $a^{2^{n}} + 1$ and $a^{2^{m}} + 1$ are relatively prime if $a$ is even and have $\gcd=2$ if $a$ is odd.   My attempt: If $a$ is even, let $a = 2^{s}k$ for some integers $k, s$ Then, $$a^{2^{n}} + 1 = 2^{2^{n}s}\cdot k^{2^n} + 1$$ and $$a^{2^{m}}  + 1 = 2^{2^{m}s}\cdot k^{2^m} + 1$$ To prove that they're relatively prime, we need to show that their gcd = 1. And I was stuck here, how could I prove that gcd of two numbers is $1$?     A hint would be sufficient. Thanks. Creating Inky-looking characters in Blender I upgraded my Nexus 4 to Lollipop a few days ago but I don't like it. I'll leave out my reasons because they're not relevant here. I wiped my phone and installed a clean stock 4.2.2 version instead. I'm happy with this.  Not long after, Android automatically downloaded the 4.3 upgrade and notifies me with the choices "Later" and "Install". I don't want to do this upgrade.  How do I:   get rid of the notification, and  remove the downloaded update (to free up precious storage space).     I have already tried choosing "Later" but the same notification immediately reappears.    Based on Google search results, I also tried going to Settings &gt; Apps &gt; All &gt; Google Services Framework and unticked "show notifications" but it still appears. Force stop or disable also doesn't seem to help, so I've re-enabled the service including notifications. I didn't see any other apps in this list that sounded relevant - did I just not see it? How to show that when the linear transformation $\Phi =\psi \circ \phi : E \rightarrow G$ is injective, then $\phi$ is also injective? How to show that when the linear transformation $\Phi =\psi \circ \phi : E \rightarrow G$  (where $\phi : E \rightarrow F$ and $\psi : F \rightarrow G$) is (1) injective, then $\phi$ is injective and when (2) $\Phi$ is surjective, then $\psi$ is also surjective ?  I've tried to prove it by the definition of injection and surjection, but I'm not convinced myself by it.  For example, in the first case :  If $\Phi$ is injective, $\forall g \in G$, we have $0$ or $1$ $e \in E$ such as $\Phi(e)=g$.  $\Rightarrow \Phi(e) = \psi(\phi(e)) = \psi(f) =g$.   So $\forall f \in F$, we also have $0$ or $1$ $e \in E$ such as $\phi(e)=f \in F$.   $\Rightarrow \phi$ is injective.  Is this right or did I prove nothing at all ? I think it is easier to convince myself/ to understand with surjectivity but still.. How should I install HPLIP binary/proprietary plugin/driver for my HP printer or printer+scanner?