I have this function that echoes the recent directory  funtion prompt_oldpwd() {   local oldpwd="";      # check if the $OLDPWD is set and not empty     if [ ! -z "${OLDPWD}" ]; then         # truncate $OLDPWD value and set it to oldpwd        oldpwd="${OLDPWD##*/}";      else      return;      fi  echo "${oldpwd}";  }   if the $OLDPWD variable is set and not null it prints the truncated value.   It works fine when I call the function inside the terminal but when use in a prompt like this:  export PS1="$(prompt_oldpwd)"   it actually prints the value in the prompt but if the $OLDPWD change it won't update the prompt unless I run bash again.. Why is it like that? and how do I make it that when the $OLDPWD change it should also update?
I have the following prompt in bash which shows the current git branch:  PS1+="$(git_prompt)" #git_prompt is a function in my .bashrc   which works when I source the .bashrc, but not when I change the branch, so the PS1 var gets only evaluated when I source the .bashrc, but it should be evaluated every time a new prompt is displayed. How can this be accomplished with bash 4.3 ?
On this link (Sentinel1  for a SLC product), the resolution is written as a range from the highest corresponding to low incidence angle, to the lowest resolution corresponding to high incidence angle.  My question is how is the resolution related in general to the incidence angle? And if they are really related, why is the resolution affected by the change in the incidence angle? If $H$ is a cyclic subgroup of $G$ and $H$ is normal in $G$, then every subgoup of $H$ is normal in $G$. Exercise 11, page 45 from Hungerford's book Algebra.     If $H$ is a cyclic subgroup of $G$ and $H$ is normal in $G$, then every   subgroup of $H$ is normal in $G$.   I am trying to show that $a^{-1}Ka\subset K$, but I got stuck. What I am supposed to do now?  Thanks for your kindly help. I'm trying to solve this problem from Hatcher 3.3.24.  Let $M$ be a closed connected 3-manifold, and write $H_1(M, \mathbb{Z})$ as $\mathbb{Z^r} \oplus T$ where $T$ is torsion. Show that $H_2(M, \mathbb{Z})$ is $\mathbb{Z^r}$ if $M$ is orientable or $\mathbb{Z^{r-1}} \oplus \mathbb{Z_2}$ if $M$ is not orientable. In particular $r \geq 1$ if $M$ is not orientable. Using exercise 6 construct examples showing there are no other restrictions on the homology groups of closed 3-manifolds. (In the nonorientable case consider the manifold $N$ obtained from $S^2 \times I$ by identifying $S^2 \times \{0\}$ with $S^2 \times \{1\}$ via a reflection of $S^2$.)  I think I've solved the first part, here's my proof:   First note the following theorem: If $M$ is a closed connected and orientable n-manifold then $H_n(M, \mathbb{Z}) = \mathbb{Z}$ and $Tors(H_{n-1}(M, \mathbb{Z})) = 0$. If nonorientable, then $H_n(M, \mathbb{Z}) = 0$, $Tors(H_{n-1}(M, \mathbb{Z})) = \mathbb{Z_2}$.  Now note by Poincare duality and UCT we have that $H_2(M) \cong H^1(M) \cong \mathbb{Z^r} \oplus T_0 \cong \mathbb{Z^r}$.   In the nonorientable case consider the exact sequence:  $0 \longrightarrow H_2(M) \longrightarrow H_1(M) \longrightarrow H_0(M) \longrightarrow 0$  But we know $H_1(M) = \mathbb{Z^r} \oplus Z_2$ from the earlier theorem and $H_0(M) = \mathbb{Z}$.   Therefore $H_2(M) \cong ker(\mathbb{Z^r} \oplus Z_2 \rightarrow \mathbb{Z}) \cong \mathbb{Z^{r-1}} \oplus \mathbb{Z_2}$.   For the rest of the question I'm quite lost. What is a good data plan for Internet surfing in northern Italy? I've checked the webpages of some their providers, but franly, just like in the case of those in my own language, I literally cannot find my way around them. So if you wouldn't mind sharing a word of two or advice.  I'm looking for a good solution for mobile internet surfing in northern Italy, that can be connected to a laptop (you know, that usb stick with a SIM card inside kind of thing). 15 Gb or so at some decent speed. Can you perhaps give a recommendation or two of what to get?    Edit: Just to define what I'm looking for exactly. A data plan of 15 Gb with an internet key (usb stick into which a SMS card goes) that you plug into a laptop. Preferably non-contractual, so I can cancel when I leave. I am not interested in surfing on my mobile phone since due to size I still prefer the smaller Nokia-like models for calls (smaller to carry) - no internet on them. Print programs with its proper syntax Union of a finite set and a countably infinite set is countably infinite Integration of $\int\frac{1}{x^{4}+1}\mathrm dx$ MySQL Replication : 1 Slave / Multiple Masters Cancel a vote so that the tally goes back to zero and not minus How are the AES S-Boxes calculated? Understanding of the theorem that all norms are equivalent in finite dimensional vector spaces MacBook Pro crashes randomly after dropping it on the floor A few days ago my MacBook Pro slipped out of my hands and fell onto the tile floor. The outside got banged up quite a bit and the Touch Bar no longer lights up but still responds to touches sometimes but not all the time.   Anyway, since then it will randomly restart every once in a while with a kernel panic. I have the log posted below and wanted to know if anyone could tell me what is causing the panic? Factoring $x^n + y^n$ over the integers Suppose f is a function such that $f'(x) = \frac{1}{x}$ for all $x &gt; 0$. Prove that if $f(1) = 0, then f(xy) = f(x) + f(y)$ for all $x,y &gt; 0$  As stated above, how do i go about doing this question?   Hi all, i would like to apologize if the question is missing context or other details.   This question was part of my calculus tutorial. I was on the topic of application of differentiation when this question was given to me.  Thus far i have learnt about intermediate value theorem, mean value theorem, rolle's theroem, Fermat's thereom.  As of this point in my learning, i have not touched upon integration. The only reason why i accepted the answer with integration in it was because i understood it.  Thus i believe i am suppose to use one the few theorems that i've stated to solve this question. But i have no idea where to start.  At first i differentiated the equation $f(xy)=f(x)+f(y)$ with respect to x  i believed the answer to be $f'(xy)\frac{dy}{dx}=f'(x)+f'(y)\frac{dy}{dx}$  which would be $\frac{1}{xy}\frac{1}{x}=\frac{1}{x}+\frac{1}{y}\frac{1}{x}$  At this point a few questions came to my mind  1) am i suppose to differentiate the eqn in the first place 2) what has $f(1)=0$ got to do with anything 3) what theorem am i suppose to use to solve this question  This was my thought process throughout the question and i hope someone would point out my mistakes. Thank you Create a virtual file that is actually a command Is there any way to index my Github account to google search. I see that many people's account show up as soon as I type their name, but mine doesn't show up even after I type my name followed by github n search. Why does space expansion not expand matter? I have looked at other questions on this site (e.g. "why does space expansion affect matter") but can't find the answer I am looking for.  So here is my question: One often hears talk of space expanding when we talk about the speed of galaxies relative to ours. Why, if space is expanding, does matter not also expand? If a circle is drawn on balloon (2d plane), and the balloon expands, then the circle also expands. If matter is an object with 3 spatial dimensions, then when those 3 dimensions expand, so should the object.  If that was the case, we wouldn't see the universe as expanding at all, because we would be expanding (spatially) with it.  I have a few potential answers for this, which raise their own problems:   Fundamental particles are 'point sized' objects. They cannot expand because they do not have spatial dimension to begin with. The problem with this is that while the particles would not expand, the space between them would, leading to a point where the 3 non-gravity forces would no longer hold matter together due to distance Fundamental particles are curled up in additional dimensions a la string theory. These dimensions are not expanding. Same problems as 1, with the added problem of being a bit unsatisfying. The answer seems to be (from Marek in the previous question) that the gravitational force is so much weaker than the other forces that large (macro) objects move apart, but small (micro) objects stay together. However, this simple explanation seems to imply that expansion of space is a 'force' that can be overcome by a greater one. That doesn't sound right to me. I'm trying to move some data over and to start with I'd like to make sure that the size is ok. I run into a problem however, if I check the folder with   du -sh  myfolder/ 780M    myfolder/   but   du -sh * .. 71M     myfolder ..   I thought it might be something to do with hidden files but this particular folder does not have any inside.  Am I missing something? How to get from Nice to Monaco by public transport? What's the simplest and cheapest way to get from central Nice, France to Monaco by public transportation? If a question is in all-uppercase or all-lowercase, our quality filters should automatically reject it Proposal If a question on an English-language Stack Exchange site does not contain at least one uppercase and one lowercase letter, our quality filter should reject it. (We can make exceptions for sites which don't use a mixed-case alphabet, such as .) Justification The quality filter currently rejects neither all-uppercase nor all-lowercase posts. I've checked. The best Stack Exchange users use mixed case. If an asker is too lazy to use their Shift key, their question tends not to be of very good quality. Don't take my word for it. You can see proof. Sam Saffron helped me write  which lets you see with your very own eyes that what I am saying is true. Single-case askers tend to ask poor-quality questions such as:      In addition, posts which use only uppercase or only lowercase — even if they aren't riddled with typos or grammatical errors — tend to be hard to read. Capitalization aids readability. Why is this proposal not a duplicate? This proposal is not a duplicate of the older proposal . This is because it also deals with all-lowercase questions. All-lowercase questions are 50 times more common than all-caps questions.  Stack Overflow gets only about 100 all-uppercase questions per year; see .  Yet it gets about 5,000 all-lowercase questions per year; see . (These statistics are for Stack Overflow only; the rest of our network wasn't considered.) I suspect that the older proposal was declined for two reasons:  All-uppercase questions are rare.  Therefore, the effort required to block all-uppercase questions is too much.   This proposal is better. For just a bit more effort, the Stack Exchange developers can get a much richer reward. Conclusion What do you think of my proposal? Agree? Disagree? Thoughts? PS: This idea is modified and adapted from  by Stack Exchange user Gilles. My dear sir Gilles, I thank you. Note There's even a  which automatically detects questions with all-caps titles and alerts interested users and moderators.