I'm trying to put together a quad tree for a homework assignment, similar in function to a binary tree, and I got down to implementing the get() method, where it returned a key's value if the value existed, otherwise it returned null. However, with my given test cases, I keep receiving a nullPointerException, and I can't seem to figure out why. Any and all help is appreciated.  Here's my get() method:  public V get(Coord&lt;X,Y&gt; key) throws IllegalArgumentException {     checkKey(key);     Position&lt;Entry&lt;Coord&lt;X, Y&gt;, V&gt;&gt; p = treeSearch(tree.root(), key);     if(tree.isExternal(p)) { return null; }     return p.getElement().getValue();   }   Now, my homework file says that this should be almost identical to this get method(also in the homework file):  public V get(K key) throws IllegalArgumentException {     checkKey(key);                          // may throw IllegalArgumentException     Position&lt;Entry&lt;K,V&gt;&gt; p = treeSearch(root(), key);     rebalanceAccess(p);                     // hook for balanced tree subclasses     if (isExternal(p)) return null;         // unsuccessful search     return p.getElement().getValue();       // match found   }   with some exceptions for the types.  In the test cases, it makes a temporary tree with random integers as an entry's value, and these:  assertEquals(null, m.get(new Coord&lt;&gt;(0,2))); assertEquals(null, m.get(new Coord&lt;&gt;(-6,-5))); assertEquals((int)3, (int)m.get(new Coord&lt;&gt;(-5,-6))); assertEquals((int)6, (int)m.get(new Coord&lt;&gt;(7,7))); assertEquals((int)0, (int)m.get(new Coord&lt;&gt;(0,0)));   would always return a nullPointerException for my get() method, whereas if used on the example, it would return the key's 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?
Nearby objects won't move independently? Converting FLV to MP4 Using FFMPEG and Preserving the Quality Im trying to use ffmpeg to convert my flv files to mp4 to play them on iOS devices but the converted video has a much worse quality than the original one.  Here is the command i use:  ffmpeg -i input.flv -ar 22050 output.mp4   I would really appreciate if someone could provide me with the best settings for flv to mp4 conversion. Multi armed bandit for general reward distribution I'm working on a multi-armed bandit problem where we do not have any information about the reward distribution.   I have found many papers which guarantee regret bounds for a distribution with known bound, and for general distributions with support in [0,1].   I would like to find out if there is a way to perform well in an environment where the reward distribution does not have any guarantees about its support.  I'm trying to compute a nonparametric tolerance limit and using that number to scale the reward distribution so I can use the algorithm 2 specified on this paper (). Does anyone think this approach will work?  If not, can anyone point me to the right spot?  Thanks a bunch! Rotating hatch labels based on orientation changes in Data Driven Pages Strip maps? I've created a strip map for a linear feature and have it loaded as a data driven page.  I want to show stationing for the line.  The stationing displays properly on the first data driven page but on each subsequent page the stationing labels get messed up as the map orientation changes. I want the stationing labels perpendicular to the linear feature as shown in the first image.  The tick marks seem to rotate and stay perpendicular to the line but the labels won't.  How can I fix this? How to install Opera Browser? I am trying to install opera browser from the terminal.  I downloaded the 'debian' installer because it didn't show up in software center.  It completely destroyed my software center - it is frozen and I have no idea how to fix (I have a different thread for that though).  Can I use this thing called synaptic package manager to install Opera?  or am I stuck with Firefox?    How do I install Opera Browser? ODBC connection to Access database in 64-bit Windows Let $L$ be a finitely generated free module over a commutative ring $A$. Set $n=\operatorname{rank} L$. Let $x_1,\dots,x_m$ be generators of $L$. Then $m \ge n$? If $m = n$, then is $x_1,\dots,x_m$ a basis of $L$? How to wrap text around a figure? Winter 18  does not get values from a parent record Is it possible to make abstract classes in Python? Why can we distinguish different pitches in a chord but not different hues of light? In music, when two or more pitches are played together at the same time, they form a chord. If each pitch has a corresponding wave frequency (a pure, or fundamental, tone), the pitches played together make a , which is obtained by simple addition. This wave is no longer a pure sinusoidal wave.  For example, when you play a low note and a high note on a piano, the resulting sound has a wave that is the mathematical sum of the waves of each note. The same is true for light: when you shine a 500nm wavelength (green light) and a 700nm wavelength (red light) at the same spot on a white surface, the reflection will be a superposition waveform that is the sum of green and red.  My question is about our perception of these combinations. When we hear a chord on a piano, we’re able to discern the pitches that comprise that chord. We’re able to “pick out” that there are two (or three, etc) notes in the chord, and some of us who are musically inclined are even able to sing back each note, and even name it. It could be said that we’re able to decompose a Fourier Series of sound.  But it seems we cannot do this with light. When you shine green and red light together, the reflection appears to be yellow, a “pure hue” of 600nm, rather than an overlay of red and green. We can’t “pick out” the individual colors that were combined. Why is this?  Why can’t we see two hues of light in the same way we’re able to hear two pitches of sound? Is this a characteristic of human psychology? Animal physiology? Or is this due to a fundamental characteristic of electromagnetism? When did UX start being called UX? When did people start talking about User Experience as a role/domain similar to the way that it's used today?  The earliest reference I can find is the Norman, Miller, Henderson CHI 95 piece on Apple's set up (Donald Norman, Jim Miller, Austin Henderson: What You See, Some of What's in the Future, And How We Go About Doing It: HI at Apple Computer. Proceedings of CHI 1995, Denver, Colorado, USA)  Anything earlier?  [Edit - after @Andrew's nice answer we have 1993 as an earlier date     "I invented the term because I thought Human Interface and usability   were too narrow: I wanted to cover all aspects of the person's   experience with a system, including industrial design, graphics, the   interface, the physical interaction, and the manual." - Don Norman   ]  (I'm writing a talk on communities of practice relating to UX - and want to get my time lines right ;-) List files in a specific folder in a document library I there anyway to output the files of a specific folder in a document library?  Listing them will be like   foreach $file in $folder.files {     write-host $file.name }    But how do I tell it to look a specific folder? In CSOM please Tried the below answer but it did not work Script failing with "command not found: ^M" When I try to run the following script in zsh, via the command /bin/zsh ~/.set_color_scheme.sh I get the following error:  command not found: ^M   The script has u+x permissions and it used to work on another machine that also had zsh. Any clues why?   Note: This question is related to  (where I am trying to adapt the script for tcsh)  #!/bin/zsh # Contents of set_color_scheme.sh  export LS_COLORS=$( \ ( grep '\w' | grep -v '^#' | sed 's/#.\+//' | perl -lane 'printf "%s=%s:", shift @F, join ";", @F;' ) &lt;&lt;&lt; "  # HUMAN_FORMATTED_DATA # list one per line  # these are basic filesystem items no 00          # normal fi 00          # file di 01 34       # directory ln 00 36       # link pi 40 33       # pipe so 00 35       # bd 40 33 01 cd 40 33 01 or 01 05 37 41 mi 01 05 37 41 ex 00 91       # executable ow 01 34       # other writables   *.cmd 00 32 *.exe 00 32  # archive, compressed things etc *.gz  00 90 *.bz2 00 90 *.bz  00 90 *.tz  00 90 *.rpm 00 90 *.rar 00 90 *.zip 00 90 *.iso 00 90   *.cpio 00 31    # perl &amp; CODE *.c      33 *.h      33 *.sh     33 *.t      33 *.pm     33 *.pl     33 *.cgi    33 *.pod    33 *.PL     33 *.js     33 *.php    33 #*.xs  # strikethrough *.off 00 9 *.bak 00 9 *.old 00 9   # documents misc, html webstuff # really TEXT *.htm    94 *.html   94 *.txt    94 *.text   94 *.css    94   # MOVIE *.avi    96 *.wmv    96 *.mpeg   96 *.mpg    96 *.mov    96 *.AVI    96 *.WMV    96 *.mkv    96  # images &amp; pdf *.jpg    96 *.jpeg   96 *.png    96 *.xcf    96 *.JPG    96 *.gif    96 *.svg    96 *.eps 00 96 *.pdf 00 96 *.PDF 00 96 *.ps  00 96  *.ai  00 91 # adobe ill *.doc 00 91 # msword   # data, such as .db, .csv *.csv    95 *.dsv    95 *.db     95 *.sql    95 *.meta   95 # CONFS *.xml    95 *.yaml   95 *.yml    95 *.conf   95 # [a-z0-9]*rc ") Proof of the L'Hôpital Rule for $\frac{\infty}{\infty}$ I ask for the proof of the L'Hôpital rule for the indeterminate form $\frac{\infty}{\infty}$ utilizing the rule for the form $\frac{0}{0}$.   Theorem: Let $f,g:(a,b)\to \mathbb{R}$ be two differentiable functions such as that:  $\forall x\in(a,b)\ \ g(x)\neq 0\text{ and }g^{\prime}(x)\neq 0$ and $\lim_{x\to a^+}f(x)=\lim_{x\to a^+}g(x)=+\infty$ If the limit $$\lim_{x\to a^+}\frac{f^{\prime}(x)}{g^{\prime}(x)}$$ exists and is finite, then  $$\lim_{x\to a^+}\frac{f(x)}{g(x)}=\lim_{x\to a^+}\frac{f^{\prime}(x)}{g^{\prime}(x)}$$  My attempt:  Since $\lim_{x\to a^+}f(x)=+\infty$, $$\exists \delta&gt;0:a&lt;x&lt;a+\delta&lt;b\Rightarrow f(x)&gt;0\Rightarrow f(x)\neq 0$$  Let $F,G:(a,a+\delta)\to \mathbb{R}$, $F(x)=\frac{1}{f(x)}$, $G(x)=\frac{1}{g(x)}$. Then by the hypothesis $\lim_{x\to a^+}F(x)=\lim_{x\to a^+}G(x)=0$, $$\forall x\in(a,b)\ \ G(x)\neq 0\text{ and }G^{\prime}(x)=-\frac{1}{g^2(x)}g^{\prime}(x)\neq 0$$ The question is, does the limit $$\lim_{x\to a^+}\frac{F^{\prime}(x)}{G^{\prime}(x)}=\lim_{x\to a^+}\frac{-\frac{1}{f^2(x)}f^{\prime}(x)}{-\frac{1}{g^2(x)}g^{\prime}(X)}=\lim_{x\to a^+}\frac{g^2(x)f^{\prime}(x)}{f^2(x)g^{\prime}(x)}$$ exist?   The limit $$\lim_{x\to a^+}\frac{f^{\prime}(x)}{g^{\prime}(x)}$$ exists by the hypothesis but we don't know if the limit $\displaystyle\lim_{x\to a^+}\frac{g^2(x)}{f^2(x)}$ exists to deduce that the limit $$\lim_{x\to a^+}\frac{F^{\prime}(x)}{G^{\prime}(x)}$$ exists to use the L'Hôpital Rule for the form $\frac{0}{0}$.  EDIT: After discussing it with other users in the site, we came to the conclusion that this proof is only partial and can't logically be continued to yield the Theorem.  As a result, the rule for the $\frac{0}{0}$ form can't be used to proove the rule for the  $\frac{\infty}{\infty}$ form. Mr. Tavares and myself have already given two different proofs (with the pretty much the same main idea) of the Theorem in question using Cauchy's Mean Value Theorem. You can read them below. You can also read the proof Rudin gives for a stronger version of the Theorem (that does not suppose that $\lim_{x\to a^+}f(x)=+\infty$) in his book Principle of Meathematical Analysis. If you have any objections in either proofs please let me know. Thank you. What's in a name: hyperparameters So in a normal distribution, we have two parameters: mean $\mu$ and variance $\sigma^2$. In the book Pattern Recognition and Machine Learning, there suddenly appears a hyperparameter $\lambda$ in the  regularization terms of the error function.  What are hyperparameters? Why are they named as such? And how are they intuitively different from parameters in general? Follow-up to question: Aut(G) for G = Klein 4-group is isomorphic to $S_3$ This is most likely a lack of understanding of wording on my part. I was considerind the Klein 4-group as the set of four permutations: the identity permutation, and three other permutations of four elements, where each of those is made up of two transposes, (i.e., 1 $\rightarrow$ 2, 2 $\rightarrow$ 1 and 3 $\rightarrow$ 4, 4 $\rightarrow$ 3) taken over the three possible such combinations of four elements.  Here, then, is my question. I am assuming (?) that Aut(G) in this case is the set of permutations of the four elements of the Klein 4-group - or the three non-identity ones for the purpose of showing isomorphic to $S_3$. If this is the case, what does it mean to have a permutation of these three permutations that I mentioned above? As always, thanks for your help. Prove that $\left (\frac{a^2 + b^2 +c^2}{a+b+c} \right) ^ {(a+b+c)} > a^a b^b c^c$ Prove that $\left (\dfrac{a^2 + b^2 +c^2}{a+b+c} \right) ^ {(a+b+c)} &gt; a^a b^b c^c$ if $a$, $b$ and $c$ are distinct natural numbers.  Is it possible using induction? How to enable Hyper-V in Windows 8 I've got a Windows 8 (not .1, not Pro; OEM with a Lenovo Z580 laptop), which I want to use for WP8 development.  I've read  and , and a few more articles.  I have enabled in BIOS what looks like it has to do with hardware virtualisation - "Intel Virtual Technology" (is this VMX?). No signs of EPT or XD.  I've got the four Hyper-V items in the enumeration that msinfo32 shows.  However, in the 'Control Panel/Programs and Features/Turn on|off windows features' list, I don't have Hyper-V.  Is this available at all on my machine, and if not what can I do to get it working?  Thanks in advance. What are the best JVM settings you have found for running Eclipse?