I'm stuck on a detail in the proof of the following:  Let $R$ be a commutative ring with $1\neq 0$. Prove that if every proper ideal of $R$ is prime, then $R$ is a field.  Since $0 \neq 1$ we have that $\{0 \}$ is a proper ideal of $R$.  Further, $R$ is an integral domain since if $a\cdot b \in \{0\}$, then either $a=0$ or $b=0$ as $\{0\}$ is prime.  Now I would like to prove that $\{0\}$ is the only proper ideal of $R$ which would imply that $\{0\}$ is maximal and $F/\{0\} \cong F$ is a field.  My idea is that if $A,B \subseteq R$ are two proper ideals then it must be that $A = B$, and therefore any proper ideal of $R$ is $\{0\}$.  Notice that $AB \subseteq B$ so that $AB$ is also a proper ideal of $R$.  Since $AB \subseteq AB$, and $AB$ is prime, we have that either $A \subseteq AB \subseteq A$ or $B \subseteq AB \subseteq B$, which implies that either that $B = AB \subseteq A$ or $A = AB \subseteq B$.  Say $B = AB \subseteq A$.  I'm now stuck trying to show that $A \subseteq B$.    Is there a better way to do this?  I have also tried picking $r \in R\setminus\{0\}$, and showing that $r^{-1} \in R$ without success.
Let $R$ be a commutative ring with $1$. Suppose that all ideals $I \neq R$ are prime. Prove that $R$ is a field.   Help me some hints.  Thanks a lot.
Abnormal behavior with iwlwifi driver: the device is shown as not working After closing paint the last used settings went back to default. I want them to be saved. Like the selected Brush-Tool, Color, Line-strength, etc.  Either after every usage or I define one I use most. Maybe through the registry or by start parameters? Capture characters from standard input without waiting for enter to be pressed How to solve differential equations of the form $f'(x) = f(x + a)$ What could one do to find analytic solutions for $f'(x) = f(x + a)$ for various values of $a$?  I know that $c_1\sin(x + c_2)$ is solution when $a = \frac{1}{2}\pi$, and of course $c_1e^x$ when $a = 0$.  For instance, is there a function satisfying $f'(x) = f(x + 1)$?  What about negative or imaginary $a$?  Is there possibly a generalization? In a triangle $\angle A = 2\angle B$ iff $a^2 = b(b+c)$ Prove that in a triangle $ABC$, $\angle A = \angle 2B$, if and only if:  $$a^2 = b(b+c)$$  where $a, b, c$ are the sides opposite to $A, B, C$ respectively.   I attacked the problem using the Law of Sines, and tried to prove that if $\angle A$ was indeed equal to $2\angle B$ then the above equation would hold true. Then we can prove the converse of this to complete the proof.   From the Law of Sines,   $$a = 2R\sin A = 2R\sin (2B) = 4R\sin B\cos B$$  $$b = 2R\sin B$$  $$c = 2R\sin C = 2R\sin(180 - 3B) = 2R\sin(3B) = 2R(\sin B\cos(2B) + \sin(2B)\cos B)$$  $$=2R(\sin B(1 - 2\sin^2 B) +2\sin B\cos^2 B) = 2R(\sin B -2\sin^3 B + 2\sin B(1 - \sin^2B))$$  $$=\boxed{2R(3\sin B - 4\sin^3 B)}$$  Now,   $$\implies b(b+c) = 2R\sin B[2R\sin B + 2R(3\sin B - 4\sin^3 B)]$$  $$=4R^2\sin^2 B(1 + 3 - 4\sin^2 B)$$  $$=16R^2\sin^2 B\cos^2 B = a^2$$  Now, to prove the converse:  $$c = 2R\sin C = 2R\sin (180 - (A + B)) = 2R\sin(A+B) = 2R\sin A\cos B + 2R\sin B\cos A$$  $$a^2 = b(b+c)$$  $$\implies 4R^2\sin^2 A = 2R\sin B(2R\sin B + 2R\sin A\cos B + 2R\sin B\cos) $$  $$ = 4R^2\sin B(\sin B + \sin A\cos B + \sin B\cos A)$$  I have no idea how to proceed from here. I tried replacing $\sin A$ with $\sqrt{1 - \cos^2 B}$, but that doesn't yield any useful results. Is it possible to transform an armature into a curve? I have a tunnel that I want a camera to go through, and want to replace the armature with a curve so it moves exactly on that path. I'd like the camera to also rotate to follow the bends of the tunnel. Using cycles.   Appreciate it, the problem I'm having now is that the camera follows the path, but after each turn, kind of snaps back or bumps, like a recoil of sorts. I reduced the size of the turns, but it still happens. And within the graph editor I can't change the interpolation mode, it's all greyed out. The only reason it looks kind of decent is because the camera is set to 15mm. Any ideas? I have the following code for a Figure with 4 subfigures:  \documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption}  \begin{document}  \begin{figure}[b]     \centering     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm1.pdf}         \subcaption{$Q^{*}$ values for arm 1}         \label{fig:arm1}     \end{subfigure}     ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm2.pdf}         \subcaption{$Q^{*}$ values for arm 2}         \label{fig:arm2}     \end{subfigure}      ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm3.pdf}         \subcaption{$Q^{*}$ values for arm 3}         \label{fig:arm3}     \end{subfigure}      ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm4.pdf}         \subcaption{$Q^{*}$ values for arm 4}         \label{fig:arm4}     \end{subfigure}      \caption{$Q^{*}$ values for different arms}     \label{fig:arms} \end{figure}  \end{document}   This results in   But this way, the 4 subfigures are too large to fit on 1 page. I would like to split this over 2 pages, keeping the subcaptions a, b, ... How can I do this? Does the order of declaration matter in Java/C#? In C++ I can't use a method if I declare it after the calling method.    Does this order matter in other languages like Java or C#? Do we know anything about Aragorn's first time in Moria? When the Company is forced to abandon their attempt to cross the Misty Mountains via the Redhorn Gate (the pass of Caradhras), Gandalf proposes they go "neither over the mountains, nor round them, but under them," via Moria. During the debate Aragorn remarks:     "I too once passed the Dirmrill Gate but though I also came out again, the memory is very evil. I do not wish to enter Moria a second time."    I haven't read much beyond the LOTR trilogy other than The Silmarillion. Does Tolkien ever describe Aragorn's first visit to Moria anywhere? What is a "callback" in C and how are they implemented? From the reading that I have done, Core Audio relies heavily on callbacks (and C++, but that's another story).    I understand the concept (sort of) of setting up a function that is called by another function repeatedly to accomplish a task.  I just don't understand how they get set up and how they actually work.  Any examples would be appreciated. Do you have to pass delete the same pointer that was returned by new, or can you pass it a pointer to one of the classes base types?  For example:  class Base { public:     virtual ~Base();     ... };  class IFoo { public:     virtual ~IFoo() {}     virtual void DoSomething() = 0; };  class Bar : public Base, public IFoo { public:     virtual ~Bar();     void DoSomething();     ... };  Bar * pBar = new Bar; IFoo * pFoo = pBar; delete pFoo;   Of course this is greatly simplified.  What I really want to do is create a container full of boost::shared_ptr and pass it to some code that will remove it from the container when it is finished. This code will know nothing of the implementation of Bar or Base, and will rely on the implied delete operator in the shared_ptr destructor to do the right thing.  Can this possibly work? My intuition says no, since the pointers will not have the same address.  On the other hand, a dynamic_cast&lt;Bar*> should work, so somewhere the compiler is storing enough information to figure it out.  Thanks for the help, everybody who answered and commented. I already knew the importance of virtual destructors, as shown in my example; after seeing the answer I gave it a little thought, and realized the whole reason for a virtual destructor is this exact scenario. Thus it had to work. I was thrown by the absence of a visible means of converting the pointer back to the original. A little more thinking led me to believe there was an invisible means, and I theorized that the destructor was returning the true pointer for delete to release. Investigating the compiled code from Microsoft VC++ confirmed my suspicion when I saw this line in ~Base:  mov eax, DWORD PTR _this$[ebp]   Tracing the assembler revealed that this was the pointer being passed to the delete function. Mystery solved.  I've fixed the example to add the virtual destructor to IFoo, it was a simple oversight. Thanks again to everyone who pointed it out. What do you call a person who keeps talking about art; studies art, criticizes art, and thinks he'd be amazing with it. But he doesn't practice it How to know if an object has an attribute in Python Is there a way in Python to determine if an object has some attribute?  For example:  &gt;&gt;&gt; a = SomeClass() &gt;&gt;&gt; a.someProperty = value &gt;&gt;&gt; a.property Traceback (most recent call last):   File "&lt;stdin&gt;", line 1, in &lt;module&gt; AttributeError: SomeClass instance has no attribute 'property'   How can you tell if a has the attribute property before using it? Performance of try-catch in php What kind of performance implications are there to consider when using try-catch statements in php 5?   I've read some old and seemingly conflicting information on this subject on the web before. A lot of the framework I currently have to work with was created on php 4 and lacks many of the niceties of php 5. So, I don't have much experience myself in using try-catchs with php. Restoring backups failing Ubuntu 16.04 Which singular names ending in “s” form possessives with only a bare apostrophe? Schengen area 90 days limit: Can I leave on the 91st day? Can anyone tell me if the 90 days is in fact 90 nights? Can you leave the Schengen area on the 91st day? Or are you only allowed 89 nights and you are required to leave on the 90th day? I use ubuntu to deal with daily job. Now I buy a new laptop, and I want to migrate my whole system(programs, packages, data, settings, etc) to the new machine.  I know I can copy my home folder to new machine and I will get (almost) all data and settings. But is there a safe way to copy the whole system? Or it's a bad idea? I am trying to install Wordpress on Lubuntu. I followed the instructions . Including PHP Apache and MySQL setups. Apache and MySQL appear to be running fine.  However, when I go to http://localhost/blog/, I get the following error:     Neither /etc/wordpress/config-localhost.php nor /etc/wordpress/config-localhost.php could be found.   Ensure one of them exists, is readable by the webserver and contains the right password/username. When clicking continue on the first Boot Camp screen,  I am presented with a dialog that displays:     The startup disk does not have enough space to be partitioned.   You must have at least 39 GB of free space available.     This is despite "About this Mac" reporting 271GB of free space:    And "Disk Utility" reporting 268GB of free space:    Searching online I found  which suggested it was the result of Time Machine which i recently enabled and suggests to run sudo tmutil thinlocalsnapshots / 999999999999 which I did, it ran sucessfully, and I restarted, yet to no avail.  What is the solution to this instance of Apple's poor engineering?  Running macOS High Sierra 10.13.4 (17E202)