Getting error messages form Set while trying to implement the bisection method with a For-loop
Set::setraw error in implementation of bisection method
Let $q \in \mathbb C$, $\|q\|=1$ and $q^n \neq 1, \forall n \in \mathbb N$. Show that $\{q^n: n \in \mathbb N\}$ is dense in $S^1$ Let $q \in \mathbb C$, $|q|=1$ and $q^n \neq 1, \forall n \in \mathbb N$. Show that $\{q^n:  n \in \mathbb N\}$ is dense in $S^1$.  My attempt: As $(q^n)$ is limited, there is subsequence $(q^{n_j})$ convergent. So given $\epsilon &gt; 0, \exists j_0 \in \mathbb N, \quad |q^{n_j} - q^{n_k}| &lt; \epsilon, \quad \forall j,k \geq j_0$. Supose that $n_j &gt; n_k$, then  $|q^{n_j} - q^{n_k}| = |q^{n_k}||q^{n_j - n_k} - 1| = |q^{n_j - n_k} - 1| &lt; \epsilon, \quad \forall j, k \geq j_0$. So, there is a subsequence of $(q^n)$ that converges to $1$.  Using this fact, how can I ensure that for all $w \in S^1$ there is a subsequence of $(q^n)$ that converges to  $w$? heat weighting: failed to find solution for one or more bones Can I leave the Schengen Area (and come back) while my non-eea spouse resident card application is being processed? My wife and I recently moved to Germany. She's a Swedish citizen, and I'm American. It'll be December before I can actually apply for my residence card, because my appointment to register our address is so far out - the local police station was all booked out and we didn't get an apartment right away.  I imagine that I won't be getting my residence card until well after Christmas, by which time my 90/180 days will be passed. What if I want to leave to, say, London for the holidays? Will I be allowed back in? I hit day 90 around the 21st of December. I could maybe leave on day 89 and come back on day 90 (with my wife and our marriage cert), or use this Polish solution: , since I can't be expelled from Germany for overstaying my visa while my application is processing.  Both of those seem a bit risky though. Am I reading too far into it, or is this a legitimate concern? Will I get some sort of documentation saying I have a residence card application processing? How does a wavefunction collapse into one state? More specifically, what conditions cause a wavefunction for a quantum particle to collapse?    Does this have to do with density matrices?    Please try to give a mathematical explanation that is simple and concise... Real analysis derivate problem. How can I prove this? Let $f$ be differentiable in $[a,b]$ and $f(a)=0$. If $\exists M \in R$ such that $\vert f'(x) \vert \leq M \vert f(x)\vert \ $,  $\forall x \in [a,b]$, then $f(x)=0, \ \forall x \in [a,b]$.  $\\$ I have an idea, but I can´t see it clear. I have arrived to the inequality $\vert f(x)\vert \leq  K\vert f(y)\vert $ for $y \in (a,x)$, supposing $k&gt;0$ and repeating the process $\vert f(x)\vert \leq  K^n\vert f(z)\vert$ for $a&lt;z&lt;y&lt;x$. If $K&lt;1$, then if $n \rightarrow \infty \ $, $f(x)=0$. That´s a sort of intuitive idea. What is a command to compile and run C++ programs? I am  new to Linux. I am using Ubuntu 11.04 and do not know how to compile and execute C++ program in it. I need to know the commands to Compile and Execute a C++ program in Linux. How do I pipe terminal standard output (stdout) to the clipboard? For example,   Say I want to list the contents of a folder and directly paste them into a chat window for a friend to see.    I realize I could do ls &gt; filename.txt to create a file (filename.txt) with those contents; I'd then have to open or print the file and manually select and copy the text block (which can be annoying/tedious.)  I clearly could also select and copy the output of ls directly from within the terminal window.  It would be much faster/easier to simply pipe standard output to the clipboard.  What terminal command allows me to do this? How do you reindex an array in PHP but with indexes starting from 1? Problem with sudo apt update in Ubuntu 18.04: Post-Invoke-Success if /usr/bin/test -w /var/lib/command-not-found/ The terminal gave me these errors when updating the software with sudo apt update.    Hit:1 http://it.archive.ubuntu.com/ubuntu bionic InRelease Hit:2 http://it.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                                        Hit:3 http://it.archive.ubuntu.com/ubuntu bionic-backports InRelease                                                                                      Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease                                      Hit:5 http://archive.canonical.com/ubuntu bionic InRelease                 Traceback (most recent call last):                       File "/usr/lib/cnf-update-db", line 8, in &lt;module&gt;     from CommandNotFound.db.creator import DbCreator ModuleNotFoundError: No module named 'CommandNotFound' Reading packages list... Done E: Problem executing scripts APT::Update::Post-Invoke-Success     'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db;       then /usr/lib/cnf-update-db &gt; /dev/null; fi'   E: Sub-process returned an error code     These are the results of sudo apt install --reinstall command-not-found  Reading package lists... Done  Building dependency tree         Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. Need to get 0 B/5.188 B of archives After this operation, 0 B of additional disk space will be used. (Reading the database ... 225797 files and directories currently installed.) Preparations for extracting ... / command-not-found_18.04.4_all.deb ... Extracting command-not-found (18.04.4) on (18.04.4) ... Configuring command-not-found (18.04.4) ... libdvd-pkg: Package libdvdcss2-1.4.2-1 was removed, stop processing...   When I tried the command sudo apt update again after reinstalling command-not-found, the results were the same as described in the first text block. How to retrieve all keys (or values) from a std::map and put them into a vector? This is one of the possible ways I come out:  struct RetrieveKey {     template &lt;typename T&gt;     typename T::first_type operator()(T keyValuePair) const     {         return keyValuePair.first;     } };  map&lt;int, int&gt; m; vector&lt;int&gt; keys;  // Retrieve all keys transform(m.begin(), m.end(), back_inserter(keys), RetrieveKey());  // Dump all keys copy(keys.begin(), keys.end(), ostream_iterator&lt;int&gt;(cout, "\n"));   Of course, we can also retrieve all values from the map by defining another functor RetrieveValues.  Is there any other way to achieve this easily? (I'm always wondering why std::map does not include a member function for us to do so.) MAC OS for Intel based PCs I have an Intel dual core PC with 4GB of RAM and Graphics card. For on of my student Assignment I need to install Latest possible MAC OS on my system as a secondary OS.  Like on boot it asks me that which OS i want to boot with Win 8.1 or Mac Os..  I searched on the internet and found two conflicting opinion some people said there are few MAC OS Version which can be directly installed on Intel PCs some says there aren't?   I am here to get rid of the confusion that is an official latest possible MAC OS version for Intel based PCs? If not what are my options if I want to run MAC OS on my PC.   Please not that Virtualization options won’t work for me, it has to be working as full OS not an os inside another. In Harry Potter and the Chamber of Secrets it is revealed that      Ginny is being possessed by Tom Riddle and is the one opening the Chamber of Secrets.   The book seems relatively without holes in this regard.  However in the movie when Harry discovers Justin Flinch-Fletchley we see moments prior to this      Ginny is studying in a room full of people.   This implies that the person opening the chamber of secrets couldn't have been in the chamber when the second attack occurs.  Is this just a goof in the movie or is there an alternate explanation for this?  Is the Basilisk acting on its own in the movie? 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? I got the following problem: Right now I am checking my equations, which are usually written in align. This looks great in most of the cases, but sometimes the pagebreaks are weird, ie there is a lot of vertical whitespace left (like 2.5cm) at the end of a page. I made the following MWE to illustrate this.  \documentclass[a4paper, 12pt, headsepline]{scrreprt} \usepackage[onehalfspacing]{setspace} \usepackage{amsmath, amssymb, mathtools} \usepackage{mathptmx} \usepackage[a4paper]{geometry} \geometry{left=2cm,right=5cm,top=2cm,bottom=2cm} % \usepackage{lipsum} %\lipsum \usepackage[pangram]{blindtext}  \begin{document} \Blindtext[1][3]%1 paragraph, 3 pangrams \begin{align} X_{t+1} &amp;=  \frac{X_{t+1}+X_{t+1}}{Y_t}  \label{eq:1}  \intertext{Solving...:} \notag  X_{t}  &amp;=  \frac{X_{t+1}+X_{t+1}}{Y_{t+1}} \notag \\ \intertext{Solving further...:} \notag  % ===PAGEBREAK HERE: 2nd page begins=== &amp;= \frac{X_{t+1}+X_{t+1}}{Y_t} +  \frac{X_{t+1}+X_{t+1}}{Y_t}  \notag \\ &amp;= \frac{X_{t+1}+X_{t+1}}{Y_t}...  \notag \\ \intertext{Solving further...:} &amp; = \frac{X_{t+1}+X_{t+1}}{Y_t}  \notag \end{align}  \end{document}   In the MWE, the first 'Solving further' should be on the first page instead (to save space and it would also look better I guess?). The position where I would like the pagebreak to be is also marked as a comment in the MWE.  My question is first on a general basis: Which is the best environment to achieve multiple line equations, which can be aligned as in align, and to save space at the same time? Or to be more precise: If possible, I'd like to stick with align and adapt the pagebreaks only if necessary.  Thanks! Access .mat file containing matlab classes in python Are more megapixels good?  Are more megapixels bad?  Do more megapixels increase detail? Do they make my images sharper? On the other side, is there a point that is too much? Do megapixels cause increased noise and other problems? How does print and viewing size come into it?  Widespread Internet-forum wisdom used to be that 6 megapixels was the sweet spot — below that just wasn't enough, but above that, there wasn't much benefit. File sizes got larger, but detail was lost to noise and other problems. The arguments are that cramming too many pixels into a small sensor makes each pixel too small to provide any real benefit, and that higher-megapixel sensors outresolve cheap lenses anyway. (Substitute something like 12 instead of 6 if we're discussing APS-C DSLRs, or 24 for full-frame.)  By 2011,  was in the range of 12-18 megapixels. In 2016 most were are in the 16-24 megapixel range. Certainly none are at 6 anymore; even smartphones come with 8 megapixel cameras. Does this offer any real improvement over that old "sweet spot"? Has technology improved to the point where the "wisdom" needs to be updated, or are we all suffering for marketing? Or have we gone past the sweet spot in some ways, but it's okay because of previously-un-argued points. (For example: more noise, sure, but more detail as well.)  Within the 16-24 megapixel common-today range, for the same sensor size, is there any actual benefit to the higher end? How do megapixels directly affect image quality with today's technology? What are the benefits and when do they apply? What are the drawbacks, and when do they apply? How should I adjust my technique (and expectations) based on my camera's megapixel count? Conjectures that have been disproved with extremely large counterexamples? I just came back from my Number Theory course, and during the lecture there was mention of the Collatz Conjecture.  I'm sure that everyone here is familiar with it; it describes an operation on a natural number – $n/2$ if it is even, $3n+1$ if it is odd.  The conjecture states that if this operation is repeated, all numbers will eventually wind up at $1$ (or rather, in an infinite loop of $1-4-2-1-4-2-1$).  I fired up Python and ran a quick test on this for all numbers up to $5.76 \times 10^{18}$ (using the powers of cloud computing and dynamic programming magic).  Which is millions of millions of millions. And all of them eventually ended up at $1$.  Surely I am close to testing every natural number? How many natural numbers could there be?  Surely not much more than millions of millions of millions. (I kid.)  I explained this to my friend, who told me, "Why would numbers suddenly get different at a certain point?  Wouldn't they all be expected to behave the same?"  To which I said, "No, you are wrong!  In fact, I am sure there are many conjectures which have been disproved by counterexamples that are extremely large!"  And he said, "It is my conjecture that there are none! (and if any, they are rare)".  Please help me, smart math people.  Can you provide a counterexample to his conjecture?  Perhaps, more convincingly, several?  I've only managed to find one! (Polya's conjecture). One, out of the many thousands (I presume) of conjectures. It's also one that is hard to explain the finer points to the layman. Are there any more famous or accessible examples? I am trying to prove that any conjugate of $a$ has the same order as $a$.  Let $G$ be a group and let $a \in G$.  An element $b \in G$ is called a conjugate of $a$ if $b=xax^{-1}$.  My professor gave us a hint.  Prove $a^k=e$ iff $b^k=e$ for all $k \in \mathbb{Z}$ implies $o(a) = o(b)$.  My first move is to $b^k = (xax^{-1})^k = (x^{-1})^ka^kx^k = (x^{-1})^kex^k = (x^{-1})^kx^k=x^{-k+k}=x^0$  I am not sure that I am doing this correctly?  I am trying to get $b^k=e$.  However when I raise $(xax^{-1})^k$, I am not sure if I what I have done is correct?  I am kind of confused here. How to programmatically send SMS on the iPhone? Problem with \mkbibdateapalongextra of biblatex-apa biblatex-apa gives me this:  ! Undefined control sequence. &lt;argument&gt; \mkbibdateapalongextra                                {labelyear}{labelmonth}{labelday}\iffieldu...   I'm using the default (english) language, and have done the:  \DeclareLanguageMapping{norsk}{norsk-apa} \DeclareLanguageMapping{english}{american-apa}   thing.   Here's a short example:  \documentclass[english]{memoir} \usepackage{babel} \usepackage{roffe} \usepackage[backend=biber,date=short,maxcitenames=2,style=apa]{biblatex}  \DeclareLanguageMapping{norsk}{norsk-apa} \DeclareLanguageMapping{english}{american-apa} \addbibresource{Papers2.bib} \addbibresource{R.bib}  \begin{document} \cite{R-base}  \printbibliography \end{document}   This one replicates the problem.