I have this question from an assignment, but the school's resources are inaccessible at the moment, so I need some help. Google is not very helpful for this.  I have only just installed ubuntu, so this is probably basic to some, but not me im afraid. Does anyone know how to 'Check the directory that your shell is currently in'? My assumptions are that terminal is considered my shell, and that I should look for the program file. I have looked around the usr subdirectories using ls. I can't find terminal listed there. If there is a better way to interpret the question I would like to hear about it. :)
I want to have a script that takes the current working directory to a variable. The section that needs the directory is like this dir = pwd. It just prints pwd how do I get the current working directory into a variable?
Using the fact that $n^3 + 5n$ is divisible by $6$, infer that $n^4 - 2n^3 + 11n^2 + 14n$ is always divisible by $24$ The problem is as stated in the title. I've tried factorization, but it doesn't seem to yield anything. Any help is greatly appreciated. Also please don't use modular arithmetic, thank you. How to know add/edit page in hook_form_alter? I want to know whether form is add/edit in hook_form_alter. In Drupal 7 we can get all these in hook_form_alter.  I tried like this in D7:  function MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id) {   // Check pages(s) , don't use $_GET.     if (strpos($form['#action'], '/add/') !== FALSE) {       $page = 'add';     }     if (strpos($form['#action'], '/edit') !== FALSE) {       $page = 'edit';     } }   Here I am getting add/edit in D7. Whereas in D8 I am not getting any it in $form['#actions']. And i don't want to use $_GET. Is there any way to check add/edit page in hook_form_alter. Why does performance of a regular hard drive decrease over the duration of a benchmark while SSD doesn't? I use HD Tune to measure performance of the hard drive.  The tests typically take 2-3 minutes and the transfer rate of a regular hard drive decreases dramatically as the test comes to a close.    However, the SSD drive performance stays the same over (pic below) the life of the test.  This happens on all my computers.  Why is that? Bug? LaTeX misparses nested optional arguments LaTeX seems to be having problems handling nested optional arguments. I've included a minimal code example that generates the error:  \documentclass[12pt,oneside]{book} \begin{document}  \newcommand{\termbad}[2][]{#2#1} \newcommand{\termgood}[2][]{#2#1}  \newcommand{\up}[1]{#1} \newcommand{\dd}[1][]{#1}  \termgood{\up{Tart}}{Pop} \termbad[\up{Tart}]{Pop}      \termgood{\dd[Tart]}{Pop} \termbad[{\dd[Tart]}]{Pop} %\termbad[\dd[Tart]]{Pop}   \end{document}   If you run this code, it works. If you remove the % in the second to last line, it fails with:  Runaway argument?  Tart{Pop} \par \par \end {document}  !File ended while scanning use of \dd.   After further tinkering, I have discovered the problem: LaTeX is reading the ] for the inner optional argument as the end of the outer optional argument and then passing a malformed argument in. So it is passing in \dd[Tart as the optional argument to \termbad instead of \dd[Tart].  This still feels like a bug to me. Nesting braces in arguments works, brackets should as well. The following are workarounds:   Enclose the inner optional argument in braces (as in the line before %). Redefine your inner function to require its argument instead of using optional arguments. Redefine your outer function to require its argument instead of using optional arguments.   Any one of the three works around the issue.  (Reposted here; question was originally posted to stackexchange and then closed instead of being migrated.) $\sum a_n$ be convergent but not absolutely convergent, $\sum_{n=1}^{\infty} a_n=0$ Let $\sum a_n$ be convergent but not absolutely convergent, $\sum_{n=1}^{\infty} a_n=0$,$s_k$ denotes the partial sum then could anyone tell me which of the following is/are correct?  $1.$ $s_k=0$ for infinitely many $k$  $2$. $s_k&gt;0$ and $&lt;0$ for infnitely many $k$  3.$s_k&gt;0$ for all $k$  4.$s_k&gt;0$ for all but finitely many $k$  if we take $a_n=(-1)^n{1\over n}$ then $\sum a_n$ is convergent but not absolutely convergent,but I don't know $\sum_{n=1}^{\infty} a_n=0$? so I am puzzled could any one tell me how to proceed? Normal subgroup of prime index Find $P(12)$ when $P(x)={1\over(x+1)}$, for $x=0,1,2,......11$ let $P(x)$ be a polynomial of degree $11$ such that  $P(x)={1\over(x+1)}$, for $x=0,1,2,......11$  then find value of $P(12)$ Converting shapefile To GeoJSON using ArcPy? User deleting code after question has been answered If a user keeps  (thus making the answer meaningless), what should we do? Rollback the edit (what if the user just deletes the code again)? Delete the question?  More examples (same user): ,  (see also edit histories). Proof by induction of summation inequality: $1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\dots+\frac1{2^n}\ge 1+\frac{n}2$ Prove by induction the summation of $\frac1{2^n}$ is greater than or equal to $1+\frac{n}2$.  We start with $$1+\frac{1}{2}+\frac{1}{3}+\frac{1}{4}+\dots+\frac1{2^n}\ge 1+\frac{n}2$$ for all positive integers.   I have resolved that the following attempt to prove this inequality is false, but I will leave it here to show you my progress. In my proof, I need to define P(n), work out the base case for n=1, and then follow through with the induction step. Strong mathematical induction may be used.  This is equivalent to $$\sum_{k=0}^n\frac1{2^k}\ge 1+\frac{n}2\;.$$  Let $P(n)$ be summation shown above.   Base case for $n=1$, the first positive integer,   $$\sum_{k=0}^1\frac1{2^k}=\frac1{2^0}+\frac1{2^1}=1+\frac12=\frac32\ge 1+\frac12=\frac32\;,$$  so base case is true.  Induction step: Assume $P(n)$ is true and implies $P(n+1)$. Thus   $$\sum_{k=0}^{n+1}\frac1{2^k}\ge\frac1{2^{n+1}}+\sum_{k=0}^n\frac1{2^k}\ge 1+\frac{n+1}2\;.$$  This can be written as   $$\sum_{k=0}^{n+1}\frac1{2^k}\ge \frac1{2^{n+1}}+1+\frac{n}2\ge 1+\frac{n+1}2\;.$$  I work the math out but I get stuck contradicting my statement. Please show your steps hereafter so I can correct my mistakes. dollar-terminated strings In my assembly language class, our first assignment was to write a program to print out a simple dollar-terminated string in DOS.  It looked something like this:  BITS 32     global _main  section .data     msg db "Hello, world!", 13, 10, ’$’  section .text _main: mov ah, 9 mov edx, msg int 21h ret   As I understand it, the $ sign serves to terminate the sting like null does in C.  But what do I do if I want to put a dollar sign in the string (like I want to print out "it costs $30")?  This seems like a simple question, but my professor didn't know the answer and I don't seem to find it using a google search. Computing the Lie bracket on the Lie group $GL(n, \mathbb{R})$ Consider the Lie group $GL(n, \mathbb{R})$. Since $GL(n, \mathbb{R})$ is an open subset of the space $M_{n,n}(\mathbb{R})$ of $n \times n$ matrices, we can identify the tangent space (Lie algebra) $T_{e}GL(n, \mathbb{R})$ with $M_{n,n}(\mathbb{R})$, where $e$ is the identity matrix. I'm trying to understand the following:  For all $x, y \in M_{n,n}(\mathbb{R}) = T_{Id}GL(n, \mathbb{R})$ we have $[x, y] = xy -yx$ where $[\cdot, \cdot]$ is the Lie algebra bracket.  According to the question , this seems to be the case for matrix Lie groups in general.  So far, I've worked out the following: Let $x \in M_{n,n}(\mathbb{R}) = T_{Id}GL(n, \mathbb{R})$ and let $X \in \Gamma^{inv}(TG)$ be the left invariant vector field corresponding to $x$, i.e. with $X(e) = x$. By openness, we can choose $\epsilon &gt; 0$ such that the curve $(-\epsilon, \epsilon) \ni t \mapsto e + tx$ through the identity is contained in $GL(n, \mathbb{R})$. For $g \in GL(n, \mathbb{R})$ let $L_g$ be the left multiplication by $g$ in $GL(n, \mathbb{R})$. Using left invariance of $X$ calculate: $$X(g) = ((L_g)_{*}X)(g) = D_eL_g(X(e)) = D_eL_g(x) = \frac{d}{dt}|_{t=0}g(e+tx) = gx$$ Now, the above implies for $f \in C^{\infty}(GL(n, \mathbb{R}))$ and $g \in GL(n, \mathbb{R})$: $$X(g)(f) = (D_gf)(gx)$$ where we identify the tangent vector $X(g)$ with the corresponding derivation at $g$.  Now how do I calculate $[x,y] \stackrel{def.}{=} [X, Y](e) \stackrel{\text{WHY?}}{=}xy-yx$ from this? sudo credential caching on by default Just installed a minimal ubuntu 12.04, then installed xfce4 and xinit from the command line after first boot.  Totally vanilla installation afaik.  I'm noticing that sudo caches the password until I issue sudo -k to clear it.  This is unexpected behavior in my mind.  I've run xfce4 before and don't recall credential caching being on, nor have I experienced it in the many previous ubuntu installs I've had over the years.  Is this a new feature of Ubuntu?  Is this something that's the result of the minimal install?  Is this an xfce default that's been added recently? Multiplication in Permutation Groups Written in Cyclic Notation ‘It’ – ambiguous antecedent? OSX Server: should I use Open Directory? Is $|xy|$ differentiable in $(0,0)$? Is $f(x,y) = |xy|$ differentiable in $(0,0)$? I have no idea how to approach this problem. I'm running a few VMs, and suddenly I noticed my CPU fan was spinning louder than usual. I tracked it down to Windows 8 doing some "automatic maintenance":      How can I turn this completely off? I found a way to set the time, but not a way to turn it off completely. Uniqueness in existence of a bilinear form Let $E$ be a finite dimensional vector space over field $\mathbb R$ with $E^*$ as the dual space of $E$.($\dim E=n$)   $\Omega^P(E):=\{ \alpha\colon \overbrace{E\times\cdots\times E}^{p- times}\rightarrow \mathbb R\  \ , \alpha \text{ is alternating multilinear map}\}$ $\Omega^P(E^*):=\{ u\colon \overbrace{E^*\times\cdots\times E^*}^{p- times}\rightarrow \mathbb R\  \ , u \text{ is alternating multilinear map}\}$  I wish to prove that there exist an $\textbf{unique}$ bilinear form $B\colon \Omega^p(E^*)\times\Omega^p(E)\rightarrow\mathbb R$   such that for all $ f_i\in E^* \ , u_j\in E^{**}\simeq E \qquad  i,j=1,\cdots,p$, it has the following rule:  $B(u_1\wedge\cdots\wedge u_p,f_1\wedge\cdots\wedge f_p)=\det[f_i(u_j)]$.  $\wedge$ is wedge product between alternating maps i.e. $\alpha\wedge\beta(v_1,\cdots,v_{p+p})=\dfrac{1}{p! p!}\displaystyle\sum_{\sigma\in S_{p+p}}sign(\sigma)\alpha(v_{\sigma(1)},\cdots,v_{\sigma(p)})\beta(v_{\sigma(p+1)},\cdots,v_{\sigma(p+p)})$  How can I do this? How does an accelerating charge radiate electromagnetic waves?