Java:Why should we use BigDecimal instead of Double in the real world?
Double vs. BigDecimal?
The exercise is: Prove that $-(-v)=v$ for every $v \in V$  Proof Suppose  $v \in V$ and $V$ is a vector space. Then $-(-v) \in V$ as result of the scalar multiplication property and $-(-v)=-(-1\cdot v)=-1 \cdot(-1\cdot v) =(-1 \cdot-1)\cdot v = 1 \cdot v = v $ The desired result $-(-v)=v$ holds.  The solution manual gives the proof:  Proof   I just wanted to make sure that the way I did the proof isn't missing anything?Thanks Functions that are sets of all function - proofs I'm going through the book Proofs and fundamentals, by Bloch, and it doesn't include a solution manual for it's examples. It doesn't have many examples on notation and proof strategy for certain cases, so I needed a little help.    Although I understand the idea, and can draw it out, I'm not sure how to write it in decent proof notation. Any help would be appreciated!   Edit: apologies, my idea is this: theres some function in $F(C,A\times B)$ such that theres some $x$ within $C$ that means $g(x)$ is within $A\times B$. Similarly, the second two imply that for some function within $F(A,C)$ there exists a value $x$ such that $g(x)=C$. and similarly for the third part from $B\rightarrow C$. It's easy to see with drawing it out that these two are the same because one will have a part within A and the other will lead to a part within $B$, so their cross will be the same. I wanted to go about proving it by setting a function $f$ within $F(C,AxB)$ and then working from there, but I really have no idea where to start or the notation. Clerical error in UK visa application, but form already submitted - what should I do? I'm from the Philippines, and I plan on travelling to the UK with my sister to visit a relative.  I have just submitted my visa application and have already paid online, when I noticed that I've made a clerical error. In the 'visit or stay' portion of section "Do you have any friends or relatives in the UK?", I clicked the 'no' box, instead of 'yes'.  My sister's application is correct. She selected 'yes'. Our appointment is due next month. I am planning to email them about this, and also inform them on the day of application submission.  Is this the right path to take? How to hook into the CPT's title placeholder? I want to change the default placeholder text in my Custom Post Type title field. This isn't possible while registering a new post type.  The following screenshot describes it. In comments, moderators have their diamonds in the OP rectangle:        And in the review (suggested edits), mods have their diamonds outside the blue OP background highlight rectangle:        Of course, it Doesn't Really Matter At All, but it is a small discrepancy (I am not saying that in the review, OP rectangles have a bigger padding). Where can I find computer modern fonts for use in other programs, e.g. Adobe Illustrator? For some complicated diagrams, I need to use something like Adobe Illustrator or Inkscape, and would like to include nicely typeset labels. (I'm aware of post-processing solutions, such as pinlabel.) One way to do this is to use a closely-matching font, and then convert fonts to outlines. Better, however, would be to use Computer Modern directly in Illustrator.  Where can I find a Computer Modern font compatible with Adobe Illustrator? Alternatives to "and/or"? The easy way: Install Nvidia drivers, CUDA, CUDNN and Tensorflow GPU on Ubuntu 18.04 Process Unicode files with BOM correctly with POSIX tools Elementary properties of closure Hi everyone I'd like to know if the following is correct. I really appreciate any suggestion. (Honestly the only one that matters me is the second property the others are easy, I think) Thanks.  Definition: Let $X\subset \mathbb{R}$ and let $x'\in \mathbb{R}$, we say that $x'$ is an adherent point of $X$ iff $\,\forall\varepsilon&gt;0\,\exists x\in X \text{ s.t.} \; d(x',x)\le \varepsilon$. We say that $\overline{X}$ is the closure of $X$ iff contain all the adherent points of $X$.  Lemma (Elementary properties of Closures): Let $X$ and $Y$ be arbitrary subset of $\mathbb{R}$. Then $X\subset \overline{X}, \; \overline{X\cup Y}=\overline{X}\cup\overline{Y},\; \overline{X\cap Y}\subset\overline{X}\cap\overline{Y}$. If $X\subset Y$ then $\overline{X}\subset \overline{Y}$.  Proof:  Clearly if $x\in X$,  $x$ is $\varepsilon$-adherent to $x$ (indeed is $0$-close to itself) for every $\varepsilon$, hence $x\in \overline X$.   Let $z'$ be an adherent point of $X\cup Y$, then there exists some $z\in X\cup Y$ such that $d(z',z)$ for a given $\varepsilon&gt;0$. Suppose  $z\in X$, hence $z'$ is an adherent point of $X$, i.e., $z'\in \overline{X}\subset \overline{X}\cup \overline{Y}$. Similarly when  $z\in Y$, $z'\in \overline{Y}\subset \overline{X}\cup \overline{Y}$. Thus $ \overline{X\cup Y}\subset\overline{X}\cup \overline{Y}$. We  know that $X\cup Y \subset\overline{X\cup Y}\subset\overline{X}\cup \overline{Y}$. Then $\overline{\overline{X\cup Y}}=\overline{X}\cup \overline{Y}$. Since $\overline{\overline{X\cup Y}} = \overline{X\cup Y}$ we're done.  Let $z'\in \overline{X\cap Y}$, i.e., $z'$ is an adherent point of $X\cap Y$. So, there is some $z\in X\cap Y \subset X$ such that $d(z',z)\le \varepsilon$ for any given $\varepsilon&gt;0$. It follows that $z'$ is an adherent point of $X$, i.e., $z'\in \overline{X}$. Similarly since $z\in X\cap Y \subset Y$ we have $z'\in \overline{Y}$. Hence $z'\in \overline{X}\cap\overline{Y}$.   Let $x'\in \overline{X}$ we'd like to show that $x'\in \overline{Y}$. Let $\varepsilon&gt;0$ be arbitrary then $\exists x\in X\subset Y$ such that $d(x',x)\le \varepsilon$, so $x'$ is an adherent point of $Y$, i.e., $x'\in \overline{Y}$ as desired. $\Box$     Claim 1: If $X\subset Y \subset \overline{X}$. Then $\overline{Y}=\overline{X}$.    Proof claim: Let $y'$ be an adherent point of $Y$, i.e., $y'\in \overline{Y}$ and let $\varepsilon&gt;0$ be given. Thus, $\exists y \in Y\subset \overline{X}$ s.t. $d(y,y')\le \varepsilon$. So, $y$ is an adherent point of $X$. Thus $\exists x\in X$ s.t. $d(x,y)\le \varepsilon$ and therefore  we must have $d(x,y')\le 2\varepsilon$ which shows that $y'$ is an adherent point of $X$, i.e., $\overline{Y}\subset \overline{X}$. Conversely if $x'$ is an adherent point of $X$. Then $\exists x\in X\subset Y$ s.t. $d(x,x')\le \varepsilon$, and so is adherent to $Y$. $\Box$     Claim 2: $\overline{\overline{X}} = \overline{X}$    Proof: It will suffice to show that if $x''\in \overline{\overline{X}}$, then $x''$ is an adherent point of $X$. Let $\varepsilon &gt;0$ be arbitrary and let $x''$ be an adherent point of $\overline{X}$. Then there is some $x' \in \overline{X}$ such that $d(x'',x')\le \varepsilon$. Since $x' \in \overline{X}$ by definition is an adherent point of $X$, so there is some $x\in X$ for which $d(x,x')\le \varepsilon$. Thus $d(x,x'')\le d(x,x')+d(x',x'')\le 2\varepsilon$ it follows that $x''$ is an adherent point of $X$ as desired. $\Box$ How do I copy to the clipboard in JavaScript? I need to start by stating that I have read through every single problem on here relating to mine, but all of them seem to have access somehow to their server's files. I do not, so here is my question.  I'm on centOS 6.5 and ssh closes connection right after a successful login. I am using mac and windows/putty to access my server with the same results. Is there anyway I can access my server now without having access to its files?   Below is the readout from ssh -vvv right after a successful login:  debug1: Authentication succeeded (password). Authenticated to 4X.5X.XX.2 ([4X.5X.XX.2]:82). debug1: channel 0: new [client-session] debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug2: callback start debug2: fd 3 setting TCP_NODELAY debug3: ssh_packet_set_tos: set IP_TOS 0x10 debug2: client_session2_setup: id 0 debug2: channel 0: request pty-req confirm 1 debug1: Sending environment. debug3: Ignored env TERM_PROGRAM debug3: Ignored env SHELL debug3: Ignored env TERM debug3: Ignored env TMPDIR debug3: Ignored env Apple_PubSub_Socket_Render debug3: Ignored env TERM_PROGRAM_VERSION debug3: Ignored env TERM_SESSION_ID debug3: Ignored env USER debug3: Ignored env SSH_AUTH_SOCK debug3: Ignored env __CF_USER_TEXT_ENCODING debug3: Ignored env PATH debug3: Ignored env PWD debug1: Sending env LANG = en_US.UTF-8 debug2: channel 0: request env confirm 0 debug3: Ignored env XPC_FLAGS debug3: Ignored env XPC_SERVICE_NAME debug3: Ignored env SHLVL debug3: Ignored env HOME debug3: Ignored env LOGNAME debug3: Ignored env _ debug2: channel 0: request shell confirm 1 debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug2: channel_input_status_confirm: type 99 id 0 debug2: PTY allocation request accepted on channel 0 debug2: channel 0: rcvd adjust 2097152 debug2: channel_input_status_confirm: type 99 id 0 debug2: shell request accepted on channel 0 Last login: Wed Oct  7 06:23:21 2015 from 1XX.XXX.X1.185 debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0 debug2: channel 0: rcvd eow debug2: channel 0: close_read debug2: channel 0: input open -&gt; closed debug2: channel 0: rcvd eof debug2: channel 0: output open -&gt; drain debug2: channel 0: obuf empty debug2: channel 0: close_write debug2: channel 0: output drain -&gt; closed debug2: channel 0: rcvd close debug3: channel 0: will not send data after close debug2: channel 0: almost dead debug2: channel 0: gc: notify user debug2: channel 0: gc: user detached debug2: channel 0: send close debug2: channel 0: is dead debug2: channel 0: garbage collecting debug1: channel 0: free: client-session, nchannels 1 debug3: channel 0: status: The following connections are open:   #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)  Connection to 4X.5X.XX.2 closed. Transferred: sent 3176, received 2640 bytes, in 0.3 seconds Bytes per second: sent 10370.6, received 8620.4 debug1: Exit status 254 Labels and nesting gather and align I have nested gather and align according to  \begin{gather}        \sum\limits_{i=1}^n i + \text{expression} = \dfrac{n(n-1)}{2} \label{l1}\\        \begin{align}             a+\text{expression}&amp;=b \\ %\label{l2} doesnt work             c&amp;=d+\text{expression} \\             e+\text{long expression}&amp;=f-\text{expression}        \end{align}  \end{gather}   to get an output looking like this:   The problem is that it is not possible to label all equations separately. The problem is identical to that discussed in , except  that in my problem the first line needs to be centered.  Thanks for any help. Repeat String - Javascript What is JSON and what is it used for? I've looked on Wikipedia and Googled it and read the official documentation, but I still haven't got to the point where I really understand what JSON is, and why I'd use it. I have been building applications using PHP, MySQL and JavaScript / HTML for a while, and if JSON can do something to make my life easier or my code better or my user interface better, then I'd like to know about it. Can someone give me a succinct explanation? "Open With" dialog ignores my selection Let's make the hot network questions icons clickable I would like to see the icons in the 'Hot Network Questions' right panel clickable, leading to the homepage of the site where the question comes from.  It would make it more comfortable to switch to the site when you want rather to visit it than to see that specific "hot" question. How can I generate a sin wave with power law noise? Modern electronics industry has developed very efficient LEDs with nice and fancy colors (“true green” , “cyan”, and “blue”) based in InGaN technology, or similar. Some of these LEDs are specified as having forward voltages of 3.2 to 4.2 V. Here are examples of such LEDs, , or surface-mount .  But the usual MCUs are powered from 3.3 V supply, and the GPIO output is usually at 3.1-3.2 V, which seems to be barely enough to drive these LEDs . How can I use these LEDs as indicators of some signal statuses, or power rail status? Do I need a series resistor R1 here?    If yes, how do I choose its value?  DISCLAIMER: This "question-answer" comes as elaboration of the original question , to address the particular use case of LEDs as logic state indicators. Content Assist for JSF2 + CDI (weld) beans + Eclipse Helios