I want to change the color of my terminal prompt to black color which is now in green color.
Is it possible to change the colors in the command prompt for the user@computer, as well as the the current directory and command parts of the prompt display?   I've already seen something like this done by OSX users, but I don't know how to do the same thing in gnome terminal (I can only change foreground and background colors).   It'd be very useful when, for example, trying to compile programs that have errors, since long, unformatted messages make it hard to distinguish which lines are commands and which are output.
Why didn't Elizabeth get cursed? In Pirates of the Caribbean, whoever has the Aztec gold gets cursed.  But Elizabeth had the gold coin with her which Bootstrap gave to his son Will before he was tied to a cannon and dropped to the ocean floor.  Barbossa states that they were cursed because of Aztec gold.  Also in the fight between Jack and Barbossa, Jack takes a gold coin and he was also cursed.  Why didn't Elizabeth get affected? Or was she also cursed and nobody noticed? How to include graphics with spaces in their path? I want to import graphics into my main input file using the macro \includegraphics. It does not work if the filename contains spaces.   also discusses this subject, but there is no solution there.  My compilation routine is latex->dvips->ps2pdf (because of PSTricks). 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? The infinite product of the sines of all positive integers is zero I tried to prove that $\prod\limits_{k = 1}^\infty  {\sin k = 0}$  Define $$P(m)=\prod\limits_{k = 1}^m  {\left|\sin k\right|}$$  then I take the logarithm of both sides $$\log P(m)=\log \prod\limits_{k = 1}^m  {\left|\sin k\right|}$$  which can be written as $$a_m=\log P(m)=\sum\limits_{k = 1}^m  {\log\,\left|\sin k\right|}$$ for any $k\in\mathbb{N}$ we have $0&lt;\left|\sin k\right|&lt;1$, so all terms of the sum above is strictly negative.  I say that the sequence diverges: $\left\{a_m\right\}_{m\in\mathbb{N}}\to\,-\infty$  This is a delicate point on which I have some doubts.  I know that  $$\int\limits_0^\pi  {\log \left|\sin x\right|{\text{ d}}x}  =  - \pi \log 2$$ and that the function $\log \left|\sin x\right|$ is periodic with period $\pi$,  so the integral from 1 to $\infty$ diverges to $- \infty$. Then the series diverges as well for the integral test for convergence.  As $\log P(m)\to\, -\infty$ we can say that $P(m)\to\,0$ as $m\to\,\infty$  Therefore $$\mathop {\lim }\limits_{m \to \infty } \prod\limits_{k = 1}^m {\left| {\sin k} \right| = \mathop {\lim }\limits_{m \to \infty } \prod\limits_{k = 1}^m {\sin k = \prod\limits_{k = 1}^\infty  {\sin k = } 0} }.\quad \blacksquare$$ Proving a basis for inner product space V when $||e_j-v_j||< \frac{1}{\sqrt{n}}$. Suppose $(e_1,e_2,...,e_n)$ is an orthonormal basis of the inner product space $V$ and $v_1,v_2,...,v_n$ are vectors of $V$ such that $$||e_j-v_j||&lt; \frac{1}{\sqrt{n}}$$ for each $j \in \left\{1,2,...,n \right \}$. Prove that $(v_1,v_2,...,v_n)$ is a basis of $V$.  I am completely lost and just starting to learn about inner product spaces. Could someone provide a proof with the explanation of how you got there? Is there a program that can make live USBs for any distro, iso, you get the point. I can only find ones that make live USBs for other linux distributions and none for anything else. I have a Category entity which has a Nullable ParentId field. When the method below is executing and the categoryId is null, the result seems null however there are categories which has null ParentId value.  What is the problem in here, what am I missing?  public IEnumerable&lt;ICategory&gt; GetSubCategories(long? categoryId) {     var subCategories = this.Repository.Categories.Where(c =&gt; c.ParentId == categoryId)         .ToList().Cast&lt;ICategory&gt;();      return subCategories; }   By the way, when I change the condition to (c.ParentId == null),  result seems normal. Assign default keyboard language per-application Is it possible to assign default keyboard language for specific applications? I know that there is an option to always start an application with a default keyboard language but this is not what I want.  I'm looking for something similar to "fixed workspaces" which you can set using CompizConfig (You set Chrome to always open at X1Y1, terminal at X2Y1 etc). Something where I would set Chrome: Czech, terminal: English, Spotify: English, ... The documentation for the  function states that you pass it a number, and the positions past the decimal to round. Thus it should do this:  n = 5.59 round(n, 1) # 5.6   But, in actuality, good old floating point weirdness creeps in and you get:  5.5999999999999996   For the purposes of UI, I need to display 5.6. I poked around the Internet and found some  that this is dependent on my implementation of Python. Unfortunately, this occurs on both my Windows dev machine and each Linux server I've tried. .  Short of creating my own round library, is there any way around this? Boggle: What is the dice configuration for Boggle in various languages? This is the dice configuration for the English Boggle:  Other variants and discussions concerning letter distributions for English can be found here:  , , ,  (Wikipedia).  I am interested in the 16 dice configurations for also other languages (Spanish in particular) and I am unable to find it anywhere online.  Versions I have managed to find so far:  ,  English 25 dice version:   Spanish 25 dice version:   Italian 25 dice version: Is a general GRE score of X sufficient for entry to postgraduate degree Y? Question: I got general GRE scores of VR (verbal reasoning), QR (quantitative reasoning), and AW (analytical writing).  Is this a good score to apply for entry to postgraduate degree in field X?  How will this score look to the selection committee?    Note: This is an intentionally generic GRE question (with unspecified scores and field of study) which is intended as a template for a large number of questions asked on this forum regarding evaluating the scores on the general GRE test (e.g., , , , , , , , and ).  This question seeks answers that are applicable for an applicant for graduate-level programs in any field, based on any scores in the GRE general test.  The goal of this question is to provide a general reference to avoid the need for specific questions with particular scores/field of study. UITextField - capture return button event I made a script that should notify me when there's a new chapter of manga that I'm reading. I used the command notify-send to do this. The program works when I am trying to run it in terminal. The notification is showing. However, when I placed this in my crontab, the notification doesn't show. I'm pretty sure that the program is running since I made it to create a file for me. The file was created, but the notification didn't show.  Here's my script  #!/bin/bash    #One Piece Manga reminder     #I created a file named .newop that contains the latest chapter.     let new=$(cat ~/.newop)     wget --read-timeout=30 -t20 -O .opreminder.txt http://www.mangareader.net/103/one-piece.html  if (( $(cat .opreminder.txt | grep "One Piece $new" | wc -l) &gt;=1 ))     then         (( new+=1 ))         echo $new         echo $new &gt; ~/.newop         notify-send "A new chapter of One Piece was released."     else         notify-send "No new chapter for One Piece."         notify-send "The latest chapter is still $new."     fi         exit   And here's what I wrote in my crontab  0,15,30,45 12-23 * * 3   /home/jchester/bin/opreminder.sh Mental estimate for tangent of an angle (from $0$ to $90$ degrees) How to compute $m$ value from RSA if $phi(n)$ is not relative prime with the $e$? Here is some information we got : We know the value of $n$, with size $1043$. We know the value of $p$ (size $20$) and $q$ (size $1023$) as the factors. $e = 65537.$ $\varphi(n)$ = $(q-1)(p-1)$ When I calculated $\gcd$ and $\text{modinv}$, I got : $\gcd(e,\varphi(n)) = 65537$ $modinv(e,\varphi(n)) = 1 $ So we can tell that they are not relatively prime. So, how to compute the d, and get the value of m? I'm not that good with math, so I cant understanding well the theory. so can anyone please make an example implementation or write a clear formula? no Get More in Plugin Manager in qgis 2 + ubuntu 13.04 After upgrade of qgis 1.8 to qgis 2.0 I couldn't find the choice "Get more" in Plugin Manager and I can't install plugins. "Stack Overflow requires external JavaScript from another domain" message is error 404  Well, it seems that Wget picks it up so the last statement is false and the exact message is:  Error 6 (net::ERR_FILE_NOT_FOUND): The file or directory could not be found.   and it loads in Chrome once after I clear the cache but not after. Why would you use an assignment in a condition? In many languages assignments are legal in conditions. I never understood the reason behind this. Why would you write:  if (var1 = var2) {   ... }   instead of:  var1 = var2; if (var1) {   ... } Optimizing a "black box" function: Linear Regression or Bayesian Optimization... what's the difference? Goal: I have a function $f(x,y)=z$ (two variables for illustration only) which I know almost nothing about--it has a compact domain which I can determine, it is non-negative, and bounded above.  My goal is to find the maximum value $f(x,y)$ takes on its domain.  I can query the function and I know the values at a few points: $f(x_1, y_1)=z_1, f(x_2, y_2)=z_2,..., f(x_n, y_n)=z_n$.  Optimization via Linear Regression:  I have used linear regression (and related methods like the lasso) to model functions like this in the past; this is the method that I am very comfortable with.  Typically, I might try to find a polynomial (of degree $k$) which relatively accurately models the data. The end result would be to say that:   $$f(x,y)\approx \beta_1 + \beta_2 x + \beta_3 y + \beta_4 x^2 + \beta_5 xy + \beta_6 y^2 + ... + \beta_{m}y^{k}.$$  Determining the coefficients is done by solving the .  The "best degree" for the polynomial might be determined using $k$-fold cross validation.  Once the "best" polynomial has been determined, one can choose any of a number of methods to optimize it (Newton's method, gradient descent, hill climbing, etc).  Then, if all goes well, the optimal value on the polynomial corresponds to an optimal value of $f(x,y)$.  Bayesian Optimization:  Recently, I was describing this technique (linear regression) to a colleague who asked: "What is the difference between that and Bayesian Optimization?"  I've been attempting to answer this question for the last couple days, and so far I don't have anything really conclusive.  After reading , trying to read  and getting stuck reading  I think I understand the following about BO:   Start with a prior (a guess as to what family of functions the black box belongs to... or at least some family of functions which you believe might be able to describe $f$ well).  It looks using a  as a prior is popular. Specify whatever is needed to build your prior (for GP this is a covariance function). As you go along, you maintain two evolving functions, a "mean" function $m(x,y)$ and a "confidence interval" function $c(x,y)$.  Basically, you can predict the value at any point by evaluating $m(x,y)$ and you are confident that $f(x,y)\in [m(x,y)-c(x,y), m(x,y)+c(x,y)]$. Bayesian optimization provides a systematic way of updating/exploiting the model by alternatively selecting points where the confidence interval is wide (you are very uncertain about the value) or at optimal points on the model $m(x,y)$.   My Question: Is it fair/correct to say that the major difference between Bayesian Optimization and simply optimizing the linear regression model is that Bayesian Optimization provides the systematic way of sampling with the goal of optimizing the model and reducing uncertainty whereas the linear regression model ignores the idea of uncertainty and doesn't explicitly provide a means of updating the model?  Said another way, is the linear regression model an example of what might be a "mean" function $m(x,y)$ in Bayesian Optimization?  If I stick with linear regression, specify how to compute the uncertainty, and provide a means of updating/improving the model (exploit/explore) am I just doing Bayesian Optimization (without calling it that)?  Background: My background is in pure mathematics (graph theory) but my new job has me working with a lot of data (so I'm self learning statistics).  With that in mind, my statistics vocabulary is somewhat limited (so I appreciate answers that either avoid technical terminology or briefly explain any technical terminology used)--for example, Monday was the first time I heard/read the word "prior" used in a stats sense and I'm still not 100% sure I understand that correctly. How can I restrict various roles with limit in creating nodes of a particular content type