A circular field encloses maximal area for minimal perimeter
Why does a circle enclose the largest area?
If I have an IEnumerable like:  string[] items = new string[] { "a", "b", "c", "d" };   I would like to loop thru all the pairs of consecutive items (sliding window of size 2). Which would be   ("a","b"), ("b", "c"), ("c", "d")   My solution was is this       public static IEnumerable&lt;Pair&lt;T, T&gt;&gt; Pairs(IEnumerable&lt;T&gt; enumerable) {         IEnumerator&lt;T&gt; e = enumerable.GetEnumerator(); e.MoveNext();         T current = e.Current;         while ( e.MoveNext() ) {             T next = e.Current;             yield return new Pair&lt;T, T&gt;(current, next);             current = next;         }     }   // used like this :  foreach (Pair&lt;String,String&gt; pair in IterTools&lt;String&gt;.Pairs(items)) {     System.Out.PrintLine("{0}, {1}", pair.First, pair.Second)  }   When I wrote this code, I wondered if there are already functions in the .NET framework that do the same thing and do it not just for pairs but for any size tuples.  IMHO there should be a nice way to do this kind of sliding window operations.  I use C# 2.0 and I can imagine that with C# 3.0 (w/ LINQ) there are more (and nicer) ways to do this, but I'm primarily interested in C# 2.0 solutions. Though, I will also appreciate C# 3.0 solutions. What does negative R-squared mean? Let's say I have some data, and then I fit the data with a model (a non-linear regression). Then I calculate the R-squared ($R^2$).  When R-squared is negative, what does that mean? Does that mean my model is bad? I know the range of $R^2$ can be [-1,1]. When $R^2$ is 0, what does that mean as well? Book set in contemporary times about a travel writer who is inducted into the world of the supernatural Convert string to Title Case with JavaScript How to avoid returning a Null if there is no "else" condition in an If construct dpkg: error: dpkg status database is locked by another process Newton's third law does not apply to the kinetic energy formula? Here is a classic problem:     A 60kg boy and a 40kg girl are sitting in front of each other on skateboards on a frictionless horizontal surface. The boy pushes the girl and the girl gains a velocity of 0.3m/s during the 0.5s the boys hand was in contact with her. What is the boy's resulting velocity?   Considering Newton's Third Law, the best way is to find the total force applied and rearrange the formula to find the boy's speed.  Newton's Law Method:  $F = m*a$  $a=\frac{0.3m/s}{0.5s}$  $F = 40kg * 0.6m/s^2$  $F = 24N$  Therefore the boy's speed will be:   $\frac{24N}{60kg} = a$  $a = 0.4m/s^2$  $v = 0.4m/s^2 * 0.5s$  $v = 0.2m/s$  Kinetic Energy Method:  $E_{k}=\frac{1}{2}*m*v^2$ the girl's kinetic energy  $E_{k}=\frac{1}{2}*40kg*(0.3m/s)^2$  $E_{k}=1.8J$  Since every action has an equal and opposite reaction the boy should have the same amount of kinetic energy.  $E_{k}=\frac{1}{2}*60kg*(0.2m/s)^2$  $E_{k}=1.2J$  As you can see, using Newton's Third Law, the kinetic energy was not the same. So what's going on here? I thought that in this case they should both have the same amount of kinetic energy due to Newton's Law. I must be missing something since there is more energy going in one direction than the other after meeting. My book used the first method as the answer and, well, it feels wrong. I want to appropriate line segments that share the same geometry with a particular line width and labels based on the aggregated values of one field "GIS@BUS_5_Min".  My attribute table and polyline objects look as following, see image below   "BUSLINIE" means a bus line, "Overlap" means if the line has overlaps, i.e. it's geometry repeats.  Values of the field "GIS@BUS_5_Min" for these three objects has to be aggregated as one value and represented as a label sum("GIS@BUS_5_Min").  And the width of this line (selected in yellow) will be sum("GIS@BUS_5_Min")/100 = 19.10/100 = 0.1910  How can I achieve such output?  I assume it is possible with Layer Properties &gt; Width &gt; Data defined override &gt; Edit..., but I do not know how to check the same geometry and how to sum the values of certain features with CASE WHEN condition THEN result END conditional function?  Dissolve function does not work in my case because I do not have any key-fields.    References: I am married to a UK citizen. What type of visa do I need to travel to the UK for tourism? I am a Bangladeshi citizen married with my husband who is a British citizen by birth. Currently, we both live in Bangladesh and my husband works at a university. We, are planning to visit UK for about 3 weeks. Just to be clear, we have no intention to settle down in the UK.  Do I need to apply for a visa? If so, then what type of visa should I apply for?  N.B. I've been searching on the internet (including the UK border agency website) for hours now but couldn't get a definite answer. When Frodo put on the One Ring, both the Nazgul and Sauron himself found Frodo. However when Bilbo had the ring and possibly used it many times, Sauron sought Gollum to get a hint on where to look for the ring and send the Nazgul after it.   Sauron sought Gollum before Bilbo wore the ring at his birthday party, slightly after that time, he was very effective at locating Frodo when Frodo put on the ring. So I guess it's not a matter of Sauron gaining any extra powers with time.  Also Bilbo seemed to use the ring without it bothering him at any point, unlike Frodo who seemed to be very troubled when using the ring. How is that possible? Omission of verbs This following sentence is puzzling me. Neither can I understand the meaning, nor can I reason the grammatical soundness of the sentence.     Some symbols acquire a multitude of meanings, some widely shared, others personal, some contradictory, conflicted, or ambivalent.   Please help understand the meaning and grammatical explanation. I have designed a VF page to create a new record in which I am trying to display the value of a pick-list field. I have set a default value for this pick-list field. When trying to create the record using the salesforce native page, the value with which pick-list loads is the one I set as default but when creating the same record using VF page, the pick-list loads with "--None--" as default value.  Can anyone suggest If this is salesforce related bug or Am I doing anything wrong ? I want to make an arena where mobs will fight each other and a player can bet on one side or the other. For example: There are 2 skeletons in dyed armor; red and blue. Each color representing a team. When they spawn I want them to fight each and then when one dies I want it to announce which team is the winner and give the player the "money" due. I'm just not sure how to get the skeletons to attack each other without a player instigating it. What is the purpose of the first test in an inductive proof? Learning about proof by induction, I take it that the first step is always something like "test if the proposition holds for $n = \textrm{[the minimum value]}$"  Like this:       Prove that $1+2+3+...+n = \frac{n(n + 1)}{2}$ for all $n \ge 1$.   Test it for $n = 1$:  $$n = \frac{n(n + 1)}{2} \implies 1 = \frac{2}{2}\textrm{, which holds.}$$  * The rest of the proof goes here *    So, I do it all the time (like a standard). But I never really thought about why. Why do I do such test? I can see that if the test does not hold, it cannot be proven by induction, I guess. But is there another reason we do this? We were discussing Kirchoff's theorem on blackbody radiation in class today and the equation was: $$e_{f}= J(f,T)$$  $e_f$ was defined as power per unit area per unit frequency. What does per unit frequency refer to here? I know what per unit time means but don't understand 'per unit frequency'. Irreducible cyclotomic polynomial Edelstein Theorem Let $(M,d)$ be a compact metric space and $d(f(x),f(y)) &lt; d(x,y) $ for all $ x\neq y$ Prove that if $f$ is a continuous fuction then there is a unique $x_0 \in M $ such that $f(x_0)=x_0$ I know that since $g(x) = d((f(x),f(y))$ is continuous then a continuous function in a compact space reaches its maximum and minimum. Then by proving that the minimum of $g(x)$ = 0 can I conclude that $x_0$ is a fixed point? Paying off student loan or using that money for a downpayment on a house Poisson / exponential distribution Next weekend you will be participating in 12km cross country race on a mountain.The average time between  two successive wild animal sightings on the mountain is reported to be 5 minutes  (a) What is the probability that you see at least one wild animal in the 11th minute of the     race given that you will see 3 wild animals since the start of the race?  (b) What is the probability that it will take more than a quarter of a hour before you see a wild animal after ten minutes of running?  Now I have attempted (a) , but I don't know whether my thinking is correct. (b) on the other hand makes little sense to me.  My attempt:  (a)$ X~ Poisson(\frac{1}{5})$ and $Y~Exponential(\frac{1}{5})$  $Pr(X&gt;4) = Pr(X&gt;1)$  (I am thinking that this is some variation of the memoryless property)  $Pr(X&gt;1) =Pr(Y&lt;1)$  $Pr(Y&lt;1)= 1 - (e^{(\frac{-1}{5})})$  Perhaps, I was a bit to vague in my attempt of (a). So here goes my attempt of(b).From my understanding of the question , it is asking what it the probability that the time between events(in this case animal sightings) is more than 25 minutes given you have been running for ten minutes  Now from what I know the fact that you have been running ten minutes is irrelevant this is due to memory-less property of the exponential  distribution   so without further ado  I present my attempt at (b)   let $X $ be exponentially distributed random variable with $\lambda = 1/5$  then  $Pr(X &gt;15) = 1 - Pr(X &lt;= 15)$ Capitalize and punctuate "let us continue this discussion in chat" Stack Exchange has a feature to help move extended discussions out of comments and into chat, but when you use it, it automatically writes the following message for you:  let us   Could we get the orthography fixed?  I'd like it to read:  Let us .  That's a capital letter at the beginning and a period at the end.