Prove with combinatorial arguments this equation
Alternating sum of binomial coefficients: given $n \in \mathbb N$, prove $\sum^n_{k=0}(-1)^k {n \choose k} = 0$
How to programmatically create a WPF window in a WinForm application R raster: masking a raster by polygon also remove cells partially covered? I want to mask out a raster based on the values of a polygon: i.e., set to NA all values of the raster that are not covered by the polygons. However, it seems that raster::mask() masks out cells (i.e. set them to NA) even if they are partially covered?  This is similar to the question: , but unlike crop(), mask() does not have the snap="out" option.   Check: here the right point of the triangle touches a cell, yet that cells is masked out.   library(raster) library(sp)  r &lt;- raster(xmn=1, xmx=5, ymn=1, ymx=5, nrows=4, ncols=4) r[] &lt;- 1:length(r)  Sr1 = Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2))) Sr2 = Polygon(cbind(c(4.1,4,2),c(2,3,2)))  SpP = SpatialPolygons(list(Polygons(list(Sr1), "s1"), Polygons(list(Sr2), "s2")), 1:2)  plot(mask(r, SpP)) plot(SpP,  add=TRUE) How do you run your own code alongside Tkinter's event loop? My little brother is just getting into programming, and for his Science Fair project, he's doing a simulation of a flock of birds in the sky. He's gotten most of his code written, and it works nicely, but the birds need to move every moment.  Tkinter, however, hogs the time for its own event loop, and so his code won't run. Doing root.mainloop() runs, runs, and keeps running, and the only thing it runs is the event handlers.  Is there a way to have his code run alongside the mainloop (without multithreading, it's confusing and this should be kept simple), and if so, what is it?  Right now, he came up with an ugly hack, tying his move() function to &lt;b1-motion&gt;, so that as long as he holds the button down and wiggles the mouse, it works. But there's got to be a better way. Operator precedence in a find command? See below example:  $ ls -1p appledir/ applefile orangedir/ orangefile $ find . -type f -name apple\* ./applefile $ find . -type f -name orange\* ./orangefile $ find . -type f -name apple\* -o -name orange\* ./applefile ./orangedir ./orangefile $ find . -type f \( -name apple\* -o -name orange\* \) ./applefile ./orangefile $    I was surprised to discover I needed the parentheses for this to work as expected; apparently I haven't internalized the rule of precedence by which find evaluates its arguments.  How can I easily predict when I will and when I will not need to use parentheses to explicitly group find primaries?  Put another way, what are the rules by which I can imagine find inserting parentheses into the commands I give it, which will allow me to accurately predict how it will evaluate ungrouped expressions? How to placate a very angry priest? So whilst going to rescue the Moth Priest 'Dexion Evicus', I think I accidentally might have hit him, not sure how. Anyhow the bearded maniac has taken this as a personal attack and refuses to accept a yield. Because he's so angry with me he'll just not quit, but being a quest NPC he can't die, nor can my companion Mjoll. So aside from the hilarious infinity battle, I thought, fair enough I'll talk to him whilst he's 'downed' and lo, I progressed the quest.  So I go back to the Dawnguard fortress, and he's there in the middle shouting murder and attacking everyone in the fortress! Clearly his rage knows no bounds.    Is there a way to forcibly pacify him without interring him? Or do I need to roll back and do over? Upgraded to 13.10 now clock settings are all disabled and clock does not display I've upgraded to 13.10 and now I don't have the standard menu clock, which I need for work.  I checked and 'indicator-datetime' is installed.  I even uninstalled/reinstalled that applet with no luck.  Also my "clock" settings under System Preferences are all disabled.  I can't change anything.  Does anyone know how I can get the old menu clock back?  Alternatively is there another menu clock app I can download?  Edit 1  Thanks for the responses    I've restarted several times and that didn't fix the issue. I just ran the 13.10 update today.  But I ran it again a few minutes ago.  I got   about 200KB in random updates.  The issue is still present after a reboot. # apt-cache policy indicator-datetime indicator-datetime: Installed: 13.10.0+13.10.20131016.2-0ubuntu1 Candidate: 13.10.0+13.10.20131016.2-0ubuntu1 Version table: *** 13.10.0+13.10.20131016.2-0ubuntu1 0     500 http://us.archive.ubuntu.com/ubuntu/ saucy/main amd64 Packages     100 /var/lib/dpkg/status   Edit 2  I believe the issue is related to 'rarings' changing the systray somehow...   Or , although I haven't got that solution to work yet.  Edit 3  Because of a suggestion from RolandiXor I've check the binaries.  My system is missing 'libical.so.0' but it has 'libical.so.1'.    ldd /usr/lib/x86_64-linux-gnu/indicator-datetime-service libical.so.0 =&gt; not found   Does anyone know how to get the libical.so.0 binary that the datetime service needs but doesn't install? Exclude folder using `find` command I'm using the find command on a Mac to search for a folder called test1. Now test1 folder could be present in the .Trash folder also. How do I exclude the .Trash folder from getting reported in search results or basically any folder I wish to exclude?  $ find $HOME  -name test1 -type d /Users/theuser/.Trash/test1 /Users/theuser/test1  /Users/theuser/Downloads/test1    I want the result to be just  /Users/theuser/test1 /Users/theuser/Downloads/test1    I used grep:  find $HOME  -name test1 -type d | grep -v '.Trash'    to filter out the .Trash result, but I'm interested in knowing if using find alone achieves the same results. How to run Windows 10 from an external hard drive? I am currently able to boot from an external drive or multiboot USB. Taking this concept one step further, I have 3 questions:   1) Is it possible to install and run Windows 10 on a portable external hard drive or USB card with the same functionality of being installed on the internal drive?   2) Is it considered legal to do so or will it affect Windows updates in any way?   3) What are the steps to do that? (please outline steps I can follow so I don't lose a drive in the process). :)  EDIT: My question deals specifically with Windows 10, the legality and method of making it a standalone OS running from an external device and what effect if any it has on Windows Update; questions not dealt with in the other question. Frattini subgroup $Φ ( G )$ is not trivial Frattini subgroup $Φ ( G )$ of a group G is the intersection of all maximal subgroups of $G$. The question is  Let $G$ be an abelian group.What is the sufficient and necessary condition of $Φ ( G ) ≠｛e｝$？  I think if $G$ has no torsion part, we cannot say $Φ ( G ) ≠｛e｝$,because $\Bbb Z ×\Bbb Z×・・・ ×\Bbb Z$ has a maximal subgroup $p\Bbb Z ×\Bbb Z×・・・×\Bbb Z$, with intersectioning distinct primes, we gain just a trivial group. So, we need torsion part. But I cannot proceed from here.I only know the answer, $G$ has an element of order $p^2$, that  is, $G$ has theree subgroups. I want to deduce this consequence from steady discussion. P.S  According to this answer, in a ring that is a finite direct product of quotient rings of $\mathbf{Z}$, we can say rattini subgroup is the same as the Jacobson radical of the corresponding ring. Converting numpy dtypes to native python types How to delete a non-empty directory in Terminal? How do I delete the following directory?  I typed:  rmdir lampp   This error comes up:  rmdir: failed to remove `lampp': Directory not empty   Is there a command to delete all the files in the directory and delete the directory folder? I can’t get used to the new Unity system. I’d like to move the left Unity panel to the bottom of screen (like Windows 7 – more similar is better).  But I can't find a way. Is it possible? Comment deletion notification I think you should be notified if anything of yours is deleted or even flagged, preferably with some explanation (even if it's a simple categorisation like #rude, #irrelevant, #incorrect) and who did it.  Recently, a couple of comments of mine vanished without warning or evidence afterwards. I'm fine with deletion, but I think it should be used sparingly and be based on democratic decisions. What's the harm of letting a comment simply sit with no up-votes or responses rather than outright removal? Or allow downvoting and then negatively voted comments are hidden by default?  I get the impression that anything I post could be deleted. Very few people want to be unpopular or do the wrong thing. It takes time to understand what something is about and how best to use it (this site). Whether or not what I posted deserved to be deleted is irrelevant because I got no feedback. No-one can learn without feedback. The number of frivolous comments with many upvotes I've seen shows how inconsistently the rules are applied. A community that gives too much power to highly rated users won't grow but turn stagnant.  Sorry if this was rude, inappropriate or pathetic. I'm aware that similar discussions have occurred. In any case, I'll continue to use the site and move on... A question on limsup When I was in the university (in the late 90s, circa 1995) I was told there had been research investigating the $2$ (the square of distance) in the Newton's law of universal gravitation.  $$F=G\frac{m_1m_2}{r^2}.$$  Maybe a model like   $$F=G\frac{m_1m_2}{r^a}$$  with $a$ slightly different from $2$, let say $1.999$ or $2.001$, fits some experimental data better?  Is that really true? Or did I misunderstand something? Adding materials to more than one object Macroscopic quantum phenomena and tunneling Is this series known to converge, and if so, what does it converge to (if known)?  Where $p_n$ is prime number $n$, and $p_1 = 2$,  $$\sum\limits_{n=1}^\infty \frac{1}{p_n}$$ Can you set a border opacity in CSS? Input string was not in a correct format