Mutually exclusive dices?
Probability of rolling 3 mutually exclusive dice
Let $l \in\mathbb{R} $ and $ f:(0,\infty) \to \Bbb R $ be a function such that $ \lim_{x\to \infty} xf(x)=l $ .  Prove that  $ \lim_{x\to \infty} f(x)=0 $.  Any help would be appreciated - I found this difficult to prove I wanted to know how I could configure multi-touch gestures in Ubuntu. In windows I can do this using the synaptics driver software.  I have already used synclient to configure the taps, palmdetect, scroll, etc. But I'd also want gesture support. Is is even possible?  System-Info: Ubuntu 12.10, Synaptics clickpad trim is not part of the standard c/c++ library? Is it me or are there no standard trim functions in the c or c++ library? is there any single function that acts as a trim? If not can anyone tell me Why trim is not part of the standard library? (i know trim is in boost)  My trim code is  std::string trim(const std::string &amp;str) {     size_t s = str.find_first_not_of(" \n\r\t");     size_t e = str.find_last_not_of (" \n\r\t");      if(( string::npos == s) || ( string::npos == e))         return "";     else         return str.substr(s, e-s+1); }   test: cout &lt;&lt; trim("  \n\r\r\n \r\n text here\nwith return   \n\r\r\n \r\n "); -edit- i mostly wanted to know why it wasnt in the standard library, BobbyShaftoe answer is great. Derivative (or differential) of symmetric square root of a matrix Let A be a square, symmetric, positive-definite matrix.  Let S be its symmetric square root found by a singular value decomposition.  Let vech() be the half-vectorization operator.  Is there a convenient expression for the derivative (or differential) of vech(S) with respect to vech(A)?  I know the expression for an inverse, which is sort of like a matrix version of the power rule.  Would this approach work for a symmetric square root as well (i.e., (1/2)S^(-1/2))? Deploying Qt 5 App on Windows Imagine you're teaching a first course on quantum mechanics in which your students are well-versed in classical mechanics, but have never seen any quantum before.  How would you motivate the subject and convince your students that in fact classical mechanics cannot explain the real world and that quantum mechanics, given your knowledge of classical mechanics, is the most obvious alternative to try?  If you sit down and think about it, the idea that the state of a system, instead of being specified by the finitely many particles' position and momentum, is now described by an element of some abstract (rigged) Hilbert space and that the observables correspond to self-adjoint operators on the space of states is not at all obvious.  Why should this be the case, or at least, why might we expect this to be the case?   Then there is the issue of measurement which is even more difficult to motivate.  In the usual formulation of quantum mechanics, we assume that, given a state $|\psi \rangle$ and an observable $A$, the probability of measuring a value between $a$ and $a+da$ is given by $|\langle a|\psi \rangle |^2da$ (and furthermore, if $a$ is not an eigenvalue of $A$, then the probability of measuring a value in this interval is $0$).  How would you convince your students that this had to be the case?  I have thought about this question of motivation for a couple of years now, and so far, the only answers I've come up with are incomplete, not entirely satisfactory, and seem to be much more non-trivial than I feel they should be.  So, what do you guys think?  Can you motivate the usual formulation of quantum mechanics using only classical mechanics and minimal appeal to experimental results?  Note that, at some point, you will have to make reference to experiment.  After all, this is the reason why we needed to develop quantum mechanics.  In principle, we could just say "The Born Rule is true because its experimentally verified.", but I find this particularly unsatisfying.  I think we can do better.  Thus, I would ask that when you do invoke the results of an experiment, you do so to only justify fundamental truths, by which I mean something that can not itself just be explained in terms of more theory.  You might say that my conjecture is that the Born Rule is not a fundamental truth in this sense, but can instead be explained by more fundamental theory, which itself is justified via experiment.  Edit:  To clarify, I will try to make use of a much simpler example.  In an ideal gas, if you fix the volume, then the temperature is proportional to pressure.  So we may ask "Why?".  You could say "Well, because experiment.", or alternatively you could say "It is a trivial corollary of the ideal gas law.".  If you choose the latter, you can then ask why that is true.  Once again, you can just say "Because experiment." or you could try to prove it using more fundamental physical truths (using the kinetic theory of gases, for example).  The objective, then, is to come up with the most fundamental physical truths, prove everything else we know in terms of those, and then verify the fundamental physical truths via experiment.  And in this particular case, the objective is to do this with quantum mechanics. The use of "were- should- had” at the beginning of sentences instead of “if” Conditionals in English are usually formed by using if with normal word order; but for the three past (subjunctive) forms were, should, and had, it is also possible to express the conditional through subject–auxiliary inversion alone, with no if in the conditional clause.  Does forming conditionals in this manner differ semantically from if-conditionals? Is some aspect of the conditional statement or the conditionality emphasised more in one version than in the other? Or are there differences in how and when they are used? Or are they simply completely interchangeable?  For example:     If I were you, I would try it again   Were I you, I would try it again      If I had seen it, I would have told you   Had I seen it, I would have told you      If you should drink, don’t get behind the wheel   Should you drink, don’t get behind the wheel I'm trying to install KDE 5 on my Ubuntu 16.04 system as per the instructions in , but I'm getting the below error message when running sudo apt-get install kubuntu-desktop.  Is there something I can do to resolve this?  Need to get 682 kB/326 MB of archives. After this operation, 1,272 MB of additional disk space will be used. Do you want to continue? [Y/n] y Err:1 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64              gtk2-engines-oxygen amd64 1.4.6-1ubuntu1   Temporary failure resolving 'ir.archive.ubuntu.com' Get:2 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64              libkf5sendlater5 amd64 4:15.12.3-0ubuntu1 [45.2 kB] Get:3 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64              libthreadweaver4 amd64 4:4.14.16-0ubuntu3 [46.6 kB] Get:4 http://ir.archive.ubuntu.com/ubuntu xenial/universe amd64              libfarstream-0.2-5 amd64 0.2.7-0ubuntu1 [192 kB] Fetched 284 kB in 1min 9s (4,093 B/s)         E: Failed to fetch http://ir.archive.ubuntu.com/ubuntu/pool/universe/g/             gtk2-engines-oxygen/gtk2-engines-oxygen_1.4.6-1ubuntu1_amd64.deb               Temporary failure resolving 'ir.archive.ubuntu.com'  E: Unable to fetch some archives, maybe run apt-get update or              try with --fix-missing? Finding probability of other child also being a boy A man visits a couple who have two children.One of them, a boy, comes in to the room. Find the probability p that other is also a boy  a) 1/3 b) 2/3 c) 1/2 d) 3/4  Correct Ans: a) 1/3  However I am getting answer as 1/2.My solution is as follows.  The couple has two children, hence the sample space is as follows.  B- Boy G - Girl  BB BG GG ( BG and GB mean the same thing as Girl,Boy), but it is already known that one is boy.So the sample space reduces to  BB BG  So now p is 1/2  Is there some mistake is my approach ? If $A^2\succ B^2$, then necessarily $A\succ B$ I remember reading somewhere about the following properties of non-negative definite matrix. But I don't know how to prove it now.  Let $A$ and $B$ be two non-negative definite matrices. If $A^2\succ B^2$, then it necessarily follows that $A\succ B$, but $A\succ B$ doesn't necessarily leads to $A^2\succ B^2$.  How can you prove it? Thanks! 'sudo su -' vs 'sudo -i' vs 'sudo /bin/bash' - when does it matter which is used, or does it matter at all? RAII and smart pointers in C++ In practice with C++, what is , what are , how are these implemented in a program and what are the benefits of using RAII with smart pointers? The sequence of triangular numbers is well known. Consider now the triangular numbers modulo some positive natural number $k$. That is, let $T_{n,k}$ be the remainder of dividing $T_n$ by $k$. For the regular sequence of triangular numbers, we can take as convention $T_n = T_{n, \infty}$.  Question: For all values of $k, i &lt; k$, does there exists some $n$ such that $T_{n, k} = i$ "An error occurred when reviewing this item" On approving an edit, I just get this pop up since morning. At first I thought there might be some internet connection issue, but this is now the 3rd to 4th time I got the same error; also, the review is accepted because on refresh I can see my name with approved text beside, but it still throws this error.    I am on a Windows 7 machine, running Firefox 24 (Icognito/Private Mode)    Also, this happens only when edit(1) is written on an question/answer, I don't go to review queue and approve, these reviews were directly loaded from the notification beneath the question/answer.  Martijn Pieters reproduced the problem from the review queue three times; each time the improve option was picked, accepting the suggested edit but editing the post some more. The network console shows that posting to https://stackoverflow.com/review/task-reviewed fails, the server responds with a 404 error:  Request headers: POST /review/task-reviewed HTTP/1.1 Host: stackoverflow.com Connection: keep-alive Content-Length: 137 Accept: application/json, text/javascript, */*; q=0.01 Origin: http://stackoverflow.com X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36 Content-Type: application/x-www-form-urlencoded DNT: 1 Referer: https://stackoverflow.com/review/suggested-edits/3575396 Accept-Encoding: gzip,deflate,sdch Accept-Language: en,en-US;q=0.8,nl;q=0.6,nb;q=0.4,no;q=0.2,de;q=0.2,fr;q=0.2 Cookie: &lt;redacted&gt;  POST data: taskTypeId=1&amp;reviewTaskId=3575396&amp;taskResultTypeId=5&amp;fkey=f8791a329b445b658876f4d3afe7961e&amp;postCommentId=null&amp;taskResultSubtypeFlags=null  Response headers: HTTP/1.1 404 Not Found Cache-Control: private Pragma: no-cache Content-Type: application/json X-Frame-Options: SAMEORIGIN Date: Fri, 13 Dec 2013 12:04:53 GMT Content-Length: 0   On the  itself, no record is made of the accept; instead the suggested edit is recorded as approved by 3 people not including Martijn Pieters. In this case the improve review arrived too late.  In , improve again resulted in the error, but the Community account is shown rejecting the edit. Difference between “with”, “at” and “for” with a business title and a company name The prepositions “with”, “at” and “for” are also used to associate a business title with a company's name. It seems that they are interchangeable, with no (significant) difference in meaning. The following examples taken from The New York Times website seem to confirm that:      Until now, said Justin Nielson, a senior analyst for the media   research firm SNL Kagan, “there really hasn't been any direct   competitor . . .      “The consumer is still deleveraging,” said Jason Goldberg, a senior   analyst with Barclays. “It's not a lack of supply; it's a lack of   demand.”      “There’s the party of fear and the party of despair,” Nikos Xydakis, a   political analyst and an editor at Kathimerini daily, said.   Are they really the same as for meaning? If it isn't so, what is the difference between them? D'Alemberts Principle to solve a Classical Mechanics problem I found this question on this very site and was curious on how to solve it using D'Alembert's Principle  .I already know how to do it by balancing the torque about toppling point so please don't post the latter as an answer . My attempt was to displace the upper sphere by $d\theta$ which gives its virtual displacement as  $rd{\theta}cos(\theta)$j(notice we are only interested in the y component becuz the only component of the applied force which is gravity in this case is the y component in the dot product the other components vanish) similarly the cylinder is also displaced $r'd{\phi}cos(\phi)$ where r' is the distance from the point of toppling of the center of mass. $r'cos(\phi)=H/2=r(1+sin(\theta))$ ,$r'sin(\phi)=R=r(1+cos(\theta))$ and $tan(\phi)=H/2R$ the equation coming from D'Alemberts principle is $mgrcos(\theta)d\theta=Mgr'cos(\phi)\phi$ I tried solving this but couldn't arrive at the right answer. Any help would be appreciated! Calculate the sum of inverse values of ${n\choose 0}, {n\choose 1}, ... {n\choose n}$ Calculate $$A={1\over {n\choose 0}}+ {1\over {n\choose 1}}+ ...+{1\over  {n\choose n}}$$  and  $$B={1\over {n\choose 0}}- {1\over {n\choose 1}}+ ...+{(-1)^n\over  {n\choose n}}$$     My idea for $A$ is some probabilistic reasoning. Color the sets $$\{\}, \{1\}, \{1,2\}, \{1,2,3\},...\{1,2,...,n\}$$ and ask our self what is the probability that I choose colored set among all sets. Clearly this is exactly ${n+1\over 2^n}$ and on the other side it is $A$:  probability that I take empty set is ${1\over {n\choose 0}}$,   probability that I take colored set with 1 element is ${1\over {n\choose 1}}$  probability that I take colored set with 2 elements is ${1\over {n\choose 2}}$  and so on ...   So $A ={n+1\over 2^n}$. But I have no idea how to attack $B$. Post apocalyptic journey in search of knowledge from fallen society (ours) I'm racking my memory for a post-apocalyptic novel that I borrowed from a library maybe 15 years ago, but I'm sure it was published a few years before that though (maybe early 90s?).  I remember a party of people travelling across the flooded USA after some kind of apocalypse (climate change/flooding?). Towards the end of the book the group makes their way to New York(?) and finds a partially flooded library, discovering a set of books that gives hope for the return/rebuilding of society. As seen in this video: (Skip to 5:53)  When a player is slain, they drop an Enchanting Table on top of their inventory.  How was this achieved and how can I build a system (using command blocks) that does that? Come to think of it, what happens to a player's location when he/she dies? Does it reset to the spawnpoint? Stay the same (where they died) until they respawn? Or becomes a null value until they respawn? What is a less offensive synonym for "hypocrite"? Is there a word that describe a person who doesn't "practice what they preach"? Basically, is there a synonym for "hypocrite" that carries less pejorative connotations?   For example, let's say a friend of mine says he is a Christian. Yet he engages in behaviors considered sins by the Bible, making him a hypocrite. And I would like to tell him I think he is a hypocrite.   What would be a good word to use here, so my criticism seems constructive rather than offensive?     I tried using a , but the synonyms that came up were even worse (ie: they are more offensive than "hypocrite"). Related (but different) question: , which asks what to call someone who knows they are in the group of people they criticize.