If $\gcd(a, b) = 1$ then prove that $\gcd(a+b, a^2-ab+b^2) = 1$ or $3$?
If $\gcd(a,b)=1$, then $\gcd(a+b,a^2 -ab+b^2)=1$ or $3$.
How do I check if an element is hidden in jQuery? Coin sequence paradox from Martin Gardner's book I have a header file  x.h which is included by more than one *.c source files. This header file has some structure variables defined.  I have put multiple inclusion prevention guard at the beginning of the header file as:  #ifndef X_H #define X_H ... .. //header file declarations and definitons.   #endif//X_H   On building I get linker errors related to multiple definitions. I understand the problem.   Won't a multiple inclusion prevention guard at the top of header file as I have, prevent multiple inclusions of the header file x.h and thereby avoid multiple definitions of the variables that are there in x.h? #pragma once does not work on this particular compiler, so what is the solution?  Someone had posted  answer to a similar question. It doesn't seem to work for me. How does this solution work? I am new to QGIS. I am looking for any plugin or any manual method in QGIS for finding minimum distance (perpendicular distance) from a point which is part of one shapefile to nearest line among many lines which is part of another shapefile.   MMQGIS is not useful for this purpose. Base-b Representation of an Integer: Why can I make the assumption about number of terms in expansions in uniqueness part?   Reading the book of Koshy I have come across the below theorem. It states that I can write any integer $N$ in a base $b\ge2$ representation $N=a_kb^k+...+a_1b+a_0$ such that $0\le a_i&lt;b$, $a_k \neq 0$ for some $k\ge0$.  In the uniqueness part, why can I assume the expansions contains the same number of terms ? I must prove that all expansions of $N$ equal the one in the theorem, but if I add terms to the expansion by zero coefficients, well, then the expansion is not in the proper form anymore ? (the greatest term in the expansion is $0$ if I add zero coefficients) .  Can someone help clear this out ?     Why can I assume the expansions contain the same number of terms ? If I add terms to the expansion, well then I've violated the form of the expansion ? What exactly is the Box-Jenkins method for ARIMA processes? The  page says that Box-Jenkins is a method of fitting an ARIMA model to a time series. Now, if I want to fit an ARIMA model to a time series, I will open up SAS, call proc ARIMA, supply the parameters $p,d,q$ and SAS will give me AR and MA coefficients. Now, I can try different combinations of $p,d,q$ and SAS will give me a set of coefficients in each case. I select the set with the lowest Akaike information criterion.  My question is: where in the above procedure did I use Box-Jenkins? Am I supposed to use Box-Jenkins to come up with initial estimates of $p,d,q$? Or did SAS use it internally somehow? The representative point of a cluster or cluster center for the k-means algorithm is the component-wise mean of the points in its cluster. The mean is chosen because it helps to minimize the within cluster variances (which is to say that it is minimizing within cluster squared Euclidean distance, since its the same). Now, when I want to use a different distance metric, like L1 (Manhattan distance), I would be minimizing the within cluster absolute deviations (if I choose to). I was looking at what the centers calculation would be like, because the mean won't reduce the new objective function, and I found this on the Matlab documentation of their kmeans function for the distance parameter     cityblock - Sum of absolute differences, i.e., the L1 distance. Each centroid is the component-wise median of the points in that cluster.   Now, how did they come up with the component-wise median? How does a median minimize absolute deviations? Can not make hibernate on UEFI (Secure boot) nvidia-libopencl1-331 has to be removed before installing WINE How do I create an empty array/matrix in NumPy? I can't figure out how to use an array or matrix in the way that I would normally use a list. I want to create an empty array (or matrix) and then add one column (or row) to it at a time.  At the moment the only way I can find to do this is like:  mat = None for col in columns:     if mat is None:         mat = col     else:         mat = hstack((mat, col))   Whereas if it were a list, I'd do something like this:  list = [] for item in data:     list.append(item)   Is there a way to use that kind of notation for  arrays or matrices? CSS 100% height with padding/margin With HTML/CSS, how can I make an element that has a width and/or height that is 100% of it's parent element and still has proper padding or margins?  By "proper" I mean that if my parent element is 200px tall and I specify height = 100% with padding = 5px I would expect that I should get a 190px high element with border = 5px on all sides, nicely centered in the parent element.  Now, I know that that's not how the standard box model specifies it should work (although I'd like to know why, exactly...), so the obvious answer doesn't work:  #myDiv {     width: 100%     height: 100%;     padding: 5px; }   But it would seem to me that there must be SOME way of reliably producing this effect for a parent of arbitrary size. Does anyone know of a way of accomplishing this (seemingly simple) task?  Oh, and for the record I'm not terribly interested in IE compatibility so that should (hopefully) make things a bit easier.   EDIT: Since an example was asked for, here's the simplest one I can think of:  &lt;html style="height: 100%"&gt;     &lt;body style="height: 100%"&gt;         &lt;div style="background-color: black; height: 100%; padding: 25px"&gt;&lt;/div&gt;     &lt;/body&gt; &lt;/html&gt;   The challenge is then to get the black box to show up with a 25 pixel padding on all edges without the page growing big enough to require scrollbars. Ubuntu 14.04 doesn' t boot after upgrade from 12.04 installed inside Windows 8.1 I have Ubuntu 12.04 installed like an app on windows 8.1 (Ubuntu 12.04 allow to be installed like an app in Windows 8.1 and it can be removed when you don't need it any more from Control Panel). Usually, to chose what os to boot when you start the laptop, you can choose between windows 8.1 and Ubuntu after windows logo appeared at start up and that was ok until I made this upgrade. Now when I try to choose Ubuntu the laptop try to boot it but, after that full colored screen is showed the screen go black and this messages appear:  mount: mounting /dev/loop0/ on /root failed : Invalid argument mount: mounting /dev on /root/dev failed: No such file or directory mount: mounting /sys on /root/sys failed: No such file or directory mount: mounting /proc on /root/proc failed: No such file or directory Target filesystem doesn' t have requested /sbin/init No init found. Try passing init = bootarg.  BusyBox v1.21.1 (Ubuntu 1:1:21.0-1ubuntu1) built-in shell (ash) Enter 'help' for a list of built-in commands  (initramfs) _   I don' t know what to do after this screen appears. Please help ! How do I add a Javascript library to a field formatter? I'm trying to include a Javascript gallery () on my new Drupal 8 site and wrote a field formatter for this purpose.   Now I need to add the jQuery lightGallery to pages using this field formatter and call the library when the page is ready. I am confused about how I am supposed to do this, though.   I defined the library in the module containing my field formatter, but I'm not sure how I attach it only on sites that contain the field.   The documentation of the library uses the jQuery $(document).ready function to call the libary, how would that work inside a Drupal module? How to add Windows to GRUB I have my encrypted Archlinux installed on my SSD. Now I have one HDD with Windows installed. But in my GRUB just Archlinux is shown (no Wonder, because I just installed Windows on the other HDD, GRUB doesn't know of that by now.).  My Question is, how do I properly add my Windows-HDD to GRUB, so that I can choose which to boot when starting?  I am a little bit afraid of destroying my GRUB so I can't boot my encrypted Archlinux anymore.  Thanks! Transpose/Unzip Function (inverse of zip)? Where did the ~/Library folder go in Lion? How can I prove that the additive group of rationals is not isomorphic to a direct product of two nontrivial groups? I am working through Paolo Aluffi's new GSM text on my own (self-study). On page 63, he asks the reader to     Prove that $\Bbb{Q}$ is not the direct product of two nontrivial groups.   For some context, this is an exercise following a section entitled "The category Grp".  I am assuming that he means "is not isomorphic to the direct product of two nontrivial groups", and I can see two possible ways to proceed with this proof, but have been unsuccessful with either approach.    Approach 1:  Show that the additive group of rationals has a property that is preserved by isomorphism that the direct product of two nontrivial groups does not have or vice-versa.  This seems challenging unless I can significantly narrow down the properties that a direct product of two nontrivial groups that was isomorphic to $\Bbb{Q}$ would necessarily have.  Approach 2:  Considering the section in which this question occurs, show that if $G$ and $H$ are nontrivial groups and $\Bbb{Q} \cong G \times H$, then there are homomorphisms $\varphi_{G}:\Bbb{Q} \rightarrow G$ and $\varphi_{H}:\Bbb{Q} \rightarrow H$ which do not factor or do not factor uniquely through the product $G \times H$.  This would be a contradiction, as $G \times H$ is a final object in the category Grp.  I would greatly appreciate suggestions on how to proceed further with either of these approaches or with alternate approaches. I want to delete the record type which is default to the some profiles Where can I ask an open discussion question? How to Prevent the System.QueryException I am getting "Error System.QueryException: List has no rows for assignment to SObject".   Line 1: Account ac = [select id from Account where name='testaccount' limit 1] Line 2: if(ac != null) {           //do something         }   I got the above error in line 2 if there is no record.   Any help?