Update and Select in the same query in MySQL
MySQL Error 1093 - Can't specify target table for update in FROM clause
Having line color vary with data index for line graph in matplotlib? MacBook Pro Trackpad Suddenly Stopped Working Completely The trackpad on my Macbook Pro of 2 years has suddenly stopped working out of blue.  The trackpad doesn't move, respond to any gestures nor do any clicks work. This is really frustrating as I used gestures a lot to navigate around my laptop, and even though I use a bluetooth mouse it makes using my laptop unnecessarily laborious.  Does anyone know what may be causing the problem, and any solutions? Redirect STDERR and STDOUT to different variables without temporary files func() {     echo 'hello'     echo 'This is an error' &gt;&amp;2 }  a=$(func) b=???   I'd like to redirect the stderr to b variable without creating a temporary file.   echo $b  # output should be: "This is an error"   The solution that works but with a temporary file:  touch temp.txt exec 3&lt; temp.txt a=$(func 2&gt; temp.txt); cat &lt;&amp;3 rm temp.txt   So the question is, how do I redirect the stderr of the  function func to the variable b without the need of a temporary file? How to link data to a polygon ArcMap 10.3 I have a map with different polygons (118). Each of this polygons represent diferent vegetation types.  For each of those polygons I have data of which species there is and how abundant they are (the abundance is measured with a scale from 1 to 3).  I would like to "link" (I am sorry if its not the correct way of name it) the data of which species and abundance there is in each of those polygons.   I would like afterwards to be able of selecting the different polygons containing the same abundance and species.  In the polygons I created there is no atributes associated other than (FID, shape and Id. the 3 of them created alone by the program when I drew them) and the tables I have in excel with the data I want to "link" to the polygons contain a column called species and another abundance.  As you can see, I'm pretty new using the program...    As I have tried to do what you all suggest in the comments down here, and I couldn't achieve what I was wanting to do (provably because of my bad explanation before...)  I leave a picture:  As you can see in the attribute table, that is how every attribute table of each polygon (which represents one area) looks like. On the right there is how I have my data in excel. Could you please suggest something I could do in order to add to the polygons attribute table the data belonging of species and its abundances (polygon number 1 has to have all the species (Acer mons, Acer pseu, Acer repens….) and its abundance (which are the numbers of the row Area1). Why bother with the dual problem when fitting SVM? What is the difference between cascade & inverse in hibernate, what are they used for? Using sed with special characters I don’t actually need to run the command below, and I am aware of ssh keys if I did want to log in without typing a password. I would just like to know how ssh seems to circumvent my file redirection.  Running the following command, ssh prompts me for a password:  ssh nobody@192.168.1.151 &gt; /dev/null 2&gt; /dev/null &lt; /dev/null   How does this work? stdin, stdout, and stderr are all redirected, but ssh still manages to print a prompt on my screen and read what I type. I tried adding the ssh arguments -t -t and -T (not both at once), to enable or disable pseudo-tty allocation, but it made no difference.  I also tried closing all input and output this way, although I don’t know if I typed it correctly. Still, ssh prompts for a password:  (exec 0&lt;&amp;- 1&lt;&amp;- 2&lt;&amp;- 0&gt;&amp;- 1&gt;&amp;- 2&gt;&amp;-; ssh nobody@192.168.1.151) How to extend summations to fractional orders? When should I use "didn't" instead of "haven't"? Is haven't supposed to mean something I may still do and didn't not?  Can I use didn't for something I might still do? Why does this steam engine fail to run? Terminal method of formatting storage drive I want to know how to format a storage drive from the terminal. Helpful things to provide in the answer would be often used options for commands and base knowledge that one can use to extrapolate future uses. Specifically I would like to know how to format in the different file systems such as NTFS, FAT32, EXT4, etc. Information on how to partition the drive via terminal is also wanted.  I am trying to format a high capacity external hard drive (EHDD) into NTFS - from the terminal.   I know I can use gparted for this as well as other GUI programs, but I still want to now how to do it from the terminal. Nginx: Forward all Subdomains My code doesn't work with second level tld's like domain.co.uk Here is my conf:   # add www.   if ($host ~ ^(?!www)) {    rewrite ^/(.*)$ http://www.$host/$1 permanent;   }    # remove subdomain   if ($host ~ &quot;^www\.(.*)\.(.*\.([a-z]{2,4}|[a-z]{2}\.[a-z]{2}))&quot;) {    set $host_without_sub $2;    rewrite ^/(.*)$ http://www.$host_without_sub/$1 permanent;   } I've been using mac for years, but prefer to do software development on windows. I'm really used to is using the folowing shortcuts on windows very much:  &lt;CTRL&gt;  + INSERT: Copy &lt;SHIFT&gt; + INSERT: Paste &lt;SHIFT&gt; + DELETE: Cut   Of late, I've taken to doing even my development work on the Mac. However, as a matter of habit, I'm missing these shortcuts very much. Actually, I find these a lot more convenient than COMMAND + (C/V/X) combo.  Is there a way to reassign these three shortcuts at least?   I've look all over the internet and in the "Keyboards" system preferences but I did not find anything.  PS: If you're wondering where I find the INSERT keys on a mac book pro, I use a wireless keyboard. I often read that one should not place swap partitions on a SSD drive, as this may harm the device. Is this true? Can you please explain the reason to me?  Because I otherwise would have thought that placing swap on an SSD is the best choice, as it's much faster than HDDs and therefore swapping RAM contents to the SSD is not as slow as it would be with the HDD... The result of ls * , ls ** and ls *** I know using the command ls will list all the directories. But what does the ls * command do ? I used it and it just lists the directories. Does the star in front of ls mean how deep it will list the directories? Under the  tag I have seen many questions on earth-616. Are there any other versions of earth as well? How do they differ from each other? how to shuffle characters of strings in bash? i have this script where it generates random password but it needs to be shuffled. I couldnt find a way to do it. Please Help me.  num=("0" "1" "2" "3" "4" "5" "7" "8" "9") special=("@" "#" "$" "%" "*" "-" "+") upper=(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) lower=(a b c d e f g h i j k l m n o p q r s t u v w x y z) lower2=${#lower[*]}   #${lower[$((RANDOM%lower2))]} upper2=${#upper[*]}   #${upper[$((RANDOM%upper2))]} num2=${#num[*]}     #${num[$((RANDOM%num2))]} special2=${#special[*]} #${special[$((RANDOM%special2))]} echo "${special[$((RANDOM%special2))]}${num[$((RANDOM%num2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}${lower[$((RANDOM%lower2))]}${upper[$((RANDOM%upper2))]}"   this is the output: @7nOyIaJ  how do I randomize this? How does IPv4 Subnetting Work? This is a  about IPv4 Subnets.      Related:               How does Subnetting Work, and How do you do it by hand or in your head?  Can someone explain both conceptually and with several examples? Server Fault gets lots of subnetting homework questions, so we could use an answer to point them to on Server Fault itself.   If I have a network, how do I figure out how to split it up? If I am given a netmask, how do I know what the network Range is for it? Sometimes there is a slash followed by a number, what is that number? Sometimes there is a subnet mask, but also a wildcard mask, they seem like the same thing but they are different? Someone mentioned something about knowing binary for this? The title says it all, just wondered if accessing the iOS will count towards your consecutive visited days.