How to fix RuntimeException and NullPointerException?
What is a NullPointerException, and how do I fix it?
When do mobs despawn in Minecraft? I understand monsters only spawn in a 9 x 9 grid of chunks centered on the player, and I assume they stay around while they remain within that distance of you. But do they despawn as soon as you move away from them? Or do they remain? If so what (if anything) causes them to despawn? Are the rules any different for passive mobs?  Will running far away from an area and then coming right back clear it of monsters? What do I need to know before upgrading the CPU of a laptop? I have an AMD laptop, which has AMD APU (e1-2500). I don't really like the speed of it and would love to upgrade to faster APU. There are some AMD APUs available in ebay. So the question is:   What do I need to check to be sure that a new APU will work without problems? How do we perform transverse measurements in a two level system? In quantum mechanics any two level system can be mapped onto effective spin variables. If the system is defined by two energy levels, $|E_1\rangle$ and $|E_2\rangle$, the Hamiltonian is  $$ H = \left(\begin{array}{cc} E_1 &amp; 0 \\ 0 &amp; E_2 \end{array}\right) \, .$$  This can be recast as  $$ H = \frac{E_1+E_2}{2} 1\!\!1 + \frac{E_1-E_2}{2} \sigma_3\, .$$  $1\!\!1$ is the identity operator and $\sigma_3$ is the third pauli matrix. This is very nice because we can now apply our knowledge and intuition of spin dynamics to any two level system.  My question is the following: for a real spin I can measure expectation values of $\sigma_{1,2}$ by physically rotating my system and align its $x$ or $y$ axis with my measuring apparatus. How do I do this (in the lab!) with a pseudo-spin system? Imagine I am looking at a cold atom and I want to know if the system is in an symmetric or anti-symmetric superposition of $|E_1\rangle$ and $|E_2\rangle$, how do I do it? How can I find the right lens cap for my lens? I own a Nikon D3000 Camera with the AF-S 18-55mm VR Kit Lens. Last week I lost the lens cap and now I want to buy a new one.  But when I went to , I got confused with the different ranges of lens names —  LC-62, LC-78, etc.  My concern is what if I order one lens cap and it won't fit correctly on my lens?  If you guys have an D3000, can you please let me know how to find the correct lens cap names? A file manager with free icon placing option How did nobody at Hogwarts (especially Dumbledore) figure out what killed Myrtle? A while back I read about the super Kamiokande detector detected a large neutrino flux and then several hours later a supernova was seen. Anyone know of this with sources? I don't recall the source at the moment. Preferred languages: C/C++, Java, and Ruby.  I am looking for some helpful books/tutorials on how to write your own compiler simply for educational purposes. I am most familiar with C/C++, Java, and Ruby, so I prefer resources that involve one of those three, but any good resource is acceptable. Why does shell Command Substitution gobble up a trailing newline char? As per the following example, and as in  In bash, where has the trailing newline char gone?, I want to know "why" it happens    x="$(echo -ne "a\nb\n")" ; echo -n "$x" | xxd -p  # Output is: 610a62  # The trailing newline from the 'echo' command #   has been "deleted" by Command Substitution   I assume there must be some very significant reason for a shell action, namely Command Substitution, to actually delete some data from the command output it is substituting... but I can't get my head around this one, as it seems to be the antithesis of what it is supposed to do.. ie. to pass the output of a command back into the script process... Holding back one character seems weird to me, but I suppose there is a sensible reason for it...  I'm keen to find out what that reason is... Book about a teenager programmed to be an assassin and trying to get back at the people responsible I read this book a few years back (around 5?). It was part of a multibook series but I have only read one book.  It's about this teenager who I think had been programmed to be an assassin but then somehow retained his conscience and was out to get the people responsible for that.  I briefly remember a girl, and this one part where he realizes he can ride a horse and then there's a chase too. I think the guy's name was Jim or Jimmy, but not quite. I'm also quite sure he was either part computer, or had a chip or something in his brain which had been programmed to give him a host of mental and physical abilities which he retained and used as well as the series progressed. CPU Emulation and locking to a specific clock speed If you had read my other , you'll know I've spent this weekend putting together a 6502 CPU emulator as a programming exercise.  The CPU emulator is mostly complete, and seems to be fairly accurate from my limited testing, however it is running incredibly fast, and I want to throttle it down to the actual clock speed of the machine.  My current test loop is this:      // Just loop infinitely.     while (1 == 1)     {                         CPU.ClockCyclesBeforeNext--;          if (CPU.ClockCyclesBeforeNext &lt;= 0)         {             // Find out how many clock cycles this instruction will take             CPU.ClockCyclesBeforeNext = CPU.OpcodeMapper.Map[CPU.Memory[CPU.PC]].CpuCycles;              // Run the instruction             CPU.ExecuteInstruction(CPU.Memory[CPU.PC]);              // Debugging Info             CPU.DumpDebug();             Console.WriteLine(CPU.OpcodeMapper.Map[CPU.Memory[CPU.PC]].ArgumentLength);              // Move to next instruction             CPU.PC += 1 + CPU.OpcodeMapper.Map[CPU.Memory[CPU.PC]].ArgumentLength;                                                 }     }   As you can tell, each opcode takes a specific amount of time to complete, so I do not run the next instruction until I count down the CPU Cycle clock. This provides proper timing between opcodes, its just that the entire thing runs way to fast.  The targeted CPU speed is 1.79mhz, however I'd like whatever solution to the clock issue to keep the speed at 1.79mhz even as I add complexity, so I don't have to adjust it up.  Any ideas? would this be considered a 'methodology' or a 'method'? Say I developed something called "Methodology for Establishing Remaining Life of Components". Basically, at work, we have components (or equipment). I wanted to develop a way to identify how much longer the components / equipment can last before they ware out and cannot be used.  It takes into account "the degree of damage currently in the component, the rate of future damage accumulation based on realistic operating scenarios, and the degree of damage required to cause failure." Taking these three into account, the remaining life of a component can be assessed. This is what I call "Methodology for Establishing Remaining Life of Components".   My question is, would this be considered a 'methodology for establishing remaining life of components' or just a 'method for establishing remaining life of components'? Or do you need more information to figure out if it is a method or methodology?   I cannot provide all the information for business purposes, but if additional  information is required to figure out if it is a method or methodology, I will provide it. Wiener Process $dB^2=dt$ Why is $dB^2=dt$? Every online source I've come across lists this as an exercise or just states it, but why isn't this ever explicitly proved? I know that $dB=\sqrt{dt}Z$, but I don't know what squaring a Gaussian random variable means. I’m currently in the process of reconsidering how I do bibliography management. It seems to be most sensible to use biblatex with biber. I’d like to know what tools are available on which I can build a solution that works for me. I’m interested in everything from full-blown bibliography management suites to pretty-printers for .bib files; both as traditional programs and online services.  Tools in question should fulfill the following criteria:   Unicode support. Support for the additional entry types and fields that biblatex supports. Support for biber’s improved cross-referencing. BJT Astable Multivibrator Greek numbering Simpler proof - Non atomic measures Suppose that $(X,\mathcal{E},\mu)$ is a non-atomic finite measure space (i.e. for every $E \in \mathcal{E}$ with $\mu(E)&gt;0$ there exists $F \subset E$ measurable such that $0&lt;\mu(F) &lt;\mu(E)$.)  a) Prove that for every $ \varepsilon &gt;0$ there is a finite partition of $X$ in measurable subsets $X_1,..,X_n$ such that $\mu(X_i)\leq \varepsilon$.  b) Prove that for every $\alpha \in [0,\mu(X)]$ there exists $E \in \mathcal{E}$ with $\mu(E)=\alpha$.    I guess that a) is given to prove b) more easily. I have the following idea of solution for a) (inspired from , which proves b)  )  Denote  $$ \Gamma = \{ (X_1,..,X_n) : n &gt;&gt; \mu(X)/\varepsilon, X_i \text{ are disjoint }, \mu(X_i)\leq \varepsilon \}$$ ordered by componentwise inclusion. Totally ordered parts $(Y_\alpha)$ of $\Gamma$ have an upper bound element $(\bigcup Y_\alpha^i)_{i=1}^n$ which is still in $\Gamma$.   By Zorn's lemma $\Gamma$ has maximal elements. If a maximal $(X_1..X_n)$ element is not a partition, then we can replace it with something better, of the form $(X_1,..,X_n\cup A)$ where $A \subset X \setminus (X_1 \cup..\cup X_n)$ and $\mu(A)&gt;0$.     My questions are:  1) Is my solution of a) correct? I feel that the part with the upper bound element may not work, since there might be noncountable unions.  2) What is a simpler solution of a)? How can I attach a file to a post? Specific derivatives have specific names. First order is often called tangency/velocity, second order is curvature/acceleration. I've also come across words like Jerk, Yank, Jounce, Jolt, Surge and Lurch for 3rd and 4th order derivatives. Is there a widely agreed list of names for these? How many orders have specific names?  In this case, I'm dealing with NURBs curves, so the "tangency" and "curvature" related words are to be preferred over "velocity" and "acceleration" words. MySQL sort after argument in IN()