Automatic exit from Bash shell script on error
Aborting a shell script if any command returns a non-zero value
When is $\sin(x) = \cos(x)$? How do I solve the following equation?  $$\cos(x) - \sin(x) = 0$$   I need to find the minimum and maximum of this function:   $$f(x) = \frac{\tan(x)}{(1+\tan(x)^2}$$  I differentiated it, and in order to find the stationary points I need to put the numerator equal to zero. But I can't find a way to solve this trigonometric equation. How to change this matrix with respect to standard basis? Given the basis $\beta = \{ (1, 1, 0),\ (1, 0, -1),\ (2, 1, 0)\}$ and the matrix:  $$ A =         \begin{bmatrix}         1 &amp; 1 &amp; 0 \\         1 &amp; 1 &amp; 0 \\         0 &amp; 0 &amp; 1 \\         \end{bmatrix} $$  with respect to  $\beta$.  How to change this matrix with respect to standard basis? For example, on this page:   I see the following:   What does this 499 mean? I can't seem to correlate it with upvotes, posts, edits or anything else. How to check that a cubic polynomial is irreducible? What does linear time series refer to? In some papers or documents, "linear times series" seems to refer to a time series that can be modeled as a linear AR (auto-regressive) model.   In other places, "linear time series" seems to refer to a time series with a linear trend.   When someone just drops "linear time series" out of the blue without any context, what do they mean usually? It seems that $\{e\}, \{e,s\}, \{e,rs\}, \{e,r^2s\},...,\{e,r^{n-1}s\}, \{e,r,r^2,...,r^{n-1}\}, D_n$ are always subgroups of $D_n$. Especially when $n$ is odd, these seem to be the only subgroups. But when n is even, say $n=4$, then there are also $\{e,s,r^2,r^2s\}$ and $\{e,rs,r^2,r^3s\}$. It makes me wonder, is there a general formula/algorithm for finding all subgroups of $D_n$ when $n$ is even? PSTricks will not compile \documentclass[12pt]{article} \usepackage[paperheight=9in,paperwidth=13.24in,margin=0in]{geometry} \usepackage{pstricks} \usepackage{graphicx} \begin{document} \thispagestyle{empty} \psset{unit=1in} \begin{pspicture}(13.24in,9in) \psframe[fillstyle=solid,fillcolor=Maroon](0,0)(13.24,9)  \end{pspicture}  \end{document}   I am following a tutorial outlined here:   I am following the Robbers book.  Everything seems fine until I paste the \psframe[fillstyle=solid,fillcolor=Maroon](0,0)(13.24,9)  What could be the problem? Is there a statement whose undecidability is undecidable? We know there are statements that are undecidable/independent of ZFC. Can there be a statement S, such that (ZFC $\not\vdash$ S and ZFC $\not\vdash$ ~S) is undecidable? Why are Only Real Things Measurable? Why can't we measure imaginary numbers? I mean, we can take the projection of a complex wave to be the "viewable" part, so why are imaginary numbers given this immeasurable descriptor? Namely with operators in quantum mechanics, why must measurable quantities be Hermitian, and consequently real? Class imbalance strategies When dealing with the class imbalance problem in a binary classifier, there are three ways I know of to address it: over-sampling, under-sampling and using cost-sensitive methods.   Are there any guidelines, rules of thumb or general strategies to choose among these methods? A possible answer would be: over-sample when the positive class has more than 100 instances (I just made it up). Is it normal for BibTeX to replace similar author names with "------"? In my .bib file, I have two entries with exactly the same author names:  @article{Seshadrinathan2010A-Subjective-St,     Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack}, ....  @article{Seshadrinathan2009Study-of-Subjec,     Author = {K. Seshadrinathan and R. Soundararajan and A. C. Bovik and L. K. Cormack}, ....   When cited after each other, and typeset with the IEEEtran bibliography style, the .bbl file reads:  \bibitem{Seshadrinathan2010A-Subjective-St} K.~Seshadrinathan, R.~Soundararajan, A.~C. Bovik, and L.~K. Cormack, ``A   subjective study to evaluate video quality assessment algorithms,''   \emph{SPIE Proceedings Human Vision and Electronic Imaging}, 2010.  \bibitem{Seshadrinathan2009Study-of-Subjec} ------, ``Study of subjective and objective quality assessment of video,''   \emph{IEEE Transactions on Image Processing}, 2009.   As you can see, the author names have been replaced with ------. It looks like this in the final PDF:    Is this normal behavior? Need to find the recurrence equation for coloring a 1 by n chessboard Restore main APFS container to full disk In the TV show Quantum Leap Sam Beckett would travel history and "right" wrongs, temporarily displacing someone native to that timeline in the process. Would the memories of what Sam did transfer to the person he displaced upon his leaping out, or would they wind up with amnesia for the time Sam was there? Using restroom on airplane while fasten seatbelt light is on? This question about  over on  made me wonder what a passenger is supposed to do when they urgently have to use the restroom while the fasten seat belt light is on. FAA regulations require passengers to obey the seat-belt sign, even if flight attendants do not.  I saw this happen on a flight where an older gentleman asked the flight attendant if he could use the restroom, and she said "not until the light is off". The flight had been free of turbulence for 15 minutes or so by this time, and the flight attendants were walking freely throughout the cabin, collecting post-meal trash, etc. The gentleman who asked to use the restroom appeared to be in quite some discomfort, and practically ran to the restroom when the light went off 10 minutes later.  So what is a passenger supposed to do when he isn't permitted to use the lavatory, when he has to go and can't wait? Just go in their seat? When I type "[singular noun] and [singular noun]" in Word 2010, I find some interesting things.        Bread and butter is essential. (the auto-correction warns me of subject-verb disagreement.)   Bread and butter are essential. (OK)   A knife and fork is on the table. (OK)   A knife and fork are on the table. (OK)   The needle and thread is new. (OK)   The needle and thread are new. (OK)   Cost and revenue is directly linked. (OK)   Cost and revenue are directly linked. (OK)      I wonder how a native speaker would consider this phenomenon. NOT IN vs NOT EXISTS A closed form of $\int_0^1\frac{\ln\ln\left({1}/{x}\right)}{x^2-x+1}\mathrm dx$ This integral has been bugging me since yesterday:     $$\int_0^1\frac{\ln\ln\left({1}/{x}\right)}{x^2-x+1}\mathrm dx$$   I've tried substitution $y={1}/{x}$ and $e^y={1}/{x}$, but those didn't help much. Wolfram Alpha gives me result: $-0.67172$. Could anyone here please help me to obtain the closed form of the integral preferably (if possible) with elementary ways (high school methods)? Any help would be greatly appreciated. Thank you. Let $F$ be a field and let $a \neq 0$ be a zero of the polynomial $a_0 + a_1x + . . . +a_nx^n$ in $F[x]$.  I want to show that $\frac{1}{a}$ is a zero of the polynomial $a_n + a_{n-1}x + . . . + a_0x^n$  How can I do this? Is it possible to mark or segregate bad blocks on HDD? Hello I want to know if is it possible to mark bad blocks on HDD for OS to not use them. I don't want to save data written on this blocks, just want to get rid of them.  I found some article where author describe how to partition disk to avoid using bad blocks of HDD.  I count how many MB from the start are OK. And also how many MB from end are OK. It looks like I will lost about 50GB of storage space but it is quite fine for me when the disk will run one year more.  First I split disk to 2 partitions:   From beginning to around 190 GB From 190GB to the end   Then I made surface scan of 2nd partition and everything was OK. I was really happy cause i though that finally I will succeed.  Than I wanted to copy all data from 1st partition to 2nd BUT in some data a problem occurs. I/O error. I'd say it is Read problem but when I open file on which copying failed it runs OK, for example some pdf files didn't copied but I opened them.  What can be problem can it be a Write problem? But why there is a problem when surface scan on whole 2nd partition was fine?  What can I do(except buying new HDD)? Can I somehow do this partitioning and use just partition with good sectors? Will it work? How are data stored on the disk? Can I determine where the data will be written?