I have some problems with calculating cosinus 90 in Java using Math.cos function :   public class calc{       private double x;       private double y;        public calc(double x,double y){                    this.x=x;                    this.y=y;       }        public void print(double theta){            x = x*Math.cos(theta);            y = y*Math.sin(theta);            System.out.println("cos 90 : "+x);            System.out.println("sin 90 : "+y);       }        public static void main(String[]args){            calc p = new calc(3,4);            p.print(Math.toRadians(90));        }   }  When I calculate cos90 or cos270, it gives me absurb values. It should be 0. I tested with 91 or 271, gives a near 0 which is correct.    what should I do to make the output of cos 90 = 0? so, it makes the output x = 0 and y = 4.  Thankful for advice
Consider the following code:   0.1 + 0.2 == 0.3  -&gt;  false   0.1 + 0.2         -&gt;  0.30000000000000004   Why do these inaccuracies happen?
Prove $n\mid \phi(2^n-1)$ If $2^p-1$ is a prime, (thus $p$ is a prime, too) then $p\mid 2^p-2=\phi(2^p-1).$  But I find $n\mid \phi(2^n-1)$ is always hold, no matter what $n$ is. Such as $4\mid \phi(2^4-1)=8.$  If we denote $a_n=\dfrac{\phi(2^n-1)}{n}$, then $a_n$ is , but how to prove it is always integer?  Thanks in advance! Construct a field of 25 elements. We need to construct a field of 25 elements.  By using a result : For a prime p and a monic irreducible polynomial $p(x)$ in $\Bbb F_p [x]$ of degree $n$ , then the ring $(\Bbb F_p [x] / &lt;p(x)&gt;)$ is a field of order $p^{n}$.  So , for the question problem above , we need a irreducible polynomial of degree $2$ in $\Bbb Z_5 [x]$.  Solution says , $x^{2} + x +1$ does our job , since it's irreducible in $\Bbb Z_5 [x]$.  My question : Can't we take $ x^{2} + 2$ , it has no zeroes in $\Bbb Z_5$ , and is irreducible. In every solution I've gone through , the polynomial $x^{2} + x+1$ is taken. Can't we consider $ x^{2} + 2$ ? Variable importance from GLMNET How do I diff the outputs of two commands? How can I use the diff command to compare 2 commands' outputs?  Does something like this exist?   diff  ($cat /etc/passwd) ($cut -f2/etc/passwd) How to evaluate  $$\det\begin{bmatrix}1+x_1y_1&amp;\cdots &amp; 1+x_1y_n\\ \vdots &amp; \ddots &amp; \vdots \\ 1+x_ny_1 &amp; \cdots &amp; 1+x_ny_n\end{bmatrix}$$?  I tried factorisation but I have no idea. I could not factor anything out... I need a hint to kick off.   Edit: A conjecture due to multilinearity: if we let $v_j=(x_1y_j,\cdots,x_ny_j)^T$, then my guess would be $$\det\begin{bmatrix}1+x_1y_1&amp;\cdots &amp; 1+x_1y_n\\ \vdots &amp; \ddots &amp; \vdots \\ 1+x_ny_1 &amp; \cdots &amp; 1+x_ny_n\end{bmatrix}=\det(1,v_2,\cdots,v_n)+\det(v_1,1,\cdots,v_n)+\cdots+\det(v_1,v_2,\cdots,1)=\color{red}{0}$$ where $1$ denote $(1,\cdots,1)^T\in \Bbb K^n$,$\Bbb K$ the underlying number field. Some say that we can connect two points with a continuous curve and a small contractible neighborhood of the path together with the charts of the points can be regarded as the chart. But I don't know how to verify this statement. Here is a minimal example that showcases my problem:  \documentclass{article}  \usepackage{amsthm} \usepackage{hyperref} \usepackage{cleveref}  \newtheorem{thm}{Theorem} \newtheorem{lem}[thm]{Lemma}  \begin{document}  \begin{lem} Lemma \end{lem}  \end{document}   The warning I get is the following:  [1pdfTeX warning (ext4): destination with the same identifier (name{thm.1}) has been already used, duplicate ignored  \AtBegShi@Output ...ipout \box \AtBeginShipoutBox                                                    \fi \fi  l.16 \end{document}                    {&lt;install dir&gt;/MiKTeX/2.9/pdftex/config/pdftex.map}]   I know that it is just a warning and that, my document will still work perfectly fine with regards to cross-referencing and hyperlinking, but I would still like to know why I am getting this warning and if anything can be done to fix it without removing functionality of the included packages.   Bonus question: Whats going on behind the scenes when this warning (or any generic 'destination with the same identifier (name{XXX.YYY}) has been already used, duplicate ignored') is produced, as this is not limited to theorem environments.  From log file:  Package: amsthm 2004/08/06 v2.20 Package: hyperref 2011/04/17 v6.82g Hypertext links for LaTeX Package: cleveref.sty 2011/03/22 v0.17.9 Intelligent cross-referencing Package cleveref Info: `hyperref' support loaded on input line 2157. Package cleveref Info: `amsthm' support loaded on input line 2300. How do I base64 encode (decode) in C? I have binary data in an unsigned char variable. I need to convert them to PEM base64 in c. I looked in openssl library but i could not find any function. Does any body have any idea? I would like to show that   $$ \int_{0}^{1} \frac{x-1}{\ln(x)} \mathrm dx=\ln2 $$  What annoys me is that $ x-1 $ is the numerator so the geometric power series is useless.  Any idea? Undergraduate prerequisites for a Ph.d. in combinatorics I am a double major in mathematics and electrical engineering. Towards the end of my mathematics major, I began to develop an interest in combinatorics (specifically graph theory), and am seriously considering a Ph.D. in the subject.   Having developed the interest late, my senior thesis will be in a different topic (complex ODEs), but I would have completed one course in combinatorics/graph theory (an upper-level undergraduate course using a grad-level text - I expect a strong reference from the professor teaching this course).   The courses I have completed are basically both the undergraduate and graduate-level algebra sequence,  analysis in R and R^n (without a formal introduction to Lebesgue measure), discrete math (for EECS), applied probability, one course in numerical methods, PDEs, applied complex variables, and a "mathematical methods for sciences" course (focusing on special functions, variational calculus, and integral transforms).   I won't have the standard math major courses(i.e,  topology, measure theory, and number theory.) I plan to focus more on applications than theory in my combinatorics Ph.D.   Would additional coursework be necessary for a Ph.D. in combinatorics (specifically graph theory)? (I could potentially delay my degree by a year and spend time as a non-degree student at another university, or complete a non-thesis track master's degree before applying for a masters/Ph.d.). Any advice would be appreciated. Ubuntu 18.10: visual artifacts (black bar) in dock if extend-height is disabled I am using the default Ubuntu dock with bottom placement and org.gnome.shell.extensions.dash-to-dock extend-height set to false. With Ubuntu 18.10 this produces a noticeable visual glitch, note the black empty spaces at the edges of the dock:    I am getting this both on an upgraded system and on a clean install inside a VM. This was working fine in Ubuntu 18.04. Also happens if the theme is set to something else than Yaru (the default theme in Ubuntu 18.10). Reboot does not help. Dock looks OK if extend-height is enabled.  Any ideas on how to fix this? Recently, I accidentally deleted a partition off of my external hard disk. I had a copy of Minitool Power Data Recovery left over when the same drive had become RAW about a year ago. When I selected lost partition recovery, it immediately identified my deleted partition and allowed me to access and recover the files that were there.  My question is this. Is there any way to change the deleted partition back to NTFS without having to have a drive that you need to recover the files to and then move them back after formatting, as I don’t have any space left on either the computer or on my other external hard drive, so that I don’t need to buy a new one. The files on the disk were really important.  I am using Windows 7 Home Premium.  I appreciate any help in solving this crisis. Shape with a slanted side (responsive) Individual ColorFunction with RGBColor How do you correctly say large numbers How do I move all files from one folder to another using the command line? Let $(a_n)_{n}\in\ell^2:=\ell^2(\mathbb{R})$ be a fixed sequence. Consider the subspace $$C=\{(x_n)_{n}\in\ell^2 : |x_n|\le a_n\text{ for all }n\in\mathbb{N}\}.$$  According to the book [Dunford and Schwartz, Linear operators part I, page 453] $C$ is compact in the $\ell^2$-norm, but there is no proof. How can I show that $C$ is indeed compact in $\ell^2$ ? mysql database no space available Where can questions about our community-run moderation tools be asked? The question  was recently closed due to not being "about the software that powers the Stack Exchange network, within the scope defined in the help center." MEE is Johann Gambolputty made a comment that     SmokeDetector is a community run project to help to fight spam. Therefore your question is unfortunately off-topic for this site. You can find help in  chatroom.   If questions about community run moderation bots (e.g. SmokeDetector, FireAlarm, Natty, Queen, etc.) are off-topic here on Meta Stack Exchange, is there anywhere on the Stack Exchange network where one can post a Question and Answer-style question on them, or are they only on-topic in appropriate chat rooms? Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.