Expected value of a non-negative random variable
Explain why $E(X) = \int_0^\infty (1-F_X (t)) \, dt$ for every nonnegative random variable $X$
How to calculate hash value of a file in Java? What are all possible ways to stop a zombie from despawning? Is there any way for which we are able to stop a zombie from de-spawning no matter how far we go? If so, what are all possible ways?  Bonus question: what are all the other techniques for which we can prevent a zombie from de-spawning within a specific block radius? "Looking forward to hearing from you" - May I omit "I am" at the beginning? At the end of a letter, is it correct to omit "I am" in this sentence?     I am looking forward to hearing from you   Then it will become:     Looking forward to hearing from you Some time ago, when I installed Ubuntu, I chose a rather stupid username for my account that I do not want to use anymore. How do I change this (including the name of my home directory, and the name in the terminal) without losing settings for applications? How do I keep permissions and my keys for various authentification (e.g. email, SSH, GPG and more)? What settings could possibly get lost if I changed my username? Why is shape with shrinkwrap modifier flat? A classic exponential inequality: $x^y+y^x>1$ One of the joys of high-school mathematics is summing a complicated series to get a “closed-form” expression. And of course many of us have tried summing the harmonic series $H_n =\sum \limits_{k \leq n} \frac{1}{k}$, and failed. But should we necessarily fail?      More precisely, is it known that $H_n$ cannot be written in terms of the elementary functions, say, the rational functions, $\exp(x)$ and $\ln x$? If so, how is such a theorem proved?    Note. When I started writing the question, I was going to ask if it is known that the harmonic function cannot be represented simply as a rational function? But this is easy to see, since $H_n$ grows like $\ln n+O(1)$, whereas no rational function grows logarithmically.  Added note: This  asks a similar question for “elementary integration”. I guess I am asking if there is an analogous theory of “elementary summation”. How do I kill entities at y=65? Potions can survive at y=65  One potion was thrown into the void, but instead of being killed, it just lingered there.  Any ideas to kill it? I can't just run /kill @e[type=!player,tag=test1]  (yes, the tag of the entity is indeed test1 ) Update Manager asking me to update kernel but apt-get upgrade does not? I have a question that bothers me after reading a part of the big book of rules :).  It's about the rule 717, illegal actions.     717.1. If a player realizes that he or she can’t legally take an action after starting to do so, the entire action is reversed and any payments already made are canceled. No abilities trigger and no effects apply as a result of an undone action. If the action was casting a spell, the spell returns to the zone it came from. The player may also reverse any legal mana abilities activated while making the illegal play, unless mana from them or from any triggered mana abilities they triggered was spent on another mana ability that wasn’t reversed. Players may not reverse actions that moved cards to a library, moved cards from a library to any zone other than the stack, or caused a library to be shuffled.   For example, player A plays a .     As an additional cost to cast Goblin Grenade, sacrifice a Goblin.   Goblin Grenade deals 5 damage to target creature or player.   It goes on the stack. Player B gains priority and casts a  on the only goblin of Player A.     Destroy target nonartifact, nonblack creature. It can't be regenerated.   The terror goes on the stack. Then both players agree to resolve the stack. The terror kills the last goblin standing and then the Goblin Grenade can't be cast because of the additional cost which can't be paid. So in my opinion that leaves two possibilities:   The Goblin Grenade returns to the zone it was previously from (the hand of Player A) The Goblin Grenade becomes illegal and gets countered, so it goes to the graveyard   Based on rule 717 I think it goes back to the hand but I'm not quite sure. :) How to make a file (e.g. a .sh script) executable, so it can be run from a terminal How does Java's PreparedStatement work? "Stay home" or "stay at home" – which is correct and why? Compare two files with first column and remove duplicate row from 2nd file in shell script I will ask my question with an example. I have 2 files:  File #1:  118D FC300_R5_TP  FX.B      32775       2112   6       2038   6       2112   0 118E FC300_R5_TP  FX.B      32775       2136   7       2065   6       2136   0 118F FC300_R5_TP  FX.B      32775       2124   6       2064   6       2124   0 1190 FC300_R5_TP  FX.B     819210     814632  99     814609  99     814632   0 1191 FC300_R5_TP  FX.B     819210     104100  13     103714  13     104100   0 1192 FC300_R5_TP  FX.B    1638420    1609476  98    1609402  98    1609476   0 1196 FC300_R5_TP  FX.B    1638420    1638432 100    1638379 100    1638432   0 119A FC300_R5_TP  FX.B    3276840    3271776 100    3271698 100    3271776   0 119E FC300_R5_TP  FX.B    3276840    3264120 100    3264034 100    3264120   0 11A2 FC300_R5_TP  FX.B    3276840    2328648  71    2328546  71    2328648   0 11A6 FC300_R5_TP  FX.B    3276840    2328444  71    2328355  71    2328444   0 11AA FC300_R5_TP  FX.B    3276840    2328528  71    2328403  71    2328528   0 11AE FC300_R5_TP  FX.B    3276840    2328648  71    2328468  71    2328648   0 11B2 FC300_R5_TP  FX.B    3276840    2130000  65    2129766  65    2130000   0 173A FC300_R5_TP  FX.B    6553680    6478572  99    6477747  99    6478572   0   File #2:  11AA FC300_R5_TP  FX.B    3276840    2328528  71    2328403  71    2328528   0 11AE FC300_R5_TP  FX.B    3276840    2328648  71    2328468  71    2328648   0 11B2 FC300_R5_TP  FX.B    3276840    2130000  65    2129766  65    2130000   0 173A FC300_R5_TP  FX.B    6553680    6478572  99    6477747  99    6478572   0 0BDB FC600_R5_TP  FX.B   33554640    6044364  18    6033105  18    6044364   0 0BDC FC600_R5_TP  FX.B   33554640    6613536  20    6481974  19    6613536   0 0BDD FC600_R5_TP  FX.B   33554640    4435848  13    4057170  12    4435848   0 0BDE FC600_R5_TP  FX.B   33554640    6620868  20    6249518  19    6620868   0   Desired Output  File #3:  0BDB FC600_R5_TP  FX.B   33554640    6044364  18    6033105  18    6044364   0 0BDC FC600_R5_TP  FX.B   33554640    6613536  20    6481974  19    6613536   0 0BDD FC600_R5_TP  FX.B   33554640    4435848  13    4057170  12    4435848   0 0BDE FC600_R5_TP  FX.B   33554640    6620868  20    6249518  19    6620868   0   I'd like to compare file 1 and file 2 using their first columns and remove the entire line or row from file 2 where they match in file 1. I'd also like to save the results to a 3rd file, file #3. The most common way to refer to non-immediate family? I am not very well versed on set theory or syntax, but I thought I knew the basics.  However, in a book about databases I am reading now, the author uses $2^x$ to signify "a set of $x$."  For example, $2^{\text{dogs}}$ is a set of $\text {dogs}$, etc.    The author never really explained this or why he does it, I just picked up the meaning from context.    I am not sure why the exponent operator is used, nor am I sure what the number $2$ has to do with it.  The sets being represented are NOT powers of $2$ (in size)... they come in all sizes.  Is this a valid notation?  I have not seen it anywhere before... How to replace plain URLs with links? Lightning component quick action - send parameters to the lightning component I have a lightning component that is available for use as lightning component quick action. I need to use this component from various object actions, for example, I will add a lightning component quick action to account object and to contact object. Now on the lightning component itself, I want to know if it was invoked from the account object or from the contact object, but I cannot find a way to do that. I have found a way to get the record Id by adding &lt;aura:attribute name=&quot;recordId&quot; type=&quot;String&quot; /&gt; (see code snippet below) It is working but not good enough. What I really need is to send a parameter from the lightning component quick action invocation:  And get it in my component: &lt;aura:component implements=&quot;force:lightningQuickAction,force:hasRecordId,flexipage:availableForAllPageTypes&quot;&gt;     &lt;aura:attribute name=&quot;recordId&quot; type=&quot;String&quot; /&gt;     &lt;aura:attribute name=&quot;param&quot; type=&quot;String&quot;/&gt; &lt;/aura:component&gt;  Is this possible? And if not - any workaround for achieving that? How can we recover the Newtonian gravitational potential from the metric of general relativity? $\sum \cos$ when angles are in arithmetic progression Possible Duplicate:          Prove $$\cos(\alpha) + \cos(\alpha + \beta) + \cos(\alpha + 2\beta) + \dots + \cos[\alpha + (n-1)\beta] = \frac{\cos(\alpha + \frac{n-1}{2}\beta) \cdot \sin\frac{n\beta}{2}}{\sin\frac{\beta}{2}} $$