Calling a method always throws NullPointerException with PowerMockito
What is a NullPointerException, and how do I fix it?
Why does $F=ma$? Is there a straightforward reason? Why is force = mass $\times$ acceleration? I have searched in many sites but didn't actually get at it. Simply I want to know that if a mass in space moves (gains velocity thus further accelerates), how can I think, postulate and further believe that force = multiplication  of mass and its acceleration ? What are these stamps in my passport after I was advised to divert via the UK but didn't have a visa? I am from Myanmar. I was on my way to Venice from Brussels while holding Schengen visa (single entry). I bought a British Airways ticket to fly from Brussels to Venice. Unfortunately, on that day, all BA flights from Brussels were canceled. British Airway's customer service centre told me to go to from Brussels to London by train, where I could catch my flight to Venice. I took a taxi to Bruxelles-Midi train station and bought a ticket to London. A Brussels immigration officer inspected and approved my passport.   Then I had to to through UK Border Immigration. There, they said I can't enter to get my flight. Although I explained the situation with the airline and made clear of my destination (I already reserved my hotels in Venice, Switzerland and France as described in my travel itinerary), they detained me for some hours and also took my fingerprints on paper and photo.   They asked questions concerned about my finances and gave me a refusal letter for not having a transit visa. So I had to re-enter Brussels where the immigration officer put the below stamp in my passport. As I had a single entry Schengen visa, I had to buy another airline ticket to Venice and complete my Europe trip.   What do the stamps below mean on my passport?   Can they affect me and, if so, how and why, when I apply for another Schengen visa? In a ring $(A,+, \cdot)$ if $aba = a$ then $bab = b$ and all non zero elements in $A$ are invertible. Quotient ring of a localization of a ring Let $A$ be a commutative ring. Let $P$ be a prime ideal of $A$. Let $I$ be an ideal of $A$ such that $I \subset P$. Let $\bar A = A/I$. Let $\bar P = P/I$. Is $\bar A_{\bar P}$ isomorphic to $A_P/IA_P$? Strange behaviour of macros C/C++ Is God either immoral or not omnipotent? The usual (Christian) justification for suffering/evil in the world created by a benevolent God is freedom of the will. However, the more interesting question is not about the source of evil (which the free will may very well be) but why God chose to create the world such as it is. Why not create a world with freedom of the will, but without suffering? Even assuming that God is bound by logic such combination doesn't seem to be logically impossible: creatures certainly can do good of their own free will. There are two alternatives.  1) God is powerful enough for all practical intents and purposes, enough to be called God, but not omnipotent. He created only the best of all possible worlds (Leibniz). This position is perhaps the most defensible philosophically, it also avoids logical problems with , etc., but it does diminish deity's status and invites unpleasant questions like what limits God (logic only, inert matter, outer chaos, other beings), is there someone/thing more powerful, etc.    Interestingly enough, the original Christian theodicy wasn't free will. St.Augustine says poetically "the canvas of creation requires both the black and the white paint". "Requires" here can be interpreted differently,  is to explain the black by the "just punishment" for the original sin, which brings us to Adam and Eve, and back to the free will. But if God is still omnipotent and hence omniscient creating creatures he knew would sin, and then punishing them for it is hardly an improvement.   2) However, Augustine can be read more straightforwardly. Evil is "required" for the perfection of the world just like black paint is required for the perfection of a painting (evil can be interpreted as lack of good rather than something onto itself but that is beside the point). God is immoral, and he is beyond our conception of morality, his notion of perfection is his own. This is much bolder, and similar to Plotinus's position on the existence of the One, the One can not exist because it is "prior to all existence". But it does evoke the unpleasant taste of "ends justify the means". It is one thing to use "God is beyond our logic and comprehension" to get rid of unliftable stones, it is quite another to convince people to worship an immoral perfectionist.  Formally, there is another logical possibility of asserting both morality and omnipotence, but defending the morality of creating a world full of suffering, for a higher purpose perhaps. For example, the suffering only appears bad to us, not to an absolute being in its wisdom. But this simply redefines morality and is only different in phraseology from the Augustine's position. The question is asked in human terms and has to be answered in kind. One is free to argue that God is beyond human logic and/or morality, but it still leaves him immoral as commonly understood.   There does not appear to be a way to square this circle, one has to accept Leibniz's or Augustine's alternative (or both) and deal with the downsides. Option 2) looks more consistent, but it is rarely embraced, at least not openly. Perhaps, for "public relations" reasons it is more attractive to dismiss the question with something like "this is beyond us" or change the subject to the free will.      What are the modern theological positions on the morality/omnipotence in catholisism, protestantism, etc.? Is the question relevant to other religions?   EDIT: I am not sure that it came through but by immoral I did not mean morally deficient or evil. Rather at the God's plane of being morality becomes meaningless, like tastes or smells are meaningless when applied to elementary particles. Prove that any continuous map on $\mathbb{R}$ which is the identity on $\mathbb{Q}$ is the identity map, hence Aut$(\mathbb{R}/\mathbb{Q})= 1.$  proof: Suppose $\sigma$ is continuous on $\mathbb{R}$ which is an identity on $\mathbb{Q}$. let $a \in R $. Then since $\sigma$ is continuous, then by definition there is $\delta_1 &gt; 0$ such that $|a - b| &lt; \delta_1$.  And assume $|\sigma(a) -\sigma(b)| &lt; \epsilon/2$ .  Let $\delta $= min{$\epsilon/2, \delta_1$}.  And now let $b \in \mathbb{Q}$ such that $|a - b| &lt; \epsilon$. Then  $|\sigma(a) - a| = |\sigma(a)  - b + b - a| \leq |\sigma(a) - \sigma(b) | + |b - a| &lt; \epsilon/2 + |b-a|$.  Can someone please help me? I am not sure . Can I say $|b - a| &lt; \epsilon/2 $? Accessing private member variables from prototype-defined functions Is there any way to make “private” variables (those defined in the constructor), available to prototype-defined methods?  TestClass = function(){     var privateField = "hello";     this.nonProtoHello = function(){alert(privateField)}; }; TestClass.prototype.prototypeHello = function(){alert(privateField)};   This works:  t.nonProtoHello()   But this doesn’t:  t.prototypeHello()   I’m used to defining my methods inside the constructor, but am moving away from that for a couple reasons. As per title, I wish to know if I can, after a successful 32bit setup and consequent software installations, update to a 64bit version.  I know how to partition (actually one of the solutions is to set /, /etc, /home, /var/www, and /opt as separate partitions) and I know that a clean install is way better than a dirty one, yet I would like to know if/how it's possible to do that. Adding word 'Table' before each entry in list of tables I need to prefix each entry in list of tables and figures with appropriate text - table or figure for each. Also I need to remove chapter numbers from list, because tables are numbered consequently through the whole report.  I managed to do everyting I need with this simple commands:  \renewcommand{\thetable}{\arabic{table}} \renewcommand{\thefigure}{\arabic{figure}}  \makeatletter \providecommand\phantomsection{}% for hyperref  \newcommand\listoftablesandfigures{%     \chapter*{List of Tables and Figures}%     \phantomsection %\addcontentsline{toc}{chapter}{List of Illustrations}% %\section*{Figures}% %\phantomsection %\addcontentsline{toc}{section}{\protect\numberline{}Figures}% \@starttoc{lof}% \bigskip %\section*{Tables}% %\phantomsection %\addcontentsline{toc}{section}{\protect\numberline{}Tables}% \@starttoc{lot}} \makeatother   Now only one thing remains: to be consistent with text in list of tables and figures. Why didn't Spock die in The Search for Spock? Why does holding something up cost energy while no work is being done? I read the definition of  as  $$W ~=~ \vec{F} \cdot \vec{d}$$  $$\text{ Work  =  (Force) $\cdot$ (Distance)}.$$ If a book is there on the table, no work is done as no distance is covered. If I hold up a book in my hand and my arm is stretched, if no work is being done, where is my energy going? How to print the longest line in a file? I'm looking for the simplest method to print the longest line in a file. I did some googling and surprisingly couldn't seem to find an answer. I frequently print the length of the longest line in a file, but I don't know how to actually print the longest line. Can anyone provide a solution to print the longest line in a file? Thanks in advance. How do you get JavaScript/jQuery Intellisense Working in Visual Studio 2008? I thought jQuery Intellisense was supposed to be improved with SP1. I even downloaded an annotated version of jQuery 1.2.6, but intellisense will not work in a separate jscript file. I have the jQuery library referenced first on my web page in the &lt;head> tag. Am I doing anything wrong? What does: Error Broken count >0 mean? I have the message:   Error Broken count &gt;0 Check if you are using third party repositories. If so disable them, since they are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f Details: The following packages have unmet dependencies: firefox-globalmenu: Depends: firefox (= 19.0+build1-0ubuntu0.12.04.2) but 19.0+build1-0ubuntu0.12.04.1 is installed   Any suggestions? How can I run Windows applications on a MacBook Pro? I have a friend that wants to buy a Mac Book Pro and he has some windows applications that he needs to run. He doesn't want to buy the applications again.  Can he run the Windows applications on his MacBook Pro? What ways to accomplish this are available? Trying to understand what happens with a brokerage firm's customers when it goes bankrupt (case of study: Lehman Brothers) I'm trying to understand how secure it is to own mutual funds/ETFs, not in terms of market volatility etc., but in terms of judicial security (i.e. what happens to your holdings if the firm goes bankrupt). To understand it, I have read this article about the bankruptcy of Lehman Brothers:  Note: From now on, I'm always referring to investors who own funds/ETFs managed by Lehman Brothers, not by investors who invested in Lehman Brothers or subprime mortgages (e.g. S&amp;P 500 ETF investors). From the above article, what I have understood is that the funds/ETFs managed by Lehman Bros. were shifted to other brokerage firms to be managed by them. Is this what actually happened? Still, what happens with the investors if, hypothetically, no brokerage firm in the world wants to manage these financial products? TTY doesn't wait for password I upgraded from 16.04 to 18.04. When I press Ctrl+Alt+F3 I get the terminal which prompts for the username. When I type my username and press Enter, it doesn't wait for my password (its as if I pressed Enter without entering anything). Even if I enter something, the text shown in plaintext and then it keeps on saying my password is wrong. After few times, the screen is cleared and it prompts for my username again and the same loop goes on. Prove that the number of $\alpha\in\mathbb{F}_{27}$ such that $|A_\alpha|=26 $ equals 12. Let $\mathbb{F}_{27}$ denote the finite field of size 27. For each $\alpha\in\mathbb{F}_{27}$ , define $ A_{\alpha}$ $=$ { $ 1, 1+\alpha , 1+\alpha+{\alpha}^2 , 1+\alpha+{\alpha}^2+{\alpha}^3 , .... $} . Then  prove that  the number of  $\alpha\in\mathbb{F}_{27}$ such that $|A_\alpha|$=26 equals 12.  $ 0\in A_\alpha $ if and only if $\alpha\neq 0$ For the first proof , the multiplicative group of the field $\mathbb{F}_{27}$ is cyclic and its order is 26  , so there are 12 generators in that group.   Now  I need  to  show  that  $ 1+\alpha+{\alpha}^2+.. {\alpha}^{25} $ =0  , where order of $\alpha$=26 . Since   $\alpha ^{26}$ =1 ($\alpha$-1)(1+$\alpha$+${\alpha}^2$+...+${\alpha}^{25}$)=0 , since $\alpha\neq 1$  , So $ 1+\alpha+...+{\alpha}^{25} $ =0 My question is , can I write these last two  lines?  I mean are those two lines alright to write? If those two lines are invalid then I need some help to show  $ 1+\alpha+{\alpha}^2+..+{\alpha}^{25} $=0  .Thanks The abstract environment changes the \linewidth for the whole document In the article class, it seems that using the abstract environment has an effect to the rest of the document. More precisely, it seems that it redefines the \linewidth, which equals \textwidth without abstract, is smaller with the abstract. My feeling is that \linewidth is redefined for the abstract environment, but the value is not reseted at the end of the abstract.  Here is a minimal example:  \documentclass{article} \begin{document} \abstract{This is an abstract. This is an abstract.}\bigskip  This is text. This is text. This is text. This is text. This is text. This is text.\\  \rule{\textwidth}{3em} \rule{\linewidth}{3em} \end{document}   The output is not the same if you comment the \abstract line or not.  Do you have the same problem as I do when you compile (if not, I will upload some PDF files to show)? Is this a (known) bug in LaTeX2e? How can we circumvent the problem?  Note: I compile with the pdflatex command, and I use pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian).