Regular expression to match a word or its prefix
Regex match entire words only
Is there any utility which will read a photo's date and time from its EXIF data and embed it into the corner of the photo? From a collection of short stories I read at least 30 years ago. :/  This is going to be incredibly vague, so apologies in advance.  A human and alien (blob/octopus-like...I think) from warring races are captured by an unidentified higher intelligence and put in an enclosure (more like a zoo habitat rather than a prison cell). They are separated by an invisible barrier and can see each other.  I think they were both trying to escape or trying to figure out how they could kill the other first. There was a bulldozer/loader type vehicle they could use at one point to build a shelter (or something).  I believe they were crafting makeshift weapons as well. There was no communication between the two as far as I remember.  The main tension in the story seemed to be was the race to get to the other first.  This has been stuck in my head forever. I know its a very common theme.  The short stories may have included Asimov. Alternating sum of binomial coefficients: given $n \in \mathbb N$, prove $\sum^n_{k=0}(-1)^k {n \choose k} = 0$ Let $n$ be a positive integer. Prove that   \begin{align} \sum_{k=0}^n \left(-1\right)^k \binom{n}{k} = 0 . \end{align}   I tried to solve it using induction, but that got me nowhere. I think the easiest way to prove it is to think of a finite set of $n$ elements, but I can't find the solution. Should I get Enlightened badge? Today I've got 10 upvotes for an answer. Answer was a first answer in the question. I got an Nice Answer badge for this, but no Enlightened badge.  Shouldn't I get both?  is my answer :) Find number of files with a specific extension, in all subdirectories Is there a way to find the number of files of a specific type without having to loop through all results inn a Directory.GetFiles() or similar method? I am looking for something like this:  int ComponentCount = MagicFindFileCount(@"c:\windows\system32", "*.dll");   I know that I can make a recursive function to call Directory.GetFiles , but it would be much cleaner if I could do this without all the iterating.  EDIT: If it is not possible to do this without recursing and iterating yourself, what would be the best way to do it? When to use “that” and when to use “which”, especially in relative clauses Find the limit of $\log\Big(\frac{(n^2+n)!}{n^2!n^{2n}}\Big)$ I have to prove that      $$\Big[\log\Big(1+\frac 1{n^2}\Big)+ \log\Big(1+\frac 2{n^2}\Big)+...+ \log\Big(1+\frac n{n^2}\Big)\Big] \to \frac 12$$   I know that $$\log\Big(1+\frac 1{n^2}\Big)+ \log\Big(1+\frac 2{n^2}\Big)+...+ \log\Big(1+\frac n{n^2}\Big)= \\ =\log\Big(\frac {n^2+1}{n^2}\Big)+ \log\Big(\frac {n^2+2}{n^2}\Big)+...+ \log\Big(\frac {n^2+n}{n^2}\Big)=\\ =\log\Big(n^2+1\Big)+ \log\Big(n^2+2\Big)+...+ \log\Big(n^2+n\Big)-2n\log n$$  Doing some manipulation we get:           $$\lim_{n \to +\infty}\log\Big(\frac{(n^2+n)!}{n^2!n^{2n}}\Big)=\frac 12$$      How can I prove this limit? When thinking about travelling, I often have to think about a place to visit, and then look up visa rules for that particular country. This can be a fairly painful process because official government sites can often be hard to find, and advice on (say) guidebooks or Wikitravel tends to be generic.  Is there any resource where I can enter my nationality/residency, and then look up a list of visa rules for various countries? Density of Solid States of Compounds One of the wonderful properties of water (as my high school biology teacher would say) is that in its solid form, it is lighter than its liquid form. This means that when temperatures drop below 0 degrees Celsius, the top layer of water on, say, a lake freezes first. This works out pretty well for any fish or other aquatic creatures living underneath, because the lower layers of water will not freeze.  I know that this is an exception to the general rule of solid and liquid states: A given substance, when transformed into its solid state, will generally sink in a container of its liquid state. My question is this: What other substances are exceptions to this rule (if any?). What features do they share with water that are responsible for this? What Is the Difference Between Wizard and Warlock in Potterverse? One of Dumbledore's titles is "Chief Warlock of the Wizengamot".   What is the difference between a Wizard and a Warlock in Potterverse? As we don't see the term Warlock used often in the books, my impression is that a Warlock is somehow officially different from a Wizard.  Please no Wikipedia, HP Wikia, or dictionary.com answers. I'm looking for a canon-based&#185; explanation.  &#185;Any of the ten HP books or a quote from JKR “It can be very cold…” vs “It may be very cold…” It can be very cold in winters.   It may be very cold in winters.   What is the difference between these two sentences?  People say when may is used then it means that it may be cold in winters or it may not be cold in winters. In other words, may means 'not sure'.  So does that mean if can is used then it is 100% sure that it will be cold in winters? How map multiple inputText to an array property? I am using a chi-sq test between two proportions (). I am using this over the z-test for proportions because I do not think my data is normal.   My question is how do I get the difference (shift) estimate &amp; confidence intervals for this test.   For example,     Data1: 193/252=.77   Data2: 154/227=.68   P-value=.032 (I used the formula in the link above. I will also add my exact code below)  Shift Estimate: I assume its the difference between proportions, ie .77-.68=.09. Is this correct?   Confidence Interval: ??????????????????  Code for generating P-value (matlab):   % Pooled estimate of proportion  p0 = (n1+n2) / (N1+N2); % Expected counts under H0 (null hypothesis)  n10 = N1 * p0;  n20 = N2 * p0; % Chi-square test, by hand  observed = [n1 N1-n1 n2 N2-n2];  expected = [n10 N1-n10 n20 N2-n20];  chi2stat = sum((observed-expected).^2 ./ expected);  p = 1 - chi2cdf(chi2stat,1);  H=0; if(p&lt;.05), H=1; end Show $\inf_f\int_0^1|f'(x)-f(x)|dx=1/e$ for continuously differentiable functions with $f(0)=0$, $f(1)=1$. Wheel going badly out of true on final tightening On two occasions (same wheel, loosened everything off and re-did the whole thing after the first time) as I've applied a final half turn to tighten the spokes round the wheel it's gone from being pretty laterally true (within about 0.5 mm) to badly out of true (probably a couple of mm or more out).  The simplest explanation would be that I've managed to mess up by missing spokes/over under-tightening some of them, but I'm fairly sure that's not the case.  What else could cause this?  This is a rear wheel with a fair amount of dish. I'm worried that I might be over-tightening. On both occasions I decided to do a final half turn as the non drive side seemed a little loose, but I was concerned the drive side might be over tight. Could this cause a sudden change in trueness?  I've got the wheel back to a reasonable state, but I'm no longer sure I have even tension in the spokes. I have just bought a Nikon 50mm f/1.8D prime lens.  I took this picture (leg of my glasses frame on a mouse, and a LED desk lamp is on top of it) : f1.8, 1/80s, ISO 200   The purple fringing is right in the middle of the picture. Does it happen very often to this lens? How to call drupal_bootstrap from custom file in subfolder? I'm trying to call drupal_bootstrap from 'temp.php' in a subfolder called 'custom' my code as follow:  chdir('../'); define('DRUPAL_ROOT', getcwd()); require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);   Once I call the temp.php I get Drupal homepage.   I also tried an explicit physical path but with no use, code as follow:  define('DRUPAL_ROOT', '/var/htdocs/drupal7'); require_once '../includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);   temp.php located under the following folder structure:  - var -- htdocs --- drupal7 ---- custom  ----- temp.php Explicit formulas for Stirling numbers of second kind I have seen some recursive formulas for Stirling I and II kind but I am especially interested in explicit formulas.  I was thinking and get: $$ \left\{ {m \atop n} \right\} =  \sum_{k_i&gt;0 \wedge k_1+k_2+...+k_n = m} \frac{m!}{n!}\cdot \frac{1}{k_1! \cdot k_2! \cdot ... \cdot k_n!}$$ I am not sure if it is ok but supposedly it is (I created it with combinatorics interpretation)  Can somebody look at that and tell me if it is ok/wrong?  By the way,if you have some nice formulas, I will be grateful for sharing that. Trying to hide spam/offensive deletions on user profiles announces them I am compiling a program which requires boost-thread-mt library. I have installed libboost-all-dev using sudo apt-get install libboost-all-dev but compiler says that it cannot find boost-thread-mt library. Is this library in some other package? Please guide me what i need to install for this.