How to print to console in color?
How to print colored text to the terminal?
I read this at least 20 years ago, and I believe it was originally published in the '60s.   The main character is a human, but somehow "inherits godhood" from an alien, whose species is very long lived. IIRC this is one of the old-style god thingies, i.e. "god of thunder" not "omniscient omnipotent omnipresent transcendent being".  The plot somehow revolved around identifying and fighting some enemy which, I believe, was in turn a member of the alien species who acted as the avatar of the opposite god in the alien pantheon.  The only thing I remember for sure is that the enemy was identified as "green green" or "gringrin" (sadly, I read this in translation so I am not sure what the original meant) Standard concise way to copy a file in Java? I am running a fresh install of Linux Mint Nadia (14). I am following the instructions on Vagrant  but have gotten stuck on the . It seems the Vagrant box cannot connect outside and so I can't install anything using either Chef or Puppet.  In the basic Vagrant resolve.conf contains nameserver 10.0.2.3. But with that set I can't ping us.archive.ubuntu.com.  If I change it to 8.8.8.8 then I can ping us.archive.ubuntu.com but it does not stay set, and after a reboot it changes back to 10.0.2.3 - so provisioning fails again.  Ideally I would like for 10.0.2.3 to work on my setup. Failing that I would like a way to permanently change resolv.conf so that I can do provisioning. "As a beginner, I am happy that I learned a new thing."  You will recognize this as your DoReMi-s.( at 4:52)  What is the meaning of the "AS" there and when do we use that?  In depth answers would be appreciated.  Similarly:     Do I have your word as a lawman not to shoot me down like a dog in the street?    Can you explain this sentence?   Can I understand it as a lawman wouldn't shoot down people on the street or wouldn't have his word or what? How to ask "If you have any problem then ask me" in polite manner Design review - RGB LED color mixer using PWM Appropriate data transformation I installed the  on my Ubuntu&nbsp;11.04 (Natty Narwhal) with   sudo apt-get install lamp-server^   Now I navigate to /var/www and use   wget http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz   I get the following error.   --2011-08-03 13:59:00--   http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz Resolving  ftp.drupal.org... 64.50.233.100, 64.50.236.52 Connecting to  ftp.drupal.org|64.50.233.100|:80... connected. HTTP request sent,  awaiting response... 200 OK Length: 2757101 (2.6M)  [application/x-gzip] drupal-7.x-dev.tar.gz: Permission denied   Cannot write to `drupal-7.x-dev.tar.gz' (Permission denied).   How do I resolve this error?  I tried to download the same file in the downloads folder, and it went on without an issue. So it seems to be some permission error, but I'm not sure about that or how to solve it. What is the definition of $2.5!$? (2.5 factorial) I was messing around with my TI-84 Plus Silver Edition calculator and discovered that it will actually give me values when taking the factorial of any number $n/2$ where $n$ is any integer greater than $-2$. Why does this happen? I thought factorials were only defined for positive integers and $0$, so what is my calculator doing to get the answer $3.32335097$ when I enter $2.5!$? Is there actually a definition of $2.5!$ or is my calculator just being weird? How is the factorial function implemented?  I understand the binary implications of $2.5$, so that could possibly have something to do with it. I get a domain error when trying to take the factorial of $-1, 2.3, e$, and any number that is not of the form $n/2$ where $n$ is any integer greater than $-2$. $K\subseteq \mathbb{R}^n$ is a compact space iff every continuous function in $K$ is bounded. I need to prove that $K\subseteq \mathbb{R}^n$ is a compact space iff every continuous function  in $K$ is bounded.  One direction is obvious because of Weierstrass theorem. How can i prove the other direction? I tried to assume the opposite but it didn't work for me.  Thanks a lot. Replace Builtin commands with Custom Commands for CMD.exe Can Selenium interact with an existing browser session? How can metagaming retries on poor skill checks be prevented? How do I define global variables in CoffeeScript? Let's take the numbers 0-10.  Their mean is 5, and the individual deviations from 5 are -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 And so the average (magnitude of) deviation from the mean is $30/11 \approx 2.72$.  However, this is not the standard deviation.  The standard deviation is $\sqrt{10} \approx 3.16$.  The first mean-deviation is a simpler and by far more intuitive definition of the "standard-deviation", so I'm sure it's the first definition statisticians worked with.  However, for some reason they decided to adopt the second definition instead.  What is the reasoning behind that decision? Copy and set-mark in Bash as in Emacs? I would like to be able to copy and paste text in the command line in Bash using the same keyboard bindings that Emacs uses by default (i.e. using C-space for set-mark, M-w to copy text, C-y, M-y to paste it, etc.).  The  says that Bash comes with some of these key bindings set up by default.   For example, yanking (C-y) works by default on my terminal. However, I can't get the set-mark and copy commands to work, and they don't seem to be bound to any keys by default.  Usually, the way a user can define her own key bindings is to add them to .inputrc. So I looked and found the following bash functions in the documentation that I presume can help me define the Emacs-like behavior that I want (i.e. set-mark with C-space and copy with M-w).  copy-region-as-kill ()      Copy the text in the region to the   kill buffer, so it can be yanked right   away. By default, this command is   unbound.   and    set-mark (C-@)      Set the mark to the point. If a   numeric argument is supplied, the mark   is set to that position.   If I understand correctly, the above means that copy-region-as-kill is not bound to any keyboard sequence by default, while set-mark is bound to C-@ by default.   I tried C-@ on my terminal, but I don't think it runs set-mark because I don't see any text highlighted when I move my cursor. In any case, I tried adding  keyboard bindings (M-w and C-) to the functions  copy-region-as-kill and set-mark above in my .inputrc and then reloading it with C-x C-r, but this didn't work. I know that my other entries in .inputrc work because I have other user-defined keybindings defined in it.  Is there anything I am doing wrong? Am I missing anything? Last digits, numbers Can anyone please help me?  1) Find the last digit of $7^{12345}$   2) Find the last 2 digits of $3^{3^{2014}}$.  Attempt: 1)  By just setting the powers of $7$ we have $7^1 = 7$, $7^2=49$, $7^3=343$, $7^4 = 2401$, $7^5 = 16807$, $7^6 = 117649$, $\dots$  After the power of $4$, the last digits will repeat. Then by noticing the pattern the digits will end in $7,9,3$ and $1$.  Then we can divide the exponent $(12345)$ by $4$ since this is the cycle that makes it repeat. Then $12345 : 4$ has remainder $1$. So $7^1 = 7$ is the unit digit to $7^{12345}$.   So the last digit is $7$.   I know how to do it like this, the problem does not state how to find the last digit, but I know it has something do do with Euler's theorem.  for part $2$) I don't know how to start. Can anyone please help me?   Thank you for the help. Short-cut for switching to a given directory In the Ubuntu terminal I find myself spending considerable time to switch to a particular directory every time the computer starts up. Is there some way I can make this process easier? Is there some hotkey or some quick directory change that I can use (like speed dial on a phone)?   eg:     cd 1:Changes to saved directory one easy_install: command not found Kali Linux: apt update returns "Hash Sum mismatch" error I'm experiencing exactly the same issue as described in this question: . Before you mark this as a duplicate however, I have tried the solutions posted there, as well as on numerous other sites, including:  sudo apt-get clean sudo rm -rf /var/lib/apt/lists/* sudo apt-get update   Editing /etc/apt/sources.list with alternate official mirrors, such as  deb http://mirrors.ocf.berkeley.edu/kali kali-rolling main non-free contrib or deb https://http.kali.org/kali kali-rolling main non-free contrib  Everything worked after I first imported the VM. I ran sudo apt update and it found some ~650 packages to upgrade. I ran sudo apt upgrade and it encountered an error partway through. That error was solved using sudo apt --fix-broken install, but that is when this hash sum error began. Unfortunately due to hours of troubleshooting I no longer have the details of the earlier error, but I believe it was an error extracting a package due to corrupt data.  I've tried multiple official mirrors, but I get the same error. Additionally, when I downloaded the Packages.gz file  on my Windows machine (VM host) and computed the SHA256 hash, I got the exact hash that apt printed as the expected value. This led me to believe that the error was not with the mirror but with my VM.  The next thing I tried was wget https://mirrors.ocf.berkeley.edu/kali/dists/kali-rolling/main/binary-amd64/Packages.gz followed by sha256sum Packages.gz, which provided yet another different hash output.  To be clear, I have seen 3 different hashes for the same file:   The "correct" hash shown by apt as expected, which is the one that windows also produced after downloading the file using a browser The incorrect hash calculated by apt, which led to the error A different hash calculated by sha256sum after downloading the file using wget using the same URL as for the browser download   I should also note that I have only been referencing the SHA256 hash in each step. The other hash functions are also mismatched when I run sudo apt update, but the file size is the same. I had considered that downloads might be failing due to limited disk space (it is a VM after all) but I don't think that's the case.  What am I missing?