Unable to start activity ComponentInfo, request Permission
What is a NullPointerException, and how do I fix it?
I want to find the probability that mean is less than 5 given that poisson distribution states it is 6 ie find p(x&lt;5|x~po(6))  Here is the actual question: Two grocers agree that the daily demand for a particular item has Poisson distribution. However, grocer A claims that the mean demand is 3 items per day, while grocer B claims that the mean demand is 6 items per day. They agree to resolve the disagreement by observing the demand on one particular day: B agrees to accept A’s claim if the observed demand is 4 or less, and A agrees to accept B’s claim if the observed demand is 5 or more. (a) Calculate the probability that A’s claim is accepted when, in fact, B’s claim is correct Use of 'const' for function parameters How far do you go with const?  Do you just make functions const when necessary or do you go the whole hog and use it everywhere?  For example, imagine a simple mutator that takes a single boolean parameter:  void SetValue(const bool b) { my_val_ = b; }   Is that const actually useful?  Personally I opt to use it extensively, including parameters, but in this case I wonder if it's worthwhile?  I was also surprised to learn that you can omit const from parameters in a function declaration but can include it in the function definition, e.g.:  .h file  void func(int n, long l);   .cpp file  void func(const int n, const long l)   Is there a reason for this? It seems a little unusual to me. Recent file in Macbook Air I am not a very techie girl. I used my brother's macbook air and saw some of his personal things which I should haven't. And I realised that he could see that in recents. How to delete them? After surfing a lot, I got to know about the recent files stored in plist in preferences, by the name com.apple.recentfiles.plist or LSSharedfiles.plist but I couldn't find a file/plist named above. Kindly help! As mentioned above it is macbook air and again I do not know much :( JavaScript: client-side vs. server-side validation Which is better to do client side or server side validation?  In our situation we are using    jQuery and MVC.   JSON data to pass between our View and Controller.     A lot of the validation I do is validating data as users enter it. For example I use the the keypress event to prevent letters in a text box, set a max number of characters and that a number is with in a range.   I guess the better question would be, Are there any benefits to doing server side validation over client side?    Awesome answers everyone. The website that we have is password protected and for a small user base(&lt;50). If they are not running JavaScript we will send ninjas. But if we were designing a site for everyone one I'd agree to do validation on both sides. Since , how do I uninstall it from my desktop system?  (Please note: This question is not about Unity 7, which is still supported at the time of this writing and should remain installed if present.) In which step of compilation are comments removed? Metrizability of Hausdorff continuous image of compact metric space Let $f$ be a continuous mapping of a compact metric space $(X, d)$ onto a Hausdorff space $(Y, \tau_1)$. Then $(Y, \tau_1)$ is compact and metrizable.   In one proof the following metric is constructed:  $d_1(y_1, y_2) = inf\{d(a, b) : a \in f^{-1}\{y_1\},\ b \in f^{-1}\{y_2\}\}$, for all $y_1$ and $y_2$ in $Y$.  I'm thinking about how to prove that triangle inequality holds for $d_1$, s.t. $d_1(x, z) \leq d_1(x, y) + d_1(y, z)$  And how about the case when triangle inequality does not hold?    Update: @daniel-schepler suggested to use metric $d_1(x, y) = inf\{d(x^*, x_1) + d(y_1, x_2) + \cdots + d(y_{n-1}, x_n) + d(y_n, y^*)\}$ where $f(x^*) = x$, $f(y^*) = y$, and $f(x_i) = f(y_i)$ for each $i$.  Now we need to prove 3 property of metric: positivity, symmetry and triangle inequality. This is my sketch:   Positivity. Chose two points $x,y \in Y$ s.t. $x \neq y$. Singleton sets $\{x\}$ and $\{y\}$ are disjoint closed sets by Hausdorfness of $Y$ and their preimages are also disjoint closed in $X$ by continuity of $f$. $X$ is compact metric space by hypothesis and therefore a normal space. In normal space every two disjoint closed sets have disjoint open neighborhoods. Let $f^{-1}(x) \subseteq U$ and $f^{-1}(y) \subseteq V$ s.t. $U,V$ are open and $U \cap V = \varnothing$. Therefore there exists an $\varepsilon &gt; 0$, s.t. $x^* \in B_\varepsilon(x^*) \subseteq U$ and $y^* \in B_\varepsilon(y^*) \subseteq U$ and distance between any two closed sets is strictly positive and $d_1$ is positive and zero iff $x = y$. Symmetry. Clearly $d_1$ is symmetric. Triangle inequality. For triangle inequality we can show that in the "worst" case $d_1(x, z) = d_1(x,y) + d_1(y, z)$. I'm trying to prove  the following claim:     If $f$ is continuous  and $\displaystyle\int_a^\infty |f(x)|\;dx$ is finite then $\lim\limits_{ x \to \infty } f(x)=0$.   Here the counter example of all these sine functions won't do, since  their infinite integral does not converge absolutely.   Any hints for a proof? I am studying elementary Algebraic Topology recently. I have seen that a topological space is identified with a group. We are telling the group as Fundamental Group. So every topological space $X$ and for any $x \epsilon X$ there is a fundamental group $\pi_1 (X,x)$. I have a question about the converse. If we consider any arbitrary group $G$, then does there exist a topological space $X$ and an element $x\epsilon X$ such that $\pi_1 (X,x)=G$? Finding the volume of the tetrahedron. Find the volume of the tetrahedron with the vertices $P(1,1,1)$, $Q(1, 2, 3)$, $R(3, 1, 2)$, and $S(2, 3, 1)$. Can I download and play games from a friend's PSN account on a PS4? How to 'sum' a standard deviation? I have a monthly average for a value and a standard deviation corresponding to that average. I am now computing the annual average as the sum of monthly averages, how can I represent the standard deviation for the summed average ?  For example considering output from a wind farm:  Month        MWh     StdDev January      927     333  February     1234    250 March        1032    301 April        876     204 May          865     165 June         750     263 July         780     280 August       690     98 September    730     76 October      821     240 November     803     178 December     850     250   We can say that in the average year the wind farm produces 10,358 MWh, but what is the standard deviation corresponding to this figure ? Where is log file from rc.local? I have some commands to in my rc.local. I know that they are failing. How can I get log file with messages produced by executing rc.local? Where is it located?  I have checked the /var/log/boot.log. I know my messages are not there because I know already what is the reason of failure. But I still want to make sure from log file.  Note, I don't want to run script again, I could but I don't want. I would rather analyse wht happened during startup.  Thanks for any help.  Ubuntu 12.04 Desktop (if it matters) The  of March 01, 2013 put it's distance at 14 hrs 04 mins 23 secs of light-travel time from Earth. A  (earlier today) tweet says it is 14 hrs 04 mins 22 secs of light-travel time from Earth. An  tweet put it still further out at 14 hrs 04 mins 25 secs of light-travel time.  The Voyager 2 tweets on Voyager 1's proximity to Earth too has reduced similarly to  earlier today from  reported on Feb 28 2013  It could quite simply be a typo ... If not a typo then my curiosity is piqued; I was under the impression the Voyagers are outbound from the Solar System now without any major in-system activities now.   How is it the Voyagers are closer to Earth than before? When the loop is the figure shown below will be rotated in clockwise direction the the slip ring connected to the red segment of the loop will give us the positive voltage and the slip ring connected to the black segment of the loop will give us negative voltage according to the Flemings right hand rule.  What if the loop is rotated in counter clockwise direction ? Will the slip rings provide us the same polarities which they were giving when the loop was moving clockwise ?  Plus  The voltage from the loop is given by the equation.  V(t) = Vmaximum * sin (theta)  Where theta is the positive angle the red segment makes in the clockwise direction or in counter clockwise direction from this position ? get value part of specific word in AIX want to search string and need part of string  file.txt:  CREATE MULTISET TABLE $$ENV$$_TEMP_ESM.EMPASGMTAMPTMPRTRSE, NO FALLBACK ,      NO BEFORE JOURNAL,      NO AFTER JOURNAL,      CHECKSUM = DEFAULT,      DEFAULT MERGEBLOCKADSRATIO   while using below sed command getting extra value  Output:   bash-4.3$ sed -n 's/.*$$ENV$$_//p' file.txt  **TEMP_ESM.EMPASGMTAMPTMPRTRSE** ,NO FALLBACK ,   I need only TEMP_ESM.EMPASGMTAMPTMPRTRSE "This product is good value" vs "This product is of good value" in a sentence 1.This product is good value. 2.This product is of good value.    Are there any difference in meaning between "good value" and "of good value"? Every non-empty subset of the integers which is bounded above has a largest element. Why are there no byte or short literals in Java? I can create a literal long by appending an L to the value; why can't I create a literal short or byte in some similar way? Why do I need to use an int literal with a cast?  And if the answer is "Because there was no short literal in C", then why are there no short literals in C?  This doesn't actually affect my life in any meaningful way; it's easy enough to write (short) 0 instead of 0S or something. But the inconsistency makes me curious; it's one of those things that bother you when you're up late at night. Someone at some point made a design decision to make it possible to enter literals for some of the primitive types, but not for all of them. Why? I am new to Linux and Ubuntu. When I don't know how to do something with this OS I search on the web and Ask Ubuntu and always find the answer.  But sometimes it's not a great answer nor complete tutorial. I follow the instructions anyway, but I don't know what all the commands mean.  So my question is:   When I follow a tutorial, am I 100% safe? If not, then how can I tell I am in danger?