Bash script not working on Automator but working from terminal
ffmpeg working from command line in Terminal but not in an Automator shell script!
Problem with ListVectorPlot3D Original  The remainder provided by polynom.sty is NOT complete (as shown in the following figure).      My Objective  When I was in senior high school, my teacher made the diagram like below. :-)  Thus the final step must show the TOTAL remainder and mark it with L-shaped curve.  NOTE  I am sorry. The previous post I forgot to put back -1/4 in the original position. It have made you confused. Now there is no mistake anymore. :-)      Minimal Code  \documentclass{article} \usepackage{polynom,array} \usepackage[table]{xcolor}   \makeatletter \def\pld@ArrangeResult#1{%     \ifx\pld@remainder\@empty         \@tempcnta\pld@maxcol\relax         \pld@InsertItems@do\pld@lastline             {\pld@firsttrue\pld@PLD{\pld@R{0}{1}}}%     \fi     \ifnum\pld@currstage&gt;\z@         \pld@Extend\pld@allines{\pld@lastline\cr}%     \else         \pld@InsertFake\pld@lastline     \fi     \pld@iftopresult         \def\pld@lastline{\pld@PrintPoly\pld@divisor%         %====================================================================================         \quad\smash{{\color{red}\rule[-6pt]{\arrayrulewidth}{17pt}}}\kern-\arrayrulewidth&amp;}%         %====================================================================================     \else         \let\pld@lastline\@empty         \ifx B\pld@style\else             \def\pld@lastline{\pld@leftdelim\strut\pld@rightxdelim&amp;}%         \fi     \fi     \expandafter\pld@AR@col\expandafter\pld@PLD                            \expandafter\pld@lastline#1+\relax+%     \pld@SplitQuotient     \pld@iftopresult         \let\pld@currentline\@empty         \expandafter\pld@AR@col\expandafter\pld@PLD                                \expandafter\pld@currentline                                            \pld@quotient+\relax+%         \expandafter\pld@AR@col\expandafter\pld@XPLD                                \expandafter\pld@currentline                                            \pld@shadow+\relax+%         \edef\pld@subline{%             \noexpand\cline{\tw@-\pld@maxcol}%             \noalign{\vskip\jot}}%         \pld@Extend\pld@currentline{\expandafter\cr\pld@subline}%     \else         \@tempcnta-\@tempcnta         \advance\@tempcnta\pld@maxcol\relax \advance\@tempcnta\@ne         \edef\pld@span{\the\@tempcnta}%         \ifx B\pld@style           \pld@AddTo\pld@lastline{%             &amp;\multispan\pld@span${}=%             \pld@PrintPolyWithDelims\pld@divisor             \expandafter\pld@IfSum\expandafter{\pld@divisor}{}{\cdot}%             \expandafter\pld@IfSum\expandafter{\pld@quotient}\pld@true                                                              \pld@false             \pld@if \pld@leftdelim                     \pld@PrintPolyShadow                     \pld@rightdelim               \else \pld@PrintPolyShadow \fi             \pld@firstfalse             \expandafter\pld@PrintRemain\expandafter{\pld@remainder}$}%         \else           \pld@AddTo\pld@lastline{%             &amp;\multispan\pld@span$\pld@leftxdelim\strut\pld@rightdelim             \pld@div             \pld@PrintPolyWithDelims\pld@divisor=             \pld@PrintPolyShadow             \ifx\pld@remainder\@empty\else                 +{}%                 \setbox\z@=\hbox{$\displaystyle                   \frac{\let\strut\@empty\pld@firsttrue \expandafter                         \pld@PrintRemain\expandafter{\pld@remainder}}%                        {\let\strut\@empty\pld@PrintPoly\pld@divisor}$}%                 \dp\z@=\z@\box\z@             \fi             $}%         \fi     \fi \expandafter\pld@AR@\pld@allines\relax} \makeatother   \arrayrulecolor{red} \arrayrulewidth=0.8pt \def\strut{\rule[-6pt]{0pt}{12pt}}  \begin{document} \polylongdiv[style=A]{\frac{3}{7}x^9+x^2-\frac{1}{4}}{\frac{9}{5}x^4-1}  \vspace{1cm} \polylongdiv[style=A]{x^4-1}{x^2-1} \end{document} Prove that the polynomial $(x-1)(x-2)\cdots(x-n) + 1$, $ n\ge1 $, $ n\ne4 $ is irreducible over $\mathbb Z$ I try to solve this problem. I seems to come close to the end but I can't get the conclusion. Can someone help me complete my proof. Thanks          Show that the polynomial $h(x) = (x-1)(x-2)\cdots(x-n) + 1$ is irreducible over $\mathbb Z$ for all $n\ge1$ and $ n\ne4$.      Suppose $h(x) = f(x) g(x)$, then we must have $f(i)g(i) = 1$ for all $i = 1,2,...n$. So both $f(i)$ and $g(i)$ are $1$ or $-1$. In either case, $m(x) = f(x) - g(x)$ has degree smaller than $n$ and have $n$ different roots ($1,2,...,n$). So we must have $m(x) = 0$. Then $h(x) = f(x)^{2}$. So $n$ must be even. Let $n = 2k$. Because $f(x)$ has degree $k$, there are $k$ values from $\{1,2,...,2k\}$ at which $f(x)$ is $1$ and $k$ values at which $f(x)$ is $-1$.  This is where I got stuck. Hope some one can help me solve this. Thanks. I'm using Windows 7 as the host machine with VMWare Workstation 9. I created a virtual machine Ubuntu Desktop 12.04 LTS 64 bit version. There are two options for log in, Ubuntu and Ubuntu 2D. Whenever I log in to Ubuntu, the task bar will not show up, is like having a black margin all around the desktop background and only the center is visible.  I wish I could attached a pic, but I need at least 10 reputation.  When I move my mouse over the left side of the desktop I can see that something is there but it is shown only as a black square. I tried deleting the virtual machine I created for Ubuntu and re-installed it, but it keeps appearing like that.  When I switched to log in with the Ubuntu 2D version everything worked alright. I could see the task bar, the icons, the clock etc. What might be causing this problem? How do you clear a stringstream variable? I've tried several things already,  std::stringstream m; m.empty(); m.clear();   both of which don't work. Let $p, q \in \mathbb{R}^n$ such that $\|p\| = \|q\| = 1$ and define $$A = pq^T + qp^T$$ Find the null space of $A$.    I am not having very much luck. I have managed to show that $p + q$ and $p - q$ are eigenvectors, but I can't seem to connect those two. I know that since $A$ is generated by an outer product, it is of rank one. That implies that the rank of the null space is $n - 1$, but I can't seem to get any further. Can anyone help? Show that $ a，b, \sqrt{a}+ \sqrt{b} \in\mathbb Q \implies \sqrt{a},\sqrt{b} \in\mathbb Q $ Inspired by , I was wondering if there is a simple logical argument to   Show that $ a,b, \sqrt{a}+ \sqrt{b} \in\mathbb Q  \implies  \sqrt{a},\sqrt{b} \in\mathbb Q $  Note that the original link is using a computational method, where as I am looking for a simple logical argument.  I tried (unjutifiably) to argue that if some of two square roots is rational then each one is rational, this is a different than the (incorrect) argument that if sum of two algebraic numbers is rational then each one is rational ( counter example $a=1-\sqrt{2},b= 1+\sqrt{2} $) How to cite sources written in a different language than English? Site specific magic comment links Shortcut in Windows 7 to switch between same application's windows, like Cmd + ` in OS X Is there a shortcut in Windows 7 to switch between windows in a given application only? I very much like this feature in OS X; what is its equivalent in Windows? Is there any hint that some of the beings in Tolkien's lore may have survived into "our" times? In Tolkien's lore, they are many very old beings. Is there any indication that some or even one would have been truly immortal and survived into what we would call "our" history or Age? Galadriel, Cirdan, Ingwe, Bombadil, Ungoliant, or any Maia or Ainur? Anyone or anything? Seems there must be some kind of carry-over seeing as how "man" existed in this time. Use Data From Class Without A New Init What is the difference between new/delete and malloc/free? What is the difference between new/delete and malloc/free?  Related (duplicate?): Performing deep learning land cover classification using R? I am really new to Deep Learning and, unfortunately, I can't find example codes on land cover classification other than  where the author wrote a script in R for a large dataset.   The main reason that I am asking is because recently I found a few papers on Remote Sensing Image classification using Deep Learning and I was wondering if there were any R examples on that subject.  So, is there a code example, preferably a step-by-step, which I can use?  I found several git repos like  that can do Deep Learning classification with R, BUTT, I am still looking for a simple multi-spectral image segmentation method. An example of that can be found at  and I also found a similar question in  for which the answer is "use something else other than R if you can".  If I find anything that works today I will be posting a working answer. How is Faulhaber's formula derived? I have been wanting to understand how to find the sum of this series.   $$1^p + 2^p + 3^p +{\dots} + n^p$$  I am familiar with Gauss' diagonalised adding trick for the sum of the first $n$ natural numbers.  I can prove the formulas for  $$\begin{align}   \sum_{1}^{n} k^2 &amp;= \frac{n(n+1)(2n+1)}{6}\\  \sum_{1}^{n} k^3 &amp;= \frac{n^2(n+1)^2}{4}\\ \sum_{1}^{n} k^4 &amp;= \frac{n(n+1)(2n+1)(3n^2+3n-1)}{30} \\ \end{align}$$  With mathematical induction. But, beyond that even proofs with mathematical induction are difficult.  I'm interested in learning the theory and the proof behind Faulhaber's formula. What is the knowledge required to understand this proof ? When given $p = 5, q = 11, N = 55$ and $e = 17$, I'm trying to compute the RSA private key $d$.  I can calculate $\varphi(N) = 40$, but my lecturer then says to use the extended Euclidean algorithm to compute $d$. That's where I get stuck.    Here's my work so far:  First I use the Euclid algorithm to calculate:  40 = 2(17) + 6  17 = 2(6) + 5 6 = 1(5) + 1 = gcd   So I know the GCD is 1. Applying the 'extended' section of the algorithm:  6 = 40-2(17) 5 = 17-2(6) 1 = 6-1(5) 1 = 6-1(17-2(6)) 3(6) = 1 (17) 3(40 - 2(17)) - 1(17) 3(40) - 3(17)   I know the answer is $33$, but I have no idea how to get there using the extended Euclidean algorithm. I can't figure out why I'm getting $3(40) - 3(17)$ when I know the answer should contain $33$. Creating triangle commutative diagram with tikz-cd I've just started using TikZ and need to create a simple triangle commutative diagram like this one.    The closest I've been able to get is this.   How do I get the h arrow to go from A2 to A3? Everything I've tried just causes errors.  Here's my current code:  \begin{tikzcd}[column sep=small] A \arrow{r}{i}  \arrow{rd}{g}    &amp; A3 \arrow{d}{h} \\     &amp; A2 \end{tikzcd} Finding the value of $\int_0^{\pi/2} \frac{dt}{1+(\tan(x))^{\sqrt{2}}}$ The problem: Find the value of $\displaystyle\int_0^{\pi/2} \frac{dx}{1+(\tan(x))^{\sqrt{2}}}$   I tried a few different substitutions and the closest I got to an okay looking integral is $$\int_0^\infty \frac{t^2 \, dt}{t^{1/\sqrt{2}}(1+\sqrt{t})},$$ which still looks scary. How do I approach this integral? It used to be that the new, super wide, touch friendly context menu style that Google introduced a few versions of Chrome ago could be turned off using the start up flag "--disable-new-menu-style".  As of Chrome 28, this is no longer the case, and as a desktop user it is very irritating to see menus that previously fit in the screen not to do so anymore — I don't think I can get used to it. Is there any way around it? If the flag is gone for good, can the style of the context menus be perhaps edited with custom css like the web inspector? In the recent post , Werner helped me to redefine a proof environment which can be hidden by an optional boolean argument (showProof). Without an argument, somehow the line/paragraph breaking is not correct. How can one fix this?  \documentclass{scrartcl}  \usepackage{ifthen} \usepackage{environ} \usepackage{amsthm}  \newboolean{showProof}% for showing proofs \setboolean{showProof}{true}% setting the switch \newif\ifstarttheorem  % proof environment (with hide feature) \makeatletter \providecommand{\env@proof@save@env}{} \providecommand{\env@proof@process}{} \RenewEnviron{proof}[2][showProof]{   \gdef\@tmp{#1}%   \ifthenelse{\boolean{#1}}{\par\pushQED{\qed}%     \normalfont\topsep2\p@\@plus2\p@\relax     \trivlist\item[\hskip\labelsep\sffamily\bfseries Proof~#2]\gdef\mycurrenvir{proof}\global\starttheoremtrue\mbox{}\hfill\\*\ignorespaces     \BODY}{\ignorespaces} }[\ifthenelse{\boolean{\@tmp}}{%   \gdef\mycurrenvir{\relax}   \popQED\endtrivlist\@endpefalse }{\ignorespacesafterend}] \makeatother  \begin{document} Just some text \begin{proof}   Just some text in a standard proof. As we can see, there is a problem. \end{proof} \begin{proof}[false]   Proof with optional argument set to \texttt{false}. This proof correctly does   not appear. \end{proof} \begin{proof}[showProof]{(Heading)}   Proof with optional argument (\texttt{true}) and second argument ``(Heading)'' \end{proof} \end{document}