My question is the same as  but I'm working with ArcGIS and not QGIS.  I have a raster data set with values of type float.       And a polygon shapefile        I want to calculate mean of all raster cell values that are completely within the shapefile  In order to do so, I have used Extract by mask tool and now I have the following raster with NULL values for cells that are outside the polygon layer.        But there are 3 problems:     All parts of each masked pixel is not within the shapefile.       I want to mask just the pixels that are completely within polygon shapefile.     I don't know how to sum up all cell values in a masked raster?   I don't know how to count the number of such cells and calculate the mean?
I have Raster data for a country which has Evaporation Data in its pixels. I also have Vector layer which has the 30 cities of the country.   What I need is the average Evaporation value of each city from the raster data using ArcGIS?  I have access to the spatial analyst extension.
Return FileName Only when using OpenFileDialog Front suspension or full suspension mountain bike Are these intended activities legal to do in the USA under the VWP? What is the best way to convert seconds into (Hour:Minutes:Seconds:Milliseconds) time? Earlier today, I was talking with my friend about some "cool" infinite series and the value they converge to like the Basel problem, Madhava-Leibniz formula for $\pi/4, \log 2$ and similar alternating series etc.  One series that popped into our discussion was $\sum\limits_{n=1}^{\infty} \frac{1}{n^n}$.  Proving the convergence of this series is trivial but finding the value to which converges has defied me so far. Mathematica says this series converges to $\approx 1.29129$.  I tried Googling about this series and found very little information about this series (which is actually surprising since the series looks cool enough to arise in some context).  We were joking that it should have something to do with $\pi,e,\phi,\gamma$ or at the least it must be a transcendental number :-).  My questions are:   What does this series converge to? Does this series arise in any context and are there interesting trivia to be known about this series?   I am actually slightly puzzled that I have not been able to find much about this series on the Internet. (At least my Google search did not yield any interesting results). What happens when a creature with "Whenever a creature dies" dies simultaneously with multiple other creatures? has the following ability:     Whenever a creature you control with a +1/+1 counter on it dies, return that card to the battlefield under your control at the beginning of the next end step.   I had a number of creatures on the battlefield, including Marchesa herself, with one or more +1/+1 counters on them when  was played, destroying each creature on the board.  When Marchesa and several other creatures would be killed simultaneously,   Does Marchesa's ability trigger for herself? Does Marchesa's ability trigger for the other creatures under my control with +1/+1 counters?   In attempting to resolve the issue, we tried to look things up, leading to , which cites Rule 603.6d as proving that Marchesa's ability should trigger both for herself and for each other creature with +1/+1 counters.  Unfortunately, none of us could actually understand Rule 603.6d, aside from this example:     Two creatures are on the battlefield along with an artifact that has the ability Whenever a creature dies, you gain 1 life. Someone plays a spell that destroys all artifacts, creatures, and enchantments. The artifacts ability triggers twice, even though the artifact goes to its owners graveyard at the same time as the creatures.   The example certainly seems analogous to me, but without understanding the actual rule, rather than just the example, we weren't too sure.  A complete answer has to not only answer the question, but back up that answer with citation and explanation of the official rules on the matter. A 398MB directory was only compressed to 393MB using 7Z and Normal ZIP compression. Is this normal? If so, why do people continue to use ZIP on Windows? What happened to Startups SE? I really enjoyed that site. I've only posted on it once, but I enjoyed seeing other people's posts and appreciated reading about entrepreneurial dilemmas. Who's the random kid standing in the gathering at the end? I downvoted  and now really can't say why, so I wanted to remove my downvote. However, I get the message:  You last voted on this question yesterday Your vote is now locked in unless this question is edited  Why is this? I don't think I voted on it multiple times, and even when I did, I can change my mind, can't I? I am new to Ubuntu. I am Using Ubuntu 18.04 along with Windows10. I have gone through the below Q&amp;A and could able to change the name of Ubuntu,      But   if i edit the Ubuntu OS name to my choice, it is then adding "GNU/Linux" at the end. for ex. if i want "Ubuntu 18.04" it is then showing as "Ubuntu 18.04 GNU/Linux". how to avoid this text "GNU/Linux" how to edit the name to my choice which is shown as "Windows Boot Manager (on /dev/sda1)"        Update: I Confirm about the text "GNU/Linux" is solved by @Terrance comments. I still need to try about windows entry.      Final Update: Solved.    I thank @Terrance, @Oldfred, @WinEunuuchs2Unix. All the three methods are working great. i felt the small script is awesome and very very easy to use. which is written by WinEuuuchs2Unix. A term for words that change pronunciation with part of speech I'm talking about words like:   construct: CON-struct(n.), cun-STRUCT(v.) present: PRE-sent(n.), pre-SENT(v.) record: RE-cord(n.), ri-CORD(v.)   They are pronounced differently based on whether they are a noun or a verb.  Here are the terms I DON'T think would apply:   Homograph: same spelling, different meanings: for example, bark (the sound of a dog) and bark (the skin of a tree). Homophone: same pronunciation, different meaning: for example, to and two Homonym: same pronunciation and spelling, different meanings: for example: bank (river bank or savings bank) Heteronym: same spelling,  different pronunciations and meanings: for example bow (the front of a ship) and bow (a ranged weapon)   Bow is particularly interesting. It is a heteronym based on the two nouns I described. But in the sense of the body movement, the noun and the verb are pronounced alike (rhyming with wow), thus, not belonging to the category I've explained.  In fact none of the terms explained  satisfy my requirement.  I'm looking for the term for words that have same (or related at best, NOT different) meanings, same spelling and different pronunciation.  Specifically, different pronunciation depending on the part of speech. As against the words which have the same pronunciation in different parts of speech like bill, turn, case (or bigger ones like manoeuvre)  TL;DR:  Fill in the blank:     The noun and verb forms of construct are pronounced differently   because the word construct is a _____   or      The noun and verb forms of construct are pronounced differently   because they are _____s. I can join the server and sometimes the map would load for the server but i would just fall through the map and it would dissconect me and say timed out, any solutions? Series with denominator that is square of product of consecutive numbers Evaluate $\sum_{k=1}^{\infty} \frac{1}{k^2(k+1)^2}$.   I've tried to use a telescoping approach, but it doesn't seem to work. It doesn't also seem to converge to a "pretty" value as well. How do I redirect to another webpage? Is there a simple way to flatten a list of iterables with a list comprehension, or failing that, what would you all consider to be the best way to flatten a shallow list like this, balancing performance and readability?  I tried to flatten such a list with a nested list comprehension, like this:  [image for image in menuitem for menuitem in list_of_menuitems]   But I get in trouble of the NameError variety there, because the name 'menuitem' is not defined.  After googling and looking around on Stack Overflow, I got the desired results with a reduce statement:  reduce(list.__add__, map(lambda x: list(x), list_of_menuitems))   But this method is fairly unreadable because I need that list(x) call there because x is a Django QuerySet object.  Conclusion:   Thanks to everyone who contributed to this question.  Here is a summary of what I learned.  I'm also making this a community wiki in case others want to add to or correct these observations.  My original reduce statement is redundant and is better written this way:  &gt;&gt;&gt; reduce(list.__add__, (list(mi) for mi in list_of_menuitems))   This is the correct syntax for a nested list comprehension (Brilliant summary !):  &gt;&gt;&gt; [image for mi in list_of_menuitems for image in mi]   But neither of these methods are as efficient as using itertools.chain:  &gt;&gt;&gt; from itertools import chain &gt;&gt;&gt; list(chain(*list_of_menuitems))   And as @cdleary notes, it's probably better style to avoid * operator magic by using chain.from_iterable like so:  &gt;&gt;&gt; chain = itertools.chain.from_iterable([[1,2],[3],[5,89],[],[6]]) &gt;&gt;&gt; print(list(chain)) &gt;&gt;&gt; [1, 2, 3, 5, 89, 6] How to calculate number of days between two given dates? What is the use case for a Fragment with no UI? Some websites have code to "break out" of IFRAME enclosures, meaning that if a page A is loaded as an IFRAME inside an parent page P some Javascript in A redirects the outer window to A.  Typically this Javascript looks something like this:  &lt;script type="text/javascript"&gt;   if (top.location.href != self.location.href)      top.location.href = self.location.href; &lt;/script&gt;   My question is: As the author of the parent page P and not being the author of the inner page A, how can I prevent A from doing this break-out?  P.S. It seems to me like it ought to be a cross-site security violation, but it isn't. I just updated my Moto X to latest and greatest Android 4.4 KitKat (I even did full factory reset just to be sure) and now I'm trying to install  but unable to do so, I'm getting following error:     Unknown error code during application install "-24"   Please advise.