It's Jan 1st and I buy 1 share of XYZ for $10. Jan 2nd I sell it for $9. Jan 3rd I buy it back for $9. Jan 4th I sell it for $8. Final loss: -$2 I understand this is a wash sale. But in my year end taxes, how does this work? Does the loss of -2 completely disappear? Or since I have closed out of the position does it apply?
I wonder about the Adjustments to Cost Basis after a wash sale occur. Considering this  ( from marketwatch.com) where someone: On 1 Dec, 2018 used an amount of money in his account to buy 100 shares of XYZ Co., for $2000 (to make it simple , let's say 1 Feb, 2019 to turn all the transactions into the same year) On 1 Apr, 2019 he sells the shares for $1200, and incurred a loss of 800$. On 10 Apr, 2019 he bought back 100 shares for $1300, and had a wash sale. The 800$ loss gets added to the cost basis of this transaction( and the basis becomes $2100) Now, If on 13 Apr 2019, he sold 100 shares for $1400; I'm pretty sure that the realized Gain/Loss record of this transaction would show something like this: &quot; XYZ Co. shares  100 , Proceeds $1400 , Cost basis  $2100(adjusted), Short-term Gain/Loss  -$700 &quot;. So, even though the Gain/Loss shows a negative number, he still got an actual profit of $100 from this sale, right?
Help, I cannot get my test code coverage higher than 75%! Code below modulo version of the quadratic formula and Euler's criterion Use the modulo version of the quadratic formula and Euler's criterion to decide if the following has a solution or not.  $2x^2+5x+8 \equiv 0\pmod{37}$  I'm not sure how I would use what was being asked of me to decide if this has a solution or not, but I have came to the conclusion that it does not, because I plugged in every possible answer $0-36$, and none of them were congruent to zero.  The way people have answered the question, isn't exactly the way I need.  I have made some progress, but I'm not exactly sure how to finish:  $2x^2+5x+8 \equiv 0\pmod{37}$  $x^2+21x+4\equiv0\pmod{37}$  $x^2+58x+841\equiv837\pmod{37}$  $(x+29)^2\equiv23\pmod{37}$  I know that if $p$ is an odd prime and $p$ doesn't divide $a$, then $x^2\equiv a\pmod{p}$ has a solution or no solution depending on whether $a^\frac{p-1}{2}\equiv 1  \space\space \text{or}\space -1\pmod{p}$.  This is where I get stuck.  Can someone help me from here?  I have a feeling this problem has no solutions, so could someone also explain to me what to do if a problem like this did have solutions. I have a cron job that runs every minute on an Ubuntu 12.04 box  $sudo crontab -e * * * * * mylogin /pathto/file.sh &gt; /log/filelog   If I run file.sh, the bash script does some stuff and echos out runs:  $ ./file.sh  runs   If I check the log of cron tab it shows that the job is running:  Jul 10 12:41:01 localhost CRON[1811]: (root) CMD (mylogin /pathto/file.sh &gt; /log/filelog) Jul 10 12:41:01 localhost CRON[1810]: (CRON) info (No MTA installed, discarding output) Jul 10 12:42:01 localhost CRON[1813]: (root) CMD (mylogin /pathto/file.sh &gt; /log/filelog)   However, the script is not running. It is not doing it's work and not echoing runs to /log/filelog.  $cat /log/filelog  #shows nothing   What other steps can I take to debug this problem? What it says on the tin, a foreign friend of mine has asked and I can't tell him; apart from it sounding horrible.  For example:  "Why is it raining today?"   Instead of:  "Why it is raining today?" Selectively coloring text in RichTextBox How can I paint in red every time I meet the letter "A" in RichTextBox? At this time, Wubi does not work with Windows 8 default boot-loader. Thus at this point Wubi would not work on a new Windows 8 machine.      Citation fom    Question  Recently I've learned of , a way to install Ubuntu right from Windows.  Besides installing from Windows, I would like to know key differences between a regular "alongside Windows" or Dual-boot Ubuntu installation and one done with Wubi. Are there any disadvantages (for example a performance penalty) or incompatibilities I should look out for when using Wubi? An item to break only SPECIFIED blocks? I know that I can make certain blocks only placeable on a specified block, but what is the command to give an item that can only BREAK certain blocks? If each suit is represented then we will have two cards from one suit and one card each from the remaining suits. So I am counting the ways this can happen like so -  ${52 \choose 1}$ ways of selecting the first card.  ${12 \choose 1}$ ways of selecting a card from the same suit as the first.  ${13 \choose 1}$ ways of selecting a card for each of the 3 remaining suits.  So I have -  $${52 \choose 1}{12 \choose 1}{13 \choose 1}{13 \choose 1}{13 \choose 1}$$  Then I have the sample space as $52 P 5$ as we are counting with regard to order on the numerator so we need to do the same for the denominator.  So I have $$\frac{{52 \choose 1}{12 \choose 1}{13 \choose 1}{13 \choose 1}{13 \choose 1}}{52P5}$$  Does that look correct? I want to earn Unicoins for free but I can't seem to find the best way mine coins faster. There are also sometimes when I get 20-30 Unicoins at one time, and I think that there is some clue so that we can know which rocks contain lots of Unicoins.. So do you have any idea you can share? How many connected components does $\mathrm{GL}_n(\mathbb R)$ have? How can Zeno's dichotomy paradox be disproved using mathematics? A brief description of the paradox taken from :     Suppose Sam wants to catch a stationary bus. Before he can get there, he must get halfway there. Before he can get halfway there, he must get a quarter of the way there. Before traveling a quarter, he must travel one-eighth; before an eighth, one-sixteenth; and so on.      This description requires one to complete an infinite number of tasks, which Zeno maintains is an impossibility. This sequence also presents a second problem in that it contains no first distance to run, for any possible (finite) first distance could be divided in half, and hence would not be first after all. Hence, the trip cannot even begin.      The paradoxical conclusion then would be that travel over any finite   distance can neither be completed nor begun, and so all motion must be   an illusion.   How can this be disproved using math, as obviously we can all move a walk from one place to another? When I look in sys.sql_logins, I see a column called is_policy_checked. Can I trust that my password policy has been checked for all of the logins where this column value is 1? Does installing and using Wine open up your Linux platform to Windows viruses? GCD in a PID persists in extension domains Consider the following piece of Markdown code:  This is some regular text.      &gt;&gt;&gt; def factorial(n):     ...     return 1 if n &lt; 2 else n * factorial(n - 1)     ...   * This is a list item.      &gt;&gt;&gt; def factorial(n):     ...     return 1 if n &lt; 2 else n * factorial(n - 1)     ...    Notice that the second code block is preceded by a list item.   Why is the factorial code not properly formatted under these circumstances? To demonstrate the problem, I'll insert the Markdown code show above:    This is some regular text.  &gt;&gt;&gt; def factorial(n): ...     return 1 if n &lt; 2 else n * factorial(n - 1) ...     This is a list item                 def factorial(n):       ...     return 1 if n &lt; 2 else n * factorial(n - 1)       ...               This applies to numbered as well as unnumbered lists. List all my drafts In GMAIL you can list all your boss-tell-off and wife-cuss-out emails by clicking Drafts    I'd like to see my started-but-never-finished responses, possibly between x Answers and y Votes in /&lt;&lt;user&gt;&gt;/Stats/? When I create a new Date object, it is initialized to the current time but in the local timezone. How can I get the current date and time in GMT? Global setting of spacing between items in itemize environment for beamer Hide processes from other users based on groups (under Linux)? Is it possible to configure process hiding for certain user groups under a linux system?  For example: Users from group X should not see processes owned by users from group Y in ps/top or under /proc.  Is it possible to configure such a setup with SELinux?  (I vaguely remember a similar feature in the funny grsecurity patch set - but IIRC, it was more generic - and besides, I want to configure a stock linux distro without having to maintain a custom kernel.)  Edit: For better illustration, . The example is not that generic, but one can configure that a user or some users can only see information of their own processes in ps etc. Question about the proof of Ramsey's Theorem I was reading up on a proof of Ramsey's Theorem and I can't understand this part of the proof:      Pick a vertex $v$ from the graph, and partition the remaining vertices into two sets $M$ and $N$, such that for every vertex $w$, $w$ is in $M$ if $(v, w)$ is blue, and $w$ is in $N$ if $(v, w)$ is red. Because the graph has $R(r - 1, s) + R(r, s - 1) = |M| + |N| + 1$ vertices, it follows that either $|M| \geq R(r − 1, s)$ or $|N| \geq R(r, s − 1)$.   Why is that $|M| \geq R(r − 1, s)$ or $|N| \geq R(r, s − 1)$? I know from the proof of $R(3,3) = 6$ that given a vertex, at least $3$ are guaranteed to be either red or blue, so what is the pigeonhole argument for the general case?