this is my depedency    &lt;dependency&gt;     &lt;groupId&gt;org.json&lt;/groupId&gt;     &lt;artifactId&gt;json&lt;/artifactId&gt;   &lt;version&gt;20160810&lt;/version&gt; &lt;/dependency&gt;   this is my json object  {    "authorize": {        "balance": "9984.06",        "country": "id",        "currency": "USD",        "email": "xxxx.xxxx@gmail.com",        "fullname": "  ",        "is_virtual": 1,        "landing_company_fullname": "Binary Ltd",        "landing_company_name": "virtual",        "loginid": "VRg4423",        "scopes": [          "read",          "trade"        ]    } }   this is my code  JSONObject jsonObject = new JSONObject(fil); JSONObject jsonChildObject = (JSONObject) jsonObject.get("authorize"); Iterator iterator  = jsonChildObject.keys(); String key = null; while (iterator.hasNext()) {     key = (String) iterator.next();     System.out.println("balance value:" + ((JSONObject) jsonChildObject.get(key)).get("balance")); }   I have no idea why I can't acces all the child node value. It returns null pointer exception there is no "authorize" i can't get the parent value.
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
Propose a privilege to sit in the 500 reputation mark As , the retag privilege serves a lot more confusion and a lot less of its benefit due to the suggested edit system. It must be done away with. It will be done away with. ♪  In light of this decided course of action, we're going to need a new snack for the road between "Create Tags" at 300 reputation and "Established User" at 1000 reputation. We'd like your help in thinking about some ideas on what would be a nice privilege to sit at this level. Since we're... a bit dry on our end.  The primary guideline in deciding what kind of privilege to put here is acknowledging its position in the overall hierarchy of privileges. 500 reputation is an early-intermediate user, one who has started to really get the hang of the site and its function. It can be something that provides convenience in how they currently can act on the site, or it could be some new functionality that fits as an early ability (especially considering there's no new abilities until 2000 reputation's "Edit Everywhat" ability).  I look forward to hearing what creative ideas y'all can provide. I have removed the mentioned libraries. Then my system disconnected from NIS service and many packages are being removed. The problem is I am not even able to login in my system. When i restarted it is showing "low graphics mode error". I do not know what to do Please help me. I am a beginner to Ubuntu. Why are `/dev/ptmx` and `/dev/pts/ptmx` not device files? says     On Linux, using devpts, there is no master device file. The process on the master end uses a file descriptor, which it gets by opening ptmx, but there’s no corresponding device node.   Did the author refer to /dev/ptmx or /dev/pts/ptmx?    Why are /dev/ptmx and /dev/pts/ptmx not device files? What types of files are they?  What is the difference between /dev/ptmx and /dev/pts/ptmx?  Thanks.  On Lubuntu 18.04  $ file /dev/ptmx  /dev/ptmx: character special (5/2) $ file /dev/pts/ptmx  /dev/pts/ptmx: character special (5/2)  $ sudo su  # stat -L /dev/fd/3 3&lt;&gt; /dev/pts/ptmx   File: /dev/fd/3   Size: 0           Blocks: 0          IO Block: 1024   character special file Device: 15h/21d Inode: 2           Links: 1     Device type: 5,2 Access: (0000/c---------)  Uid: (    0/    root)   Gid: (    0/    root) Access: 2018-11-21 13:39:10.544000218 -0500 Modify: 2018-11-21 13:39:10.544000218 -0500 Change: 2018-11-21 13:39:10.544000218 -0500  Birth: -  # stat -L /dev/fd/3 3&lt;&gt; /dev/ptmx   File: /dev/fd/3   Size: 0           Blocks: 0          IO Block: 4096   character special file Device: 6h/6d   Inode: 87          Links: 1     Device type: 5,2 Access: (0666/crw-rw-rw-)  Uid: (    0/    root)   Gid: (    5/     tty) Access: 2019-01-06 07:19:54.372098540 -0500 Modify: 2019-01-06 07:19:54.372098540 -0500 Change: 2018-11-21 13:39:30.372098540 -0500  Birth: - Subjunctive mood: 'was' usage after 'I wish' and 'if only' had declared the sentence below as follow: 1) STAR TURN, 2) BEST LINES.      I wish Bernard Cribbins was my grandad. Perhaps he would be willing to   adopt?     Rattigan: “If only that was possible.” The Doctor: “If only that were   possible. Conditional clause.”    Is 'was' after 'I wish', 'if only' and 'if' (in conditional clauses) colloquial?  Does it be used in formal speech and writing? I already derived a QM expectation value for ordinary momentum which is: $$ \langle p \rangle=  \int\limits_{-\infty}^{\infty} \overline{\Psi}  \left(- i\hbar\frac{d}{dx}\right) \Psi \, d x $$ And I can read clearly that operator for momentum equals $\widehat{p}=- i\hbar\frac{d}{dx}$. Is there an easy way to derive an expectation value for $\langle p^2 \rangle$ and its QM operator $\widehat{p^2}$? Why won't OS X trust GitHub's SSL certificate? I have added an mp3 file as a static resource, can someone please help me to call that resource in the lightning component so when I hit the button it will play that static resource  as per the Salesforce documentation I have tried below but instead of playing the sound it is displaying the message. Is the closure of path-connected set path connected? Prove that $\gcd(a^n - 1, a^m - 1) = a^{\gcd(n, m)} - 1$ If I live in the US, for example, where current interest rates are practically nil, how can I take advantage of the fact that ? I am looking for a YA book about a boy who learns to use powers from a mind-adept, in a seemingly abandoned house. The adept helps him open his mind by using a cube. One of his powers, I believe, is to go into dreams of people that  he knows. He helps his young female neighbor friend by doing this, opening a door in her mind. He tries to open the mind-door of a local older bully, but finds out the young man can't be helped because he has been abused mentally and physically. I don't believe the book I read is past 1995. It might have the word "adept" in it. After trying to delete apache and tomcat, and now trying to reinstall apache 2, I am missing the init.d/apache2 file to start/stop my server.  I am not sure if the new install actualy worked, and my apt-get purge apache2 didn't remove everything in the first place!  How can I get the init.d/apache2 file to test if server starts / is installed properly (I had removed files and directories manually)? Backup with duplicity on Google Cloud Storage I have already set a backup routine that backups all my files to Amazon S3 using duplicity. I would like to create a similar backup routine with Google Cloud Storage. Is it possible to get duplicity to work with GCS? Are there any other methods to apply to solving simultaneous equations? We are asked to solve for $x$ and $y$ in the following pair of simultaneous equations:  $$\begin{align}3x+2y&amp;=36 \tag1\\ 5x+4y&amp;=64\tag2\end{align}$$  I can multiply $(1)$ by $2$, yielding $6x + 4y = 72$, and subtracting $(2)$ from this new equation eliminates $4y$ to solve strictly for $x$; i.e. $6x - 5x = 72 - 64 \Rightarrow x = 8$. Substituting $x=8$ into $(2)$ reveals that $y=6$. I could also subtract $(1)$ from $(2)$ and divide by $2$, yielding $x+y=14$. Let $$\begin{align}3x+3y - y &amp;= 36 \tag{1a}\\ 5x + 5y - y &amp;= 64\tag{1b}\end{align}$$ then expand brackets, and it follows that $42 - y = 36$ and $70 - y = 64$, thus revealing $y=6$ and so $x = 14 - 6 = 8$. I can even use matrices! $(1)$ and $(2)$ could be written in matrix form: $$\begin{align}\begin{bmatrix} 3 &amp;2 \\ 5 &amp;4\end{bmatrix}\begin{bmatrix} x \\ y\end{bmatrix}&amp;=\begin{bmatrix}36 \\ 64\end{bmatrix}\tag3 \\ \begin{bmatrix} x \\ y\end{bmatrix} &amp;= {\begin{bmatrix} 3 &amp;2 \\ 5 &amp;4\end{bmatrix}}^{-1}\begin{bmatrix}36 \\ 64\end{bmatrix} \\ &amp;= \frac{1}{2}\begin{bmatrix}4 &amp;-2 \\ -5 &amp;3\end{bmatrix}\begin{bmatrix}36 \\ 64\end{bmatrix} \\ &amp;=\frac12\begin{bmatrix} 16 \\ 12\end{bmatrix} \\ &amp;= \begin{bmatrix} 8 \\ 6\end{bmatrix} \\ \\ \therefore x&amp;=8 \\ \therefore y&amp;= 6\end{align}$$  Question Are there any other methods to solve for both $x$ and $y$? Prediction interval for binomial random variable What is the formula (approximate or exact) for a prediction interval for a Binomial random variable?  Assume $Y \sim \mathsf{Binom}(n, p)$, and we observe $y$ (drawn from $Y$). The $n$ is known.  Our goal is to obtain a 95% prediction interval for a new draw from $Y$.   The point estimate is $n\hat{p}$, where $\hat{p}=\frac{y}{n}$. A confidence interval for $\hat{p}$ is straightforward, but I cannot find a formula for a prediction interval for $Y$. If we knew $p$ (rather than $\hat{p}$), then a 95% prediction interval just involves finding the quantiles of a binomial. Is there something obvious I'm overlooking? I have read answers to questions like  but I couldn't find a general rule for using "you" or "yourself", "him" or "himself" that could explain things I see in some examples.  For example, I think that one normally say (according to examples I see in ):   You bring something with you. You have something in you. You have something on you. You pressed her to you.   But on the other hand one would say:   You draw attention to yourself. He killed himself. You can try it out for yourself.   As a general rule, it seems that the reflexive pronoun is used when the object is the same as the subject of the verb. But for prepositional phrases, it seems more complicated. Do some prepositions (like "with", "in", "on") always come with the accusative form of the pronoun, and some other (like "for") don't? What about "to", that seems to be followed by both in different circumstances? What category does the 'the recent perfect' belong to? A scholar has said that there are 4 usages of the present past tense:   The Universal sense of the Perfect, used to indicate that a state of affairs prevailed throughout some interval stretching from the past into the present       I've known Max since 1960.  The Existential sense of the Perfect, used to indicate the existence of past events     I have read Principial Mathematica five times.  The Stative/Resultative sense of the Perfect, used to indicate that the direct effect of a past event still continues     I can't come to your party tonight - I've caught the flu.  The Hot News sense of the Perfect, used to report hot news     Malcolm X has just been assassinated.    To what category does the recent past belong? (A kind soul at  suggested I post here as well, sorry if out of bounds.)  I'm trying to programmatically model a damped harmonic spring for use in mobile UI animations (physics mathematics isn't my background, please pardon any misconceptions).  Having derived the parameters for the general case equation, I can iteratively calculate values until I reach a suitable threshold, though because this is bound to "simple" trigonometric and $e^{x}$ functions on the CPU, the 4000-some-odd steps can cause about 0.25 seconds lag on slow devices while it calculates. I'd like to speed this up using my platform's super-optimized vector and BLAS/LAPACK variants.  The requirement for doing this is precalculating the number of steps necessary to reach my threshold value.    In the underdamped case, where the roots of the characteristic function of the differential equation are non-real, I can use algebraic tricks to get my values:  $$x(t) = c_{1}e^{r_{1}}\cos(i_{1}t) + c_{2}e^{r_{2}}\sin(i_{2}t)$$  (Given $r_{1}$, $i_{1}$, $r_{2}$, and $i_{2}$ are the real and irrational components of my two roots, respectively.)  Knowing that $r_{1} = r_{2}$ and $i_{1} = -i_{2}$, I can simplify to:  $$x(t) = c_{1}e^{r_{1}}\cos(i_{1}t)$$  And get my desired value of $t$ for my threshold $a$:  $$t = \arccos(a / c_{1} / e^{r_{1}}) / i_{1}$$    When the roots are real, the equation looks a lot simpler:  $$x(t) = c_{1}e^{r_{1}} + c_{2}e^{r_{2}}$$  However, I don't have my trig functions floating around to help me solve it (even if I did, the irrational components being 0 would cause problems, of course).  Take the concrete example on pages 3-4 of  (my bible during this process), since they at least solve cleanly:  $$x(t) = 1.5e^{-t} - 0.5e^{-3t}$$  I know how I would solve for $t$ to get my for when $x(t) = a$ on paper, by setting $x=e^{t}$, solving, and back substituting, but I don't have that luxury here.  I can make a few assumptions: the roots and constants are all real. I'm always going to be looking for the smallest, first, positive value of $t$. Obviously, the iterative solution is the simplest for this case, but in the end that would involve more steps and therefore be slower no matter what my other optimizations would be. How, then, would I go about solving for my threshold value algorithmically in this (supposedly) simplified case?  Addendum  The underdamped solution presents an extra requirement. The motion curve will oscillate back and forth a few times across the endpoint. Therefore, "first and lowest" $t$ requirement is not necessarily true. In my current, iterative code, the threshold value is both checked against the distance from the current $x(t)$ to the endpoint, as well as to the distance from the previous $x(t)$ as well to allow for a number of oscillations. This might make a more efficient solution nearly impossible. What is the music on S3E16 when Todoroki was fighting group of ninjas? How are digital movies sent to a movie theater? For many years, movies were stored on rolls of film that were physically mailed to theaters. Now, most theaters project their movies digitally. But how are these digital movies sent to the theater?   Do they mail a hard drive to the theater? Do they give the theater a username and password to a super secret website where they can download it? How does it get there?