Formula for finding area for all polygons
Area of an irregular polygon
Return multiple values from a SQL Server function How would I return multiple values (say, a number and a string) from a user-defined function in SQL Server? I can type:  dirname ~/home/blah/file.zip   for instance, and this works fine alone, but when I use this syntax as the parameter for some command it always reads 'dirname' as the desired directory. i.e.:  cd dirname ~/home/blah/file.zip bash: cd: dirname: No such file or directory   Basically, how do I get 'dirname file' to be read as one entity? I'd like to write something in the shape of this "coat of arms".    I'd like to have the text filling the coat but with a hole roughly in the shape of the sword. I know there is the \shapepar command to create paragraph shapes so I tried to , a patch for XFig that allows you to draw the shape you want but it never worked on my computer (Mac OS X). I also know I can build the shape by myself with shapepar syntax but it seems really complicated and I don't think I'll make a lot of shapes. So if anybody has ShapePatch working on his computer or knows shapepar syntax very well, could he give me the code? I have a little problem with the placement of my picture. I want to insert it at the end of the introduction chapter but its place is not where I want.   I think the problem become from the:  \begin{figure} ... \end{figure}   Because when I insert the picture without using \begin{figure}... the picture is at the end of the chapter as I want.   Look the picture below. Finite subgroups of the multiplicative group of a field are cyclic In Grove's book Algebra, Proposition 3.7 at page 94 is the following     If $G$ is a finite subgroup of the multiplicative group $F^*$ of a field $F$,   then $G$ is cyclic.   He starts the proof by saying "Since $G$ is the direct product of its Sylow subgroups ...". But this is only true if the Sylow subgroups of $G$ are all normal. How do we know this? What Is the Real Name of the #? I used to say "sharp sign" to refer to the # sign.   Today a friend told me that the correct term is number sign or hash sign or even just hash.  What is the difference between these options and what's the correct usage of the names for this sign? Let $A$ be a ring with $0 \neq 1 $, which has $2^n-1$ invertible elements and less non-invertible elements. Prove that $A$ is a field. How to check if an object is nullable? How do I check if a given object is nullable in other words how to implement the following method... bool IsNullableValueType(object o) {     ... }  I am looking for nullable value types. I didn't have reference types in mind. //Note: This is just a sample. The code has been simplified  //to fit in a post.  public class BoolContainer {     bool? myBool = true; }  var bc = new BoolContainer();  const BindingFlags bindingFlags = BindingFlags.Public                         | BindingFlags.NonPublic                         | BindingFlags.Instance                         ;   object obj; object o = (object)bc;  foreach (var fieldInfo in o.GetType().GetFields(bindingFlags)) {     obj = (object)fieldInfo.GetValue(o); }  obj now refers to an object of type bool (System.Boolean) with value equal to true. What I really wanted was an object of type Nullable&lt;bool&gt; So now as a work around I decided to check if o is nullable and create a nullable wrapper around obj. Why is this CW post saying 36% unknown? Looking at         it says "36% unknown". No user by the name of 'unknown' appears in the  ()  What madness is this? Who is this 'unknown' you speak of? why are the best questions the ones which have been closed? I frequently come across a really useful answer on StackOverflow which has been closed because it doesn't match the Q&amp;A format.  Examples include  ,  ,   ,  and there are others.  Where should this information be exchanged if it's not on stackoverflow?  It seems the moderators are often somewhat overzealous...  ---edit  When I say best, I mean they are informative and useful for someone who's looking for an answer to them.  Even if they do become a bit of a discussion, I value other people's opinions on the relative merits of the different JPA frameworks.  I come here looking to choose one and the answer helps me.  So what if it's not a definitive answer?  ---edit  I don't care how popular a question is, nor how interesting it is.  Users are interested in stuff that's useful to them.  Plenty of those were useful (as judged by the upvotes on the answers: 'This answer is useful'), but closed because they didn't have a definitive answer, as far as I can tell.  ---edit  Seems I'm not the first person to think this: there are various similar questions to mine like this one:   In it the user lists lots of other useful questions which have been closed:                    So isn't there a place on stackoverflow for these questions?  A discussion section, maybe? If we fail to reject the null hypothesis in a large study, isn't it evidence for the null? How does the twitter bot work? I heard that there was a twitter bot which automatically posted questions and asked for answers for specific questions on every site. How do they work? Is there an algorithm for doing this or is it purely random? I know that it doesn't tweet closed questions, but that's it. Why can't cloaked vessels shoot? Should 'fuck' be present in review audits (intentionally fake suggested edit reviews)? Some suggested edit reviews are fake and are intended to check that the reviewer is paying attention and reviewing correctly.  I recently encountered one where the fake suggested edit contained 'fuck':   Despite the fact that we regularly encounter profanity online these days, and whilst it is not uncommon to encounter the word 'fuck' in blog posts by recognised authorities in the world of software development (and, I assume, in other fields), this nevertheless caught me a bit by surprise.  I have no problem with whatever strength of language someone feels is appropriate and relevant to make their point, however in the context of audit-related fake suggested edits, is the use of profanity appropriate?  Update: just to clarify, the word 'fuck' was not present prior to the fake suggested edit. The fake suggested edit added the word 'fuck' where it was not previously present. Bernoulli maximum likelihood Suppose $X_1, X_2, \dots, X_n$ are iid Bernoulli(p) random variables. How do you find the restricted maximum likelihood for p where $0&lt;p&lt;0.5$?  My work so far:  Write out the likelihood: $L=p^{\sum x} (1-p)^{n-\sum x}$  Take the log: $\ln(L) = \sum x\ln(p)+(n-\sum x)\ln(1-p)$  Take the derivative and set equal to zero: $\frac{\sum x-np}{p(1-p)}=0$.  Now I'm stuck. I don't know how to incorporate the restrictions for $p$. From reading the rules it would appear there are two kinds of damage and then straight loss of life:     118.3 If an effect causes a player to gain or lose life, that player's life total is adjusted accordingly.   From reading that I would guess that effects like Extort are not sources of damage. You simply lose the life.      119.2a Damage may be dealt as a result of combat. Each attacking and blocking creature deals combat damage equal to its power during the combat damage step.   So damage from creatures during combat is combat damage.     119.2b Damage may be dealt as an effect of a spell or ability. The spell or ability will specify which object deals that damage.   And that is direct damage from an object.  So the arguments are these:  Does loss of life as outlined by rule 118.3 (at top) count as being dealt damage? Do triggered abilities that redirect or reduce damage effect loss of life?  My second related question: You put  on a  and tap her to deal one damage to your opponent. Am I right in saying that because the damage was direct damage (not dealt during combat) then the triggered ability of preventing the combat phase of the damaged player is not triggered? Why must a field whose a group of units is cyclic be finite? Let $T$ be a self adjoint operator on a finite dimensional inner product space. And let $4$ and $5$ be the only eigenvalues of $T$. Show $T^2-9T + 20I = 0$ .  proof:Let $T$ be a self adjoint. And let $4 , 5$ be the only eigenvalues of $T$. Then $Tv = 4v, Tv = 5v$ for some $v \neq 0$. Then $Tv = 4v, Tv = 5v$ if and only if $(T-4I)v = 0, (T-5I)v=0$.  Then $ (T-4I) (T-5I)v=0$ implies $(T^2 -5T -4T + 20I^2)v = 0$, implies   $(T^2 -9T + 20I)v = 0$, so we have  $T^2 -9T + 20I = 0  $. Can someone please check this? if it's not correct, could I please have some help on it? Thank you How do I know if a laptop will work with Ubuntu? I want to buy a laptop at some point in the near future, but not knowing beforehand whether it works with Ubuntu makes the whole operation risky and tiresome. I would like to know if there is some kind of official hardware database where I can enter the name of the laptop I'm interested in and see if it's 100% compatible out of the box, or in case it isn't what is it exactly that doesn't work (ideally also if there is a way to fix it).  Does Canonical have a project along these lines? How can I prove this inequality in a triangle: $\frac{1}{(b+c-a)} +\frac{1}{(c+a-b)} +\frac{1}{(a+b-c)} \gt \frac{1}{a} +\frac{1}{b} +\frac{1}{c}$? If $a,b,c$ are the sides of a triangle then show that- $\frac{1}{(b+c-a)} +\frac{1}{(c+a-b)} +\frac{1}{(a+b-c)} \gt \frac{1}{a} +\frac{1}{b} +\frac{1}{c}$  I got this problem from an old book on algebra. I've been trying for a long time but can't reach the answer.  My try on the question-  We know that in a triangle, the sum of two sides is always greater than the third side  $b+c\gt a$ $\implies$ $b+c-a \gt 0$  $c+a\gt b$ $\implies$ $c+a-b\gt 0$  $a+b \gt c$ $\implies$ $a+b-c\gt 0$  Also,  $\frac {1}{(b+c)} \lt \frac{1}{a}$  $\frac{1}{(c+a)} \lt \frac{1}{b}$  $\frac{1}{(a+b)} \lt \frac{1}{c}$  Adding,  $\frac{1}{(b+c)} + \frac{1}{(c+a)} +\frac{1}{(a+b)} \lt \frac{1}{a} + \frac{1}{b} + \frac{1}{c}$  How do I proceed further? All genuine answers are welcome :)