float f = 735.64;     int i = (int)f;     float f2 = f - i;     cout&lt;&lt;f2&lt;&lt;endl;       The value outputted by f2 is simply not 0.64 but something like 0.6400015 I just want to have the value in f2 as either 0.64 or 0.640000.. so could I do it without using any inbuilt functions as such?  Thanks.
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Proof for SSS Congruence? nvidia-libopencl1-331 has to be removed before installing WINE Grid System in LaTeX I read on  that Ubuntu will no longer use the familiar file size units we all know by now (kB, MB, GB, TB) and switch to a different IEC standard (KiB, MiB, GiB, TiB). If this is true, I would like to know what's the reasoning behind this change, and the impact (if any) this change has, especially with multiplatform applications or applications run with Wine. I was watching some videos on YouTube showing how to get the Duke O' Death in GTA 5, however what I have seen is sort of unclear.  Some people say you must be a returning player on GTA 5 to get it (what does this mean too BTW?), some people don't say that. Some people say you have to be Trevor, some people don't. Some say the time of day matters, some don't. And apparently you can buy it from Warstock website (I can't).   Can someone please tell me how to get it?! GTA 5 came with my PS4 (I didn't play it on PS3) if that helps. Does removing an iPhone from my icloud account also erase the data? Syntax error while creating DB2 Trigger What is wrong in the below trigger syntax, I am getting this error An unexpected token "INT" was found following " DECLARE NULL_ROW_ID".  Expected tokens may include:  "END-OF-STATEMENT".. SQLCODE=-104, SQLSTATE=42601, DRIVER=3.68.61  CREATE TABLE A (     A_ID INT NOT NUll,     A_CODE VARCHAR(100) NOT NULL,     PRIMARY KEY(A_ID) );  CREATE TABLE B (     B_ID INT NOT NUll,     B_CODE VARCHAR(100) NOT NULL,     A_ID INT,     PRIMARY KEY (B_ID),     FOREIGN KEY (A_ID) REFERENCES A (A_ID)  );  CREATE OR REPLACE TRIGGER B_TRIGGER AFTER UPDATE OF A_ID ON B REFERENCING NEW AS N OLD AS O FOR EACH ROW     WHEN (N.A_ID IS NULL)     BEGIN ATOMIC         DECLARE NULL_ROW_ID INT;         SET NULL_ROW_ID = (SELECT A_ID FROM A WHERE A_CODE = 'Custom Null String');         IF NULL_ROW_ID IS NULL THEN             SIGNAL SQLSTATE '70000' SET MESSAGE_TEXT = 'Custom Null String row not found.';         END IF;     SET N.A_ID = NULL_ROW_ID;     END @   It's on DB2 Express-C 10.5 Are the eigenvalues of $AB$ equal to the eigenvalues of $BA$? (Citation needed!) First of all, am I being crazy in thinking that if $\lambda$ is an eigenvalue of $AB$, where $A$ and $B$ are both $N \times N$ matrices (not necessarily invertible), then $\lambda$ is also an eigenvalue of $BA$?  If it's not true, then under what conditions is it true or not true?  If it is true, can anyone point me to a citation?  I couldn't find it in a quick perusal of Horn &amp; Johnson.  I have seen a couple proofs that the characteristic polynomial of $AB$ is equal to the characteristic polynomial of $BA$, but none with any citations.  A trivial proof would be OK, but a citation is better. A 2x2 matrix $M$ exists. Suppose $M^3=0$ show that (I want proof) $M^2=0$ convert bash `ls` output to json array Computing the $n^{\textrm{th}}$ permutation of bits. I've seen  post about the $n^{\textrm{th}}$ permutation of a set but that is not what I need. If you have a bit string (ones and zeros only) there are  to quickly permute the NEXT lexicographically ordered bit permutation. For example take $$000111 \rightarrow 001011 \rightarrow 001101\rightarrow\cdots$$ etc. If the string is long then there are going to be approximately one Bajillion of these things. And I want to know how to compute the $n^{\textrm{th}}$ guy without doing the exhaust.  Backgound: This is for a parallel computing job where I need to farm out the search space of elements of a set.  Foreground: I own a copy of Knuth's 4th volume of "The Art of Computer Programming" and I think the answer is in there but I can't seem to find it. (It's like 900 pages).  I'm posting here in the hopes that someone has knowledge of this (obviously). Even if you can point me to a source, say the part in Knuth's book where he describes this problem I would be most grateful. Create a page for useful links? Writing letters of recommendation for more than one student to the same department Suppose multiple students have asked me for letters of recommendation to the same graduate department in the US. Am I expected to explicitly compare the students to one another? Am I supposed to do this in both letters (assuming they haven't been submitted yet)? Do I need to explicitly state a preference for one over the other, or can I just get away with listing relative strengths and weaknesses (for instance, "X is stronger academically, but Y has more research experience and is a stronger programmer")? I'm flying to Tokyo. The flight was sold through Finnair. The first leg is operated by American Airlines. The second and final legs are operated by Finnair.  When I checked in online, it said that some airports on my journey (didn't say which one) don't allow mobile boarding passes?? Meaning I will need a physical copy.  Unfortunately I don't have easy access to a printer. Will I still be able to print all my boarding passes at the airport even though I already checked in online? Converting point layer to raster grid that shows frequency of points per cell uisng QGIS I have a point layer that shows the distribution of a species.   Is it possible in QGIS to convert this point layer to a raster grid in which the value of each cell corresponds with the amount of points within that cell?   Until now, I only managed to attach attribute values to the grid cells. I have already added a column in my attribute table that has the value '1' for each point, hoping that there is a way to use a sum of attributes for each grid cell. Generic Parse Method without Boxing I am trying to write a generic Parse method that converts and returns a strongly typed value from a NamedValueCollection.  I tried two methods but both of these methods are going through boxing and unboxing to get the value.  Does anyone know a way to avoid the boxing?  If you saw this in production would you not like it, how bad is it for performance?  Usuage:  var id = Request.QueryString.Parse&lt;int&gt;("id");   Attempt #1:  public static T Parse&lt;T&gt;(this NameValueCollection col, string key) {     string value = col[key];      if (string.IsNullOrEmpty(value))         return default(T);      if (typeof(T) == typeof(int))     {         //return int.Parse(value); // cannot convert int to T         //return (T)int.Parse(value); // cannot convert int to T         return (T)(object)int.Parse(value); // works but boxes     }     if (typeof(T) == typeof(long))     {         return (T)(object)long.Parse(value); // works but boxes     }     ...      return default(T); }   Attempt #2 (using reflection):  public static T Parse&lt;T&gt;(this NameValueCollection col, string key) {     string value = col[key];      if (string.IsNullOrEmpty(value))         return default(T);      try     {         var parseMethod = typeof(T).GetMethod("Parse", new Type[] { typeof(string) });          if (parseMethod == null)             return default(T);          // still boxing because invoke returns an object         var parsedVal = parseMethod.Invoke(null, new object[] { value });         return (T)parsedVal;     }     // No Proper Parse Method found     catch(AmbiguousMatchException)      {     }      return default(T); } Experimental Fractional scaling makes fonts dirty in Ubuntu 17.10 I updated to 17.10 from 17.04.   I activated the fractional scaling by running the following command.   gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"   Then, I changed 125% scale. The scale was changed, but the fonts and icons are so dirty.    The launcher icon and font in Google Chrome and other application except the system setting are dirty.  How can I resolve this problem?  For some reason, font in the system setting is not dirty... Is there a test to determine whether solder is leaded or lead-free? Perhaps conductivity/resistance? Rotation and translation of a conic-section I tried to solve the following exercises, so I want to ask you if my answers are correct.     1) Given the coordinates system $(O'; X'' Y'')$ asociated to the    basis $B=[{b_1=\frac{1}{\sqrt{2}}; \frac{1}{\sqrt{2}};  &gt; b_2=\frac{-1}{\sqrt{2}}; \frac{1}{\sqrt{2}}}]$ with origin in    $O'=(2;5)$ and the system $(O;XY)$ asociated to the standar basis, find the intersection between $Q: y''^2=-4 \sqrt{2} x''$    and the straight line in $(O,XY)$ $V=(0;5)+t(-1;1) t\epsilon R$    Well, first I tried to write $Q$ in terms of $X$ and $Y$, and not in terms of $X''$ and $Y''$. I used the formula:  $(\begin{matrix}  X''\\  Y'' \\  \end{matrix})$ =$(C)_B$ × $(\begin{matrix}  X-2\\  Y-5 \\  \end{matrix})$   Then I replaced those values in the equation of $Q$ and I got $Q: \frac{(-x+y-3)^2}{2}=-4 \sqrt{2} \frac{(x+y-7)}{\sqrt{2}}$   After that, I found the intersection between $Q$ and $V$ using equations and I got that the intersection points in $(O;XY)$ are $P_1(3;2)$ and $P_2(-1;6)$      2)Given the coordinates system $(O,X'Y')$ asociated to the basis    $B=[{b_1=\frac{1}{\sqrt{2}}; \frac{1}{\sqrt{2}};  &gt; b_2=\frac{-1}{\sqrt{2}}; \frac{1}{\sqrt{2}}}]$ with origin in    $O=(0;0)$ and the ellipse $9X'^2+5Y'^2-3X'+2Y'-10=0$ find the    coordinates of the centre of the ellipse in $(O,XY)$    So, here I found the centre of the ellipse in $(O,X'Y')$ and it was $(\frac{1}{6}; - \frac{1}{5})$, then, doing something similar to what I've done before I found out that the centre in $(O,XY)$ was $( \frac{11}{30 \sqrt{2}};$ $\frac{-1}{30 \sqrt{2}}$) How can I setup a Material in Cycles for Z-Transparency?