What am I missing in my JUNIT test?
What is a NullPointerException, and how do I fix it?
Initial capitalization of foreign surnames when starting a sentence I would like to create an alias to rm command in order to have a confirmation message after executing this command. So I am creating an alias like this alias rm='rm -i'. But as far as I know this is a temporary alias and it lives until you close the terminal.  As it is explained  to save alias permanently I need to execute ~/.bash_aliases or ~/.bashrc commands in terminal and add my alias there. But when I execute ~/.bashrc I get following error message :  bash: /home/bakhtiyor/.bashrc: Permission denied   When I run ~/.bash_aliases I get another error message like this:  bash: /home/bakhtiyor/.bash_aliases: File or directory doesn't exist.   What is the actual problem and how can I solve it? What are the options for player characters to create traps? In a Feistel cipher structure, what exactly does the "round function $F$" do? In a Feistel cipher structure, what exactly does the "round function $F$" do to the right half of the data, before taking XOR of the output with the left half of the data? How much hard drive space do I need to install Windows 7 on my Mac via Boot Camp? I have a Macbook Air and would like to install Windows 7 on it via Boot Camp. How much hard drive space should I make sure to have free before doing this? How to type en-dash and em-dash in Windows 7/8? I write blog posts, and I often need to type en-dash (–) and sometimes em-dash (—) in my blog posts. Currently I keep these characters saved in a text file, and copy-paste them whenever I need them. Unnecessary to say, it is a headache to move between keyboard and mouse when you type large texts.  It would be better for me if there ware a keyboard shortcuts available for these two characters. Is there a way to type en-dash and em-dash in Windows? I use Windows 7 and Windows 8 in different computers.    Here's an aligned comparison of dashes, if you need to see the difference for some reason.   Here's-dash Here's–en-dash Here's—em-dash Can a Muggle inadvertently create a horcrux-like object? I think that we have it well-established (regardless of whether or not one sees this as flawed logic) that Harry is not a Horcrux.  A Horcrux has to be made intentionally, and the recipient is cursed and classified as an "evil object," etc.  Neither of which is true for Harry - so, as stated by JKR herself, Harry is not a Horcrux as such.  But the fact remains that murder can, in fact, accidentally create something that shares a key property of the Horcrux: the soul splits, attaches itself to the nearest recipient, and lingers inside.  As it does in Harry's case.  So my question is: is this only true for wizards?  A Muggle cannot utilize a spell to create a Horcrux.  But, if a Horcrux-like object / being can be created accidentally through murder without intentional Horcrux-creating spells, can this also happen in the case of a Muggle committing murder?    Can a Muggle commit murder, have their soul split, and have the piece of the soul inadvertently attach itself to something nearby without any Horcrux-creating spell being cast? Up until now, I implemented all-against-all collision detection in my games. It worked fine.  But I reached a point where implementing this kind of collision detection, makes the game run poorly, because there are two many objects to iterate through and check for collision.  I have searched this site and found something about 'uniform grids'. But I didn't completely understand what it is and how to implement it. Tried to Google it but nothing easy enough to understand came up.  I am a beginner to 2D-game programming. Do you mind trying to explain to uniform-grids, or link me to some good tutorial?  Thanks a lot Transformations from n-sphere coordinates to cartesian coordinates. I was wondering how one would proceed to convert between coordinate systems in $ \mathbb R^n $.  For $ \mathbb R^2 $ the conversion is easy and just basic trigonometry. Given $(r, \theta)$ we can convert these polar coordinates to cartesian coordinates to $(x=r\cos\theta, y=r\sin\theta)$  The same follows for $ \mathbb R^3 $. Given $(r,\theta_1,\theta_2)$ in spherical coordinates we can convert the spherical coordinates to cartesian coordinates with the following transformation $(x=r\cos\theta_2\cos\theta_1,y=r\cos\theta_2\sin\theta_1, z=r\sin\theta_2)$, just so my point of reference is clear:$\theta_1$is the angle lying in the x-y plane, and  $\theta_2$ is the angle the vector makes with the x-y plane.  So what about for four dimensions and up? For the sake of simplicity we can define the n-sphere vector as $(r,\theta_1,\theta_2,...,\theta_n)$ and the cartesian vectors $(x_1,x_2,...,x_n)$ and maintain the same reference of $\theta_1,\theta_2$ as before.  How do we define a transformation in $ \mathbb R^4 $?  A look into this wikipedia page under the  gave me something that I don't believe is quite right.  As according to the section  $(x_1=r\cos\theta_1,x_2=r\sin\theta_1 \cos\theta_2,x_3=\sin\theta_1 \sin\theta_2\cos\theta_3,...)$ which is already in contradiction to my statement about $ \mathbb R^3$ transformations.   What is the general transformation rule? Am I missing something that I should know from linear algebra that I might be forgetting because my linear algebra is rusty? If so, please let me know what I should review or point me in the right direction. try+gerund/infinitive (Difference in meaning) I tried to open the door. I tried opening the door   We can use both infinitive and gerund with verb "try" as used in above sentences. Does it change the meaning of the  sentence if use gerund or infinitive?.(here i don't know if the meaning of sentences is changed.)     The same confusion arise in these two sentences.  1.I stopped seeing him. 2. I stopped to see him.(But in case of these two sentence i know the meaning is changed but don't know exactly what the change is). Windows 8 removes Grub as default boot manager I have a Sony VAIO S series with Windows 8 preinstalled, and I installed Ubuntu 12.10 on a new partition. When the PC boots Grub is display, and I can choose between Windows 8 (didn't worked at the beginning, had to change Grub settings) and Ubuntu 12.10. When I select Ubuntu 12.10 everything is OK, but when I use Windows 8, and I restart Grub isn't displayed anymore (Windows 8 boots immediately).  I booted a Ubuntu 12.10 LiveUSB, used efibootmgr, and found out that Windows 8 (each time it boots) changes EFI default bootloader from Grub to Windows Boot Manager.  How do I change this in Windows 8? I read something about bcdedit, but it does not work or I don't know how to use it... Bounds of $I=\int_0^1\frac{\sin x}{\sqrt x}$ and $J=\int_0^1\frac{\cos x}{\sqrt x}$? How to find bounds of $$I=\int_0^1\frac{\sin x}{\sqrt x}$$ and $$J=\int_0^1\frac{\cos x}{\sqrt x}$$     A) $I&gt;2/3$ and $J&gt;2$   B) $I&lt;2/3$ and $J&gt;2$   C) $I&gt;2/3$ and $J&lt;2$   D) $I&lt;2/3$ and $J&lt;2$ I have a long running BASH script that I am running under CYGWIN on Windows.  I would like to limit the script to run for 30 seconds, and automatically terminate if it exceeds this limit. Ideally, I'd like to be able to do this to any command.  For example:  sh-3.2$ limittime -t 30 'myscript.sh'   or   sh-3.2$ limittime -t 30 'grep func *.c'   Under cygwin the ulimit command doesn't seem to work.   I am open to any ideas. Update query cancelled by user It seems that through various related questions here, there is consensus that the "95%" part of what we call a "95% confidence interval" refers to the fact that if we were to exactly replicate our sampling and CI-computation procedures  many times, 95% of thusly computed CIs would contain the population mean. It also seems to be the consensus that this definition does not permit one to conclude from a single 95%CI that there is a 95% chance that the mean falls somewhere within the CI. However, I don't understand how the former doesn't imply the latter insofar as, having imagined many CIs 95% of which contain the population mean, shouldn't our uncertainty (with regards to whether our actually-computed CI contains the population mean or not) force us to use the base-rate of the imagined cases (95%) as our estimate of the probability that our actual case contains the CI?   I've seen posts argue along the lines of "the actually-computed CI either contains the population mean or it doesn't, so its probability is either 1 or 0", but this seems to imply a strange definition of probability that is dependent on unknown states (i.e. a friend flips fair coin, hides the result, and I am disallowed from saying there is a 50% chance that it's heads).  Surely I'm wrong, but I don't see where my logic has gone awry... Cardioid in coffee mug? See my edit below, this is not totally a duplicate of   My reverse-search function in the CLI is broken and I don't know how to fix it back...  When I hit ctrl+r and search a command I did earlier, find it then press the right arrow key to use it, the output is broken. Here is an example:  # I reverse-searched the word "test" then pressed right arrow yoshiji@x1carbon:~/path/to/git/folder (master) $ch)`test': rake test #                                              ^^^^^^^^^^ weird output #                                                     ^ cursor right there   It also "shifts" my cursor to a different position. If I press enter, the right command is executed (rake test in this case) so it means the text displayed is not the same as what is actually executed.  I know this is most-likely related to my PS1 export in my ~/.bashrc, so here are the last lines of this file:  # Git branch in prompt. git_branch() {   branch=$(__git_ps1 2&gt; /dev/null)   if [ "$branch" = " (master)" ]; then      echo -e "\033[33m${branch}\033[00m" # yellow   elif [ "$branch" = "" ]; then      echo -e "\033[90m (no git)\033[00m" # red   else      echo -e "\033[32m${branch}\033[00m" # green   fi } PS1='\u@\h:\w$(git_branch) \$ '   This is something I wrote to displays the git branch in orange (if master branch) or else in green (or no git in gray).  Do you guys have any idea on what is causing this weird behavior?    Edit: This is a different problem from the  in the way that I am using echo -e "some string" to return a string having color+name of the git branch from the function git_branch(). Using echo -e does not escape the characters \[ and \] (try it yourself in your CLI: echo -e "\[\033[33m\]test").  Ideally, I would like to keep those conditional colors based on the branch's presence &amp; name (gray if no branch, orange if master, else green). Why was the alien threat in The Next Generation episode "Conspiracy" never followed up? In the Star Trek The Next Generation episode  Picard and crew are drawn into an alien conspiracy to take over the Federation. This ends with Picard and Riker destroying an alien "mother" beast, but not before it manages to send a signal to an uncharted sector of space. The feeling at the end of the episode is that this will be a threat that the intrepid crew of the Enterprise would be facing again at some point, but this never happens.   Why was the implied threat at the end of this episode never brought up again on the show? In Android, is it possible to block apps from accessing the Internet? Many apps will often connect to remote servers in the background, including Google's own apps or system services. Over time this can eat away at a user's data limit set by a mobile carrier. Does Android allow an app to act as a firewall whereby the user can select which apps have access to the Internet? Or does the device have to be rooted to have that ability? I have some kind of test data and want to create a unit test for each item. My first idea was to do it like this: import unittest  l = [[&quot;foo&quot;, &quot;a&quot;, &quot;a&quot;,], [&quot;bar&quot;, &quot;a&quot;, &quot;b&quot;], [&quot;lee&quot;, &quot;b&quot;, &quot;b&quot;]]  class TestSequence(unittest.TestCase):     def testsample(self):         for name, a,b in l:             print &quot;test&quot;, name             self.assertEqual(a,b)  if __name__ == '__main__':     unittest.main()  The downside of this is that it handles all data in one test. I would like to generate one test for each item on the fly. Any suggestions?