Split a string, two words at a time
Java. Splitting a multiple word string into two word strings every space
As, the above link shows, other countries have similar murder rates but they are not in the radar of international travelers.  For example, as seen in the list, Puerto Rico has similar statistics. But, personally, I never heard of Puerto Rico to be a dangerous place to travel.  Why is it considered so dangerous to travel in South Africa? Is that due to the incompetent law enforcement agencies? I saw a video of Johann Cruyff , isn't that against the rules? Changing plurality in parentheses If a set of parentheses lies between a subject and its verb, and the parentheses contain an substitutive subject whose singularity/plurality disagrees with the original subject, whose singularity/plurality should be chosen for the verb?  In other words, in the following example, should "questions" (and its verb "are") be singular, or should they remain plural as shown?     Many (if not every) questions on this StackExchange are answered.   My intuition tells me that the two words in question should remain in plural forms, since the text in parentheses only interrupts the sentence (and the sentence would be grammatically incorrect if everything in parentheses were removed and the words were in singular form).  On the other hand, when read aloud (assuming one reads the text in parentheses), this has an uncomfortable sound to it, and I've seen others write in what would be the above example's singular-form case, so I'm curious to find out which is correct.  And, thinking about it, I suppose the same question would apply when commas are used in place of parentheses. Why are real symmetric matrices diagonalizable? The meaning of Bit-wise NOT in Python Does it make sense to use a date variable in a regression? I'm not used to using variables in the date format in R. I'm just wondering if it is possible to add a date variable as an explanatory variable in a linear regression model. If it's possible, how can we interpret the coefficient? Is it the effect of one day on the outcome variable?   See my  with an example what I'm trying to do. How to get dialog box input directed to a variable? I have been teaching myself bash scripting and have run into an issue. I have written a script to take input from the user, using the 'read' command, and make that input a variable to use later in the script. The script works, but....  I would like to be able to get it setup using 'dialog'. I found out that  'dialog --inputbox' will direct the output to 'stderr' and in order to get that input as a variable you have to direct it to a file and then retrieve it. The code I found to explain this is:  #!/bin/bash dialog --inputbox \  "What is your username?" 0 0 2&gt; /tmp/inputbox.tmp.$$  retval=$?  input=`cat /tmp/inputbox.tmp.$$`  rm -f /tmp/inputbox.tmp.$$  case $retval in 0)  echo "Your username is '$input'";; 1)  echo "Cancel pressed.";;  esac   I see that it is sending the sdterr to the /tmp/inputbox.tmp.$$ with 2>, but the output file looks like 'inputbox.tmp.21661'. When I try and cat the file it gives me an error. So I am still unable to get the user input from the --inputbox as a variable.   Example Script:   echo "  What app would you like to remove? "  read dead_app  sudo apt-get remove --purge $dead_app   So as you can see it is a basic script. Is it even possible to get the variable as a word from dialog --inputbox? Construction of "it's too hard a task" Automatically capitalise the first word in each sentence Why does adding red light with blue light give purple light? Let $a$ and $b$ be two integers such that $\left(a,b\right) = 1$. Prove that $\left(a+b, ab\right) = 1$.   $(a,b)=1$ means $a$ and $b$ have no prime factors in common  $ab$ is simply the product of factors of $a$ and factors of $b$.  Let's say $k\mid a+b$ where $k$ is some factor of $a$.  Then $ka=a+b$ and $ka-a=b$ and $a(k-l)=b$.  So $a(k-l)=b, \  a\mid a(k-1)$ [$a$ divides the left hand side] therefore $a\mid b$ [the right hand side].  But $(a,b)=1$ so $a$ cannot divide $b$.  We have a similar argument for $b$.  So $a+b$ is not divisible by any factors of $ab$.  Therefore, $(a+b, ab)=1$.  Would this be correct? Am I missing anything? Error When Create Drupal Commerce Product Display I need to upload my signature in a PDF document, but I do not know how to edit the background of this image.   I wish to remove the bluish-tint background, and make it pure white.   Can anyone help me with this, please? Can we please hold the hats? I really like the hats game. But I would love to keep the hats longer then only one winter. I want to leave them in my wardrobe during summer. Last year, I collected some cool hats, and I apparently lost them during summer.  Maybe we could make a system that allows hats to last for about 2 or 3 years, so we don't have to start over each winter. Or even specify per type of hat a number of years they last? Very very rare hats could last for ever.  I asked this, simply because I love hats! :D Check for missing fonts/characters in XeLaTeX? JavaScript OR (||) variable assignment explanation I read a short story (I think, but it might have been a novel), where most races discover a very easy way to travel faster than light at a certain point in their technological development.   What I remember:   The guys in wooden ships bounced around subjugating the people without FTL travel. Earth had never figured out the FTL, and so had poured its effort in a different path, achieving present day technology. The aliens were freaking out about handing the humans FTL travel. The story was told from the point of view of the aliens. I read it in the last 10 years, but there is no telling how old it actually was, although I do remember them mentioning F-18s or F-14s. Print total free memory from `free -m` free -m currently puts out something like this.     I would like to know using grep/awk how we can get the total free amount. i.e. 9083 How to get glare on "Quick Smoke" (Fire & Smoke explosion) Is there a public API for Stack Overflow?