Is it possible to display the name of the branch in this place?    How is this done in git bash for windows?
I am using  to show the branch name in gnome terminal (Ubuntu 15.10) when working in a git repository. Based on the above I now have the below in my ~/.bashrc file:  # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes    ...  # Add git branch if its present to PS1 parse_git_branch() {  git branch 2&gt; /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' } if [ "$color_prompt" = yes ]; then  PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ ' else  PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ ' fi unset color_prompt force_color_prompt   As a result I now get:    so it works. But why has the coloring of my user@host been removed? And I would also expect that the branch name should be colored. Before it looked like this:    UPDATE: I have now tried this guide instead:    adding this to .bashrc:  parse_git_branch() {      git branch 2&gt; /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "   and that works:    Notice in .bashrc I also have this (default):  # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window # should be on the output of commands, not on the prompt #force_color_prompt=yes   I have yet to find the reason why that snippet gives the correct result and the other version does not. Any input on this?  Here is the version of my .bashrc that has the old snippet enabled that does not work:
Bridged interfaces and VLAN tags I'm in a numerical analysis course right now and it's pretty rigorous but I'm enjoying it a lot. I took a lower level course before that was more oriented towards implementation of numerical methods, so it's not my first time with the material.  Anyway, my professor wrote his own course notes and they're fantastic but I wanted some reference material since I'm currently outlining my own notes. Just wondering what the big ones out there are  edit: I would say I'm at an advanced undergraduate level Why was Edo Tensei Madara young, when he had died at an old age? From Naruto manga and anime, I know that Uchiha Madara died as an old person after he helped Uchiha Obito.   But it was bit weird for me, when Kabuto summoned Uchiha Madara-sama with Edo Tensei, Madara was a younger person.  Again, when Chiyo was summoned, she was older as when she died.  How can it be possible? What would you consider to be the best exception type to throw when an extension method is called on a null instance (where the extension method does not allow it)? Since extension methods are nothing but static methods you could argue that it should be ArgumentNullException, but on the other hand they're used like instance methods so it might be more natural to use the NullReferenceException. Let's take the following example:  public static string ToInvariantString(this IFormattable value, string format) {     return value.ToString(format, CultureInfo.InvariantCulture); }   This way a NullReferenceException will be thrown if the value parameter is null.   The other example would be:  public static string ToInvariantString(this IFormattable value, string format) {     if (value == null) throw new ArgumentNullException("value");     return value.ToString(format, CultureInfo.InvariantCulture); }   EDIT: In some of the answers you have pointed out that an extension methods can be called like a static method and in those cases a null reference exception would be wrong, which is a great point, and actually one of my concerns, not sure why I forgot to mention that in the question in the first place.   Someone also pointed out that it's wrong to throw a NullReferenceException, and yes, it is. That's why I don't throw it, I just let it happen (let the CLR throw it) by not guarding the method.  I think I favor the ArgumentNullException (that's what I've use so far) but I still think there is at least room to argue for an against the NullReferenceException since it seems more natural in most places where the method is going to be used. Are there strange attractors whose coordinates are "almost integers"? Postdoc before PhD completion I am in a situation where my PhD funding runs out in 5 months and I need to have secured a job regardless of whether I have submitted due to having a family.   Although I think I may be close to submitting by then, it may take longer. Is it worth applying for postdoc positions or would universities not consider you until you have completed the PhD? I assume that the pass rates of PhDs are very high if the candidate has got to the submission stage.   Edit: This question is aimed at the people that are are the submission stage but haven't yet defended their thesis. It is not a question asking if I can get a post-doc without a PhD. Change folder permissions and ownership I would like the user to have full rights on this folder (as well as all sub-directories and files in it):  ~/.blabla   currently owned by root.  I have found numerous posts (in this forum and elsewhere) on how to do this for files but I can't find a way to do it for whole folders. Why is menstruation in wild animals not a disadvantage to organismal survival? When I watch wilderness specials for more than a few minutes, I notice a familiar pattern: predators are depicted as being alerted by the scent of blood. Wounded animals seem to make the best prey and predators seem to have a heightened awareness for the smell of blood.   It would seem that it would then be a disadvantage to evolutionary survival for female organisms to menstruate. How do females of a species not attract predators to the signal of menstrual blood?   Do female organisms in the wild actually menstruate? If so, is there a difference in the composition of menses that does not alert predators? How would this not at the very least give predators an idea of the general vicinity of the female?  If wild animals excrete their menses, do they have ways in which they are able to mask the evidence of its release or are they somehow internalizing the tissue so that they are not released?  If female organisms in the wild do menstruate, then why is this not a survival disadvantage? How to get the caret column (not pixels) position in a textarea, in characters, from the start? How do you get the caret position in a &lt;textarea&gt; using JavaScript?  For example: This is| a text  This should return 7.  How would you get it to return the strings surrounding the cursor / selection?  E.g.: 'This is', '', ' a text'.  If the word “is” is highlighted, then it would return 'This ', 'is', ' a text'. I almost always want the profile correct applied, but it's an extra step. Any ideas on how to apply these automatically? What is the relationship between symmetry and degeneracy in quantum mechanics? Let me remind you about the following classical  examples in quantum mechanics.     Example 1. Bound states in 1-dim potential V(x).   Let $V(x)$ be a symmetric potential i.e.   $$V(x) = V(-x)$$   Let us introduce the parity operator $\hat\Pi$ in the following way:   $$\hat\Pi f(x) = f(-x).$$   It is obvious that    $$[\hat H,\hat\Pi] = 0.$$   Therefore, for any eigenfunction of $\hat H$ we have:   $$\hat H|\psi_E(x)\rangle = E|\psi_E(x)\rangle = E\hat\Pi|\psi_E(x)\rangle,$$   i.e. state $\hat\Pi|\psi_E(x)\rangle$ is eigenfunction with the same eigenvalue. Is $E$ a degenerate level? No, because of linear dependence of $|\psi\rangle$ and $\hat\Pi|\psi\rangle.$   Consider the second example.     Example 2. Bound states in 3-dim a potential $V(r)$. Where $V(r)$ possesses central symmetry, i.e. depends only on distance to center.   In that potential we can choose eigenfunction of     angular momentum $\hat L^2$ for basis    $$|l,m\rangle,$$   where $l$ is total angular momentum and $m$ - its projection on chosen axis (usually $z$). Because of isotropy eigenfunction with different $m$ but the same $l$ correspond to one energy level and linearly independent. Therefore, $E_l$ is a degenerate level.      My question is if there is some connection between symmetries and degeneracy of energy levels. Two cases are possible at the first sight:   Existence of symmetry $\Rightarrow$ Existence of degeneracy Existence of degeneracy $\Rightarrow$ Existence of symmetry     It seems like the first case is not always fulfilled as shown in the first example. I think case 1 may be fulfilled if there is continuous symmetry. I think the second case is always true. Selenium 2: Open link in new tab and close tabs How to quickly move one layer to a different group in large Photoshop files, without dragging? Employment office encounters an alien masquerading as a human I'm looking for a story where a guy who has done job interviews for years is approached by an applicant, and because of his experience talking to people (I remember he specifically mentions having done something like 250,000 interviews), he immediately is able to tell the applicant is actually an alien in human form.  He goes on to help the alien understand human emotions &amp; teaches him how to fit in. What Happened to The Latex Symbols In the Libreoffice-Texmaths Equation Editor? I recently purged Libreoffice because it was buggy.  I then reinstalled the latest version from apt and now it's missing the symbols above the equation editor.  Here is the current Texmaths equation editor:   There used to be shortcuts for latex including frac{}{} and various set theory operations, as well as the binomial distribution on the top of the window.  What happened to them and how do I get them back? I just figured that they were in some package and installed all packages useing sudo apt install libreoffice*, but this didn't help after I refreshed the program.  EDIT 0: I'm using Kubuntu 19.04  sarah@LesserArk:~$ sudo apt-cache policy libreoffice-texmaths libreoffice-writer texlive libreoffice-texmaths:   Installed: 0.43-2   Candidate: 0.43-2   Version table:  *** 0.43-2 500         500 http://us.archive.ubuntu.com/ubuntu disco/universe amd64 Packages         500 http://us.archive.ubuntu.com/ubuntu disco/universe i386 Packages         100 /var/lib/dpkg/status libreoffice-writer:   Installed: 1:6.2.2-0ubuntu2   Candidate: 1:6.2.2-0ubuntu2   Version table:  *** 1:6.2.2-0ubuntu2 500         500 http://us.archive.ubuntu.com/ubuntu disco/main amd64 Packages         100 /var/lib/dpkg/status texlive:   Installed: 2018.20190227-1   Candidate: 2018.20190227-1   Version table:  *** 2018.20190227-1 500         500 http://us.archive.ubuntu.com/ubuntu disco/universe amd64 Packages         500 http://us.archive.ubuntu.com/ubuntu disco/universe i386 Packages         100 /var/lib/dpkg/status After upgrading to 13.10, I am now getting a prompt for my gmail password every time I log in. There is no indication as to which service or application needs this information. If I enter the correct password I'm told it is incorrect. My gmail account does not use two factor authentication. The problem has only started after an upgrade from 13.04 to 13.10.  How can I prevent this prompt appearing, and/or what is doing the prompting? Are there any examples of subspaces  of $\ell^{2}$ and $\ell^{\infty}$ which are not closed? How does the twitter bot work? What does the explicit keyword mean? How to assign a function in Lua for a randomly generated numbers