I have a raster which I want to cut. A second raster smaller, should be exactly the part where I want to cut the first layer (so I cut the same size as raster 2).  The idea is that raster 2 become the mask for the cut. How can I do this?
Given two input layers  The clip layer - an arbitrary layer (though in my case it's a float 1 band geotiff) The mask layer - a paletted raster in which every pixel is either NO DATA or a single &quot;color&quot; value, same for every pixel.  I want to create an output raster whose overall extent matches the extent of the mask layer and each pixel is either NO DATA if the corresponding pixel of the mask layer is NO DATA or the value of the corresponding pixel from the clip layer if the corresponding pixel of the mask layer is not NO DATA. I know I can mask the clip layer with a polygon, but the mask layer is a raster. Polygonizing the raster layer is possible in principle, but would result in a polygon with a lot of very short edges. Is there a direct way to do this in QGIS? I suppose there's probably a path that involves creating a new layer and using the raster calculator, but I'm hoping there's something more direct. Further complicating the matter is that the two rasters might not have the same resolution and origin. I believe this is equivalent to  in ArcMap.
I am trying to get an Epson WF-2760 scanner that is network-connected working. I'm using Ubuntu 16.04.2 64-bit and the printer works a treat. I have installed the Epson drivers from their site, including the plugins. I have edited /etc/sane.d/dll.conf to enable epson, epson2, and epsonds. I have edited each of the respective .conf files to include the network address of the device (IPV4: 192.168.128.11).   The scanner is not detected in any software that I have tried (including Image Scan and Simple Scan).  Any help is appreciated! Why does Super User site appear twice in vote-to-close dialog? Super User appears in both the main Off-Topic list and the Migration list of the close dialog. Is this a bug or intentional?  I also don't really understand why Server Fault appears in the main Off-Topic list and not the Migration list, apart from it being new.  Here:    and: Rounding integers to nearest multiple of 10 How to find the most famous questions on Stack Overflow? How to find questions with   most comments most votes most viewed   I have seen following question, but seems like there is no easy way.   Is there way to bookmark a page so that the same URL can be used to update data (which will be very seldom) at each hit? Website logo text - best tag for SEO purposes? I'm trying to develop a new website in HTML5 adhering to SEO standards where possible and I'm having a little trouble trying to figure out what tag my site name and slogan should live in.  Originally I had my site name in a &lt;h1&gt; tag and my sloagan in a &lt;h2&gt;, but soon realised this wasn't fitting with the "each page is a separate document/article" approach.  The site name is the largest text on the page (sometimes the same as my article heading), but I've currently got the text in a &lt;p&gt; tag with CSS doing all the styling work.  My questions is, what should I do with the site name and slogan? Is the &lt;h1&gt; appropriate, then use another &lt;h1&gt; tag for each page title or should I continue using the styled &lt;p&gt; tag? Or should I convert this into an image and use that for the site name/slogan?  (Side note: on my index page I want the site name and slogan to be &lt;h1&gt; and &lt;h2&gt;respectively as this makes sense with the homepage...) Can we have some tools to handle link rot? There are many links posted in answers, and some in questions, that are either stale or broken.  An example is the change to  on-line documentation this year to do away with separate 'Optional' and 'Core' tasks areas in the documentation - the old links 404 now.  I've fixed a bunch of 'optionaltasks' broken links, but searching for 'coretasks' in Stack&nbsp;Overflow questions returns over 300 matches...  Are there any tools for us to review and fix these - with an emphasis on the fixing - without sifting through completely manually?  Is it time for some refactoring tools for Stack&nbsp;Overflow content, in particular, for links?  Also, I'd be interested to know if there is an analysis of links (as found in the Stack&nbsp;Overflow data dumps) out there. Answer: there is a  of a sample of links and images, but it's getting a bit out-of-date. Prove that the multiplicative inverse of $a$ modulo $m$ exists if and only if $a$ and $m$ are coprime. Prove that the multiplicative inverse of $a$ modulo $m$ exists if and only if $a$ and $m$ are coprime.  Can someone help me with this? Are confidence intervals open or closed intervals? Proving AM-GM with induction I am trying to prove AM-GM with the following steps:    Prove that AM-GM holds for two variables Prove that if AM-GM holds for $k$ variables then it holds for $2k$ variables Prove that if AM-GM holds for $k$ variables then it holds for $k-1$ variables   If I prove all of these, I will have proved AM-GM. I have proved (1) and (2), but I am still struggling with (3).   Proof for (1)  By the Trivial Inequality, we know that the first statement is true. Therefore \begin{align} (a-b)^2 \ge 0 \implies\\ a^2-2ab+b^2 \ge 0 \implies \\ a^2+2ab+b^2 \ge 4ab  \implies\\ a+b \ge 2\sqrt{ab}  \implies\\ \frac{a+b}{2} \ge \sqrt{ab}\hspace{3mm}\blacksquare\\ \end{align}  Proof for (2)  Let our numbers be $a_1, a_2, a_3, \ldots, a_{2k}$. Denote $$x = \frac{\displaystyle\sum_{i=1}^{k}a_i}{k}, y = \frac{\displaystyle\sum_{i=k+1}^{2k}a_i}{k}$$  We know that by AM-GM for 2 variables, that $$\frac{x+y}{2}\ge \sqrt{xy}$$ By our definition of $x, y$ this means that $$\frac{x+y}{2} = \frac{\frac{\displaystyle\sum_{i=1}^{2k}a_i}{k}}{2}=\frac{a_1+a_2+a_3+\ldots+a_{2k}}{2k}$$ Again by definition, $$\sqrt{xy} = \sqrt{\left(\frac{x_1+x_2+\ldots+x_k}{k}\right)\left(\frac{x_{k+1}+x_{k+2}+\ldots+x_{2k}}{k}\right)}$$ By AM-GM for $k$ variables, $$\sqrt{\left(\frac{x_1+x_2+\ldots+x_k}{k}\right)\left(\frac{x_{k+1}+x_{k+2}+\ldots+x_{2k}}{k}\right)} \ge \sqrt{\sqrt[k]{x_1x_2\ldots x_k}\sqrt[k]{x_{k+1}x_{k+2}\ldots x_{2k}}}$$ This is simply equal to $$\sqrt[2k]{x_1x_2x_3\ldots x_{2k}}\hspace{3mm}\blacksquare$$  However, I have no idea how to proceed on (3). I tried using the definition of AM and GM but did not come up with anything useful. Feel free to point out any errors or flaws on my proofs for (1) and (2). Are $\mathbb{Z_p},\mathbb{Q},\mathbb{R},\mathbb{C}$ above themselves vector space? Is a field above anoother field a vector space?   As for 1. we know that $\Bbb R^n$ is a vector space so in particular it is true for $n=1$  For 2. by definition a vector space is $V$ with addition and multiplication over a field, therefore 2 is true. What is the evidence that dark energy exists? (as of 2020) Astrophysicists believe that dark energy exists and makes up ~70% of the universe's energy content. What is the evidence that dark energy exists? Wikipedia gives :   Supernovae. A specific type of supernovae (type 1A) are supposed to be standard candles - that is, their luminosity is known. In turn this lets us measure distance to faraway galaxies, check how fast those galaxies are receding from us, and check if that recession speed is increasing over time. CMB. Data from the Cosmic Microwave Background indicates the universe is approximately flat. Visible matter + dark matter can account for ~30% of the energy content required to make the universe flat, leaving ~70% for something else - dark energy. BAO. Baryon acoustic oscillations act as a "standard ruler" that lets us measure how the Hubble constant varies with redshift (i.e. time), and see if the recession speed is increasing with time. Late-time ISW. ISW stands for integrated Sachs-Wolfe effect. The idea is that, usually, a photon that enters a potential well gains energy as it falls in and loses energy as it emerges, and gain/loss exactly cancel. If a universe is expanding in accelerated fashion, then this is untrue; the potential wells / hills are smoothed out and there is a permanent shift in the photon's energy and therefore temperature. If we see a correlation between hot and cold spots on the CMB and the locations of superclusters and voids, then it's a sign of accelerated expansion. Galaxy evolution. This uses (known) evolution of early-type galaxies as a standard clock. Once we know how long it takes for a galaxy to evolve from one state to another, as well as their redshifts, we can reconstruct how the Hubble constant varies over time, and see if the recession speed is increasing with time.   Two questions:   Did I understand any of these five methods wrong? Are there any other lines of evidence for the existence of dark energy? Prevent area light from being reflected on glass? I did setup an easy scene with an area light behind a window. In the glass (simple plane) which is in front the area light is visible - how can I turn this off so that the background is shining throgh? Can "cattle" be singular? I've grown up on a farm, and my dad and his dad, apparently, always used "cattle" to refer to both the singular and plural forms of the domestic bovine. I've always assumed it's how the word "deer" is.  However, I've heard people say that this is incorrect and the singular is just "cow", but this has always offended us as a cow is a mother cattle, and is incorrect if you're referring to a steer, a bull, or a heifer.  So, is cattle singular as well as plural? If not, is there some general, non-gender-specific word that should be used instead? Which are the word orders that can be found in English? Besides , which are the  that can be found in English? Are there any that are peculiar to dialects such as Singlish or Indian English? Please provide an example sentence for each order along with pertinent information such as tense, mood, voice, etc. UISearchDisplayController - how to preload searchResultTableView How to build a difference distribution table? "Can/may/will you help me with this?" Which word to use when we ask for help?  Some conditions:     We know that the person asked is able to do it. We don't know if the person asked is able to do it. Will installing Ubuntu using the "erase entire disk" option remove and erase all currently existing partitions? I'm considering ditching Windows 8 and doing a fully clean install of Ubuntu. However, I'm concerned because my computer came with a built-in 16 GB recovery partition that would need to be erased as well.   If I pick the "erase entire disk" option during installation, will it wipe out this recovery partition too? Use of very as an adjective is (in my experience) most frequently attested in phrases like     ...the very person I was looking for.   To use adjective very with the indefinite article sounds quite bizarre in this case:     ?...a very person I was looking for.   But consider this sentence, where indefinite a is used:     Visualizing a very transformation of the master-slave relation, Thomas presses further: the slave is brother to the master, even doubly a brother.   OED treats the two uses as separate senses of the word, with the following definitions:           (first use):&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;With limitation (usually expressed by the or a possessive) to particular instances      (second use): Really or truly entitled to the name or designation   Here are two respective examples quoted in OED:     What would you say to me now, and I were your verie, verie Rosalind? (1616)   Thence we went into Queen Mary's room, and saw that beautiful portrait—that very queen and very woman. (1857)   Clearly, the difference in meaning between the two senses is quite light, and it seems to me like a kind of difference which is recurrent enough to have its own term. What is the proper term? Are there other English words having similarly related pairs of senses? And lastly, is OED jumping the gun in treating these as two senses? Could the difference in meaning instead be due to the choice of determiner? Batch files: How to read a file?