How to check if a value is even or odd?  while ($N=0 &gt; 6; ++$N) { // might be mistake here but it just here for demonstration my cod differs     ++$CELL;     echo ($CELL/3)." - ";     if(($CELL/3) % 2) {                                 echo ($CELL/3)." (odd) &lt;br&gt;";     } else {         echo ($CELL/3)." (even) &lt;br&gt;";             echo "&lt;tr&gt;";         };     };   Can someone explain why it keeps outputing  0.333333333333 - 0.333333333333 (even) 0.666666666667 - 0.666666666667 (even) 1 - 1 (odd) 1.33333333333 - 1.33333333333 (odd) 1.66666666667 - 1.66666666667 (odd) 2 - 2 (even)    should not it be   0.333333333333 - 0.333333333333 (even) 0.666666666667 - 0.666666666667 (even) 1 - 1 (odd) 1.33333333333 - 1.33333333333 (even) 1.66666666667 - 1.66666666667 (even) 2 - 2 (odd)    kind of messed up even and odd but its not the point... is there better way to check if value is even?
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Can abilities with a [Click] cost be used during a run? Some abilities have a [Click] cost to them, such as Crypsis' ability to add a virus counter to it.  Does it count as a "paid ability" for the purposes of the ? I.e. could I, mid-run, add a virus counter to Crypsis for the cost of one [Click]? First appearance of a predominately black cast in a TV show I was watching MeTV the other day, which is a fantastic station chock-full of old-time TV shows.  In one sitting I saw episodes of Superman, Batman, Wonder Woman, The Rifleman and Star Trek (TOS).  So it got me thinking...  None of these shows has many (if any) black actors.  And now I'm curious as to which TV show was the first to feature a predominantly black cast.  Anyone know?  I'm thinking back to What's Happening, Good Times, The Jeffersons...  But were there any before then? Why isn't $\mathbb Z [\sqrt{pq}]$ a factorial domain This is exercise 8 on page 147 of Jacobson's Basic Algebra:     Let $p$ be a prime of the form $4n+1$ and let $q$ be a prime such that $ \left( \frac{q}{p} \right) =-1$. Show that $\mathbb Z[\sqrt{pq}]$ is not factorial.   Here, $ \left( \frac{q}{p} \right) =-1$ means that $\overline{q}$ is not a quadratic number in the field $\mathbb Z / (p)$.  In the special case when $p=5$ and $q=2$, $9 = 3 \cdot 3 = (\sqrt{10} +1 )(\sqrt{10 }-1)$, with $3$ and $\sqrt{10} +1$ or $\sqrt{10} - 1$ nonassociates. But I have no idea what can I do with the general case.  I know that primes of the form $4n+1$ can be written in the form $m^2 + n^2$ with $m,n \in \mathbb Z$. But when $q$ is odd and not of the form $4n+1$, $pq$ is not the sum of two quadratic numbers. How can I use the fact $\left( \frac{q}{p} \right) =-1$?  Thanks~ SQL comma-separated row with Group By clause Need help to understand Maximum Likelihood Estimation for multivariate normal distribution? In maximum likelihood estimation for the parameter, mean $\mu$ of multivariate normal distribution, I end up with the following result:  $\mu_{MLE} = \dfrac{1}{n}\sum_{i=1}^n x_i$  The way I understand the above equation is the following way below, but I am wondering if the above equation means the following equation:  $\mu_{MLE} = \begin{bmatrix}\mu_1\\\mu_2\\\vdots\\\mu_n\end{bmatrix} = \begin{bmatrix}\dfrac{1}{n}\sum_{i=1}^n x_1\\\dfrac{1}{n}\sum_{i=1}^n x_2\\\vdots\\\dfrac{1}{n}\sum_{i=1}^n x_i\end{bmatrix} = \begin{bmatrix}E(X_1)\\E(X_2)\\\vdots\\E(X_n)\end{bmatrix} = \begin{bmatrix}\bar{X_1} \\ \bar{X_2} \\ \vdots \\ \bar{X_n}\end{bmatrix}$   And also Maximum Likelhood Estimation for $\Sigma$, I have ended up with the following equation:  $\Sigma_{MLE} = \dfrac{1}{n}\sum_{i=1}^n(x_i-\mu)(x_i-\mu)^T = \begin{bmatrix}Var(\sigma_{11}) &amp; Cov(\sigma_{12}) &amp; \dots &amp; Cov(\sigma_{1n}) \\ Cov(\sigma_{21}) &amp; Var(\sigma_{22}) &amp; \dots &amp; Cov(\sigma_{2n}) \\ {}&amp; \vdots&amp;  \\ Cov(\sigma_{n1}) &amp; Cov(\sigma_{n2}) &amp; \dots &amp; Var(\sigma_{nn})  \end{bmatrix}$  Somehow, I got the equation following some algebraic steps, but I can't see how this part, $\dfrac{1}{n}\sum_{i=1}^n(x_i-\mu)(x_i-\mu)^T$, works and produces the covariance matrix. Hope to hear some explanations. Record a macro of windows commands Using Windows 7, is there an in-built or third-party method of recording windows commands and being able to play them back?  As a very basic example of what I would like to be able to do, imagine having two desktop themes that you like to alternate between. The Windows commands would be something like   Open personalisation applet select second theme ok   (I'm calling this a macro because of the equivalent capability in Word.) Are moderator tools, specifically flagging or voting to close going to be implemented in the Android app? If we have a dispute, we should at least have the flag option.  What about share option? If we would like to share a question, we could long press on the question title, and the question title, excerpt, and short URL copied to clipboard. There is this addon that was built called Window Generator 2. It can be . However, when I go to the download link it shows up in a new tab as a bunch of code.  How can I download and use this addon in Blender? The situation is somewhat like-  var someVar = some_other_function(); someObj.addEventListener("click", function(){     some_function(someVar); }, false);   The problem is that the value of someVar is not visible inside the listener function of the addEventListener, where it is probably being treated as a new variable. Code blocks are not prettified on mobile site On Chrome on Android, code blocks on the mobile site have no syntax highlighting, are not a monospaced font, and words are wrapped.  Mobile site on mobile browser:    Desktop site on mobile browser:    Inline code has the same issue, it isn't a monospaced font.  It has been this way for as long as I can remember. Wouldn't be surprised if this is a dupe. Check if element found in array c++ How to have a figure with caption in multicol environment? I am having the following problem with adding a figure inside the multicol environment:  \documentclass[10pt, twoside]{book} \usepackage{graphicx} \usepackage{subfig}  \begin{document}   \begin{multicols}{2}  a test file for picture inclusion along with the captions and labeling \begin{figure}  \centering  \includegraphics[width=5cma]{Cauchy_sequence_illustration-png}\\  \caption{Lets see}\label{pinki} \end{figure} \end{multicols}  \begin{figure}  \centering   \includegraphics[width=5cm]{Cauchy_sequence_illustration-png}\\  \caption{Lets see}\label{pinki} \end{figure}    \end{document}    After this while I am pressing Ctrl + Shift + X (usually I compile like this in DVI format and then clicking "dvi--->pdf" I convert it into PDF document.) the picture in multicol environment is not shown in YAP Viewer but the second one (which is outside of multicol environment) is shown along with the caption.  Kindly help me how to handle this problem. Please note that I am using the figure in .ps format. And I am not allowed to use any other format according to the instruction. Which Stack Exchange site is best for AutoCAD questions like using Blender for graphical design? Sorry for the vague title--I don't want the title to be a spoiler.  I've seen the movie three times, and the last two times I looked specifically for clues to this question, but found none.  The final scene in  shows       Cobb's top spinning, as he goes off to be reunited with his children.  The top continues to spin, then the movie ends, without telling us if the top topples--and therefore revealing whether he's in the "real world" or still in a dream. Do we know if he was in a dream at the end of the movie?   I'm assuming the answer is that we simply cannot know.  But did I miss anything?  Were there clues that I missed? Suggested Edits Dashboard doesn't agree with Suggested Edits view I'm looking to find out if there's any easy way to calculate the number of ways to tile a $3 \times 2n$ rectangle with dominoes. I was able to do it with the two codependent recurrences  f(0) = g(0) = 1 f(n) = f(n-1) + 2g(n-1) g(n) = f(n) + g(n-1)   where $f(n)$ is the actual answer and $g(n)$ is a helper function that represents the number of ways to tile a $3 \times 2n$ rectangle with two extra squares on the end (the same as a $3 \times 2n+1$ rectangle missing one square).  By combining these and doing some algebra, I was able to reduce this to  f(n) = 4f(n-1) - f(n-2)   which shows up as sequence , confirming that this is the correct recurrence.  The number of ways to tile a $2 \times n$ rectangle is the Fibonacci numbers because every rectangle ends with either a verticle domino or two horizontal ones, which gives the exact recurrence that Fibonacci numbers do. My question is, is there a similar simple explanation for this recurrence for tiling a $3 \times 2n$ rectangle? Exclude one pattern from glob match In the following sentence, I want to know if I've understand the correct meaning or not:     This version holds that the wave function does not so much describe the state of the physical system as the state of our knowledge of the system.    Can we say that it means the wave function describes the state of our knowledge  of the system more than it describes the state of the physical system  ?  It is worth noting that in the Cambridge Dictionary, we read:  not so much sth as sth ​ If you say that something is not so much one thing as something else, you mean it is more the second thing: They're not so much lovers as friends. I don't feel angry so much as sad. Can quarks be considered real and elementary? Sci-fi book, blue critters than only some people can see, kids fight the critters as they feed off energy and are a threat I can't really remember how long ago it was, but I think the book was marketed towards children/teens.  All I remember is the basic premise of the story.  Some story about these unusual little blue electric critters that only certain people could see, and these kids took it upon themselves to go about destroying them since they fed off energy or something like that.  Not sure whether they fed off people or off electricity... or both maybe?  I think the dominant method of destroying them was an electric baton that was taken from law enforcement.  I wanna call them buzz batons, but that's probably thanks to Artemis Fowl.