How do I store binary data in a MySQL database?
How do I store binary data in ?
MacOS partition showing as "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFF" Shell script throws a not found error when run from a sh file. But if entered manually the commands work I'm trying to use the following script to generate a sitemap for my website. When I run it as sh thsitemap.sh I get an error like this and creates an empty sitemap.xml file:  thsitemap.sh: 22: thsitemap.sh: [[: not found thsitemap.sh: 42: thsitemap.sh: [[: not found thsitemap.sh: 50: thsitemap.sh: Syntax error: "(" unexpected   But as the same user root when I manually copy and paste these lines on the terminal, it works without any error and the sitemap.xml file have all the urls. What's the problem? How can I fix this?  #!/bin/bash ############################################## # modified version of original http://media-glass.es/ghost-sitemaps/ # for ghost.centminmod.com # http://ghost.centminmod.com/ghost-sitemap-generator/ ############################################## url="techhamlet.com" webroot='/home/leafh8kfns/techhamlet.com' path="${webroot}/sitemap.xml" user='leafh8kfns'       # web server user group='leafh8kfns'      # web server group  debug='n' # disable debug mode with debug='n' ############################################## date=`date +'%FT%k:%M:%S+00:00'` freq="daily" prio="0.5" reject='.rss, .gif, .png, .jpg, .css, .js, .txt, .ico, .eot, .woff, .ttf, .svg, .txt' ############################################## # create sitemap.xml file if it doesn't exist and give it same permissions # as nginx server user/group if [[ ! -f "$path" ]]; then     touch $path     chown ${user}:${group} $path fi  # check for robots.txt defined Sitemap directive # if doesn't exist add one # https://support.google.com/webmasters/answer/183669 if [ -f "${webroot}/robots.txt" ]; then SITEMAPCHECK=$(grep 'Sitemap:' ${webroot}/robots.txt)     if [ -z "$SITEMAPCHECK" ]; then     echo "Sitemap: http://${url}/sitemap.xml" &gt;&gt; ${webroot}/robots.txt     fi fi ############################################## echo "" &gt; $path  # grab list of site urls list=`wget -r --delete-after $url --reject=${reject} 2&gt;&amp;1 |grep "\-\-"  |grep http | grep -v 'normalize\.css' | awk '{ print $3 }'`  if [[ "$debug" = [yY] ]]; then     echo "------------------------------------------------------"     echo "Following list of urls will be submitted to Google"     echo $list     echo "------------------------------------------------------" fi  # put list into an array array=($list)  echo "------------------------------------------------------" echo ${#array[@]} "pages detected for $url"  echo "------------------------------------------------------"  # formatted properly according to # https://support.google.com/webmasters/answer/35738 echo "&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt; &lt;urlset xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9  http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"&gt;" &gt; $path  echo '     ' &gt;&gt; $path;    for ((i=0;i&lt;${#array[*]};i++)); do echo "&lt;url&gt;     &lt;loc&gt;${array[$i]:0}&lt;/loc&gt;     &lt;lastmod&gt;$date&lt;/lastmod&gt;     &lt;changefreq&gt;$freq&lt;/changefreq&gt;     &lt;priority&gt;$prio&lt;/priority&gt; &lt;/url&gt;" &gt;&gt; $path    done echo "" &gt;&gt; $path echo "&lt;/urlset&gt;" &gt;&gt; $path  # notify Google # URL encode urls as per https://support.google.com/webmasters/answer/183669 if [[ "$debug" = [nN] ]]; then     wget  -q --delete-after http://www.google.com/webmasters/tools/ping?sitemap=http%3A%2F%2F${url}%2Fsitemap.xml      rm -rf ${url} else     echo "wget  -q --delete-after http://www.google.com/webmasters/tools/ping?sitemap=http%3A%2F%2F${url}%2Fsitemap.xml"      echo "rm -rf ${url}" fi echo "------------------------------------------------------"  exit 0 How to show that the set of points of continuity is a $G_{\delta}$ "Pick up something" or "pick something up"? For a book cover, I want to write the title vertically (like in Japanese, but using English text):           T T        I H        T I  I  M  L S  S  Y  E   How do I do this without jumping through a host of \vbox and \hboxes? Where to start with Oracle? app engine datastore auto-clears every time project runs MySQL Error 1093 - Can't specify target table for update in FROM clause I have a table story_category in my database with corrupt entries. The next query returns the corrupt entries:  SELECT *  FROM  story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category INNER JOIN         story_category ON category_id=category.id);   I tried to delete them executing:  DELETE FROM story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category        INNER JOIN story_category ON category_id=category.id);   But I get the next error:      #1093 - You can't specify target table 'story_category' for update in FROM clause    How can I overcome this? [Salutations]  (check one)  [ ] Well trained professional, [ ] Casual reader, [ ] Hapless wanderer,   I have a (check all that apply)  [ ] query [ ] stored procedure [ ] database thing maybe     that was running fine (if applicable)   [ ] yesterday [ ] in recent memory [ ] at some point    but is suddenly slower now.  I've already checked to make sure it's not being blocked, and that it's not the victim of some long running maintenance task, report, or other out of band process.  What is the problem, what should I do, and what information can I provide to get some help?  [*Insert appropriate closing remarks*] How do I convert Word smart quotes and em dashes in a string? Can't delete files or folders on partition I have an NTFS partition. The idea is I can use this for data on either Ubuntu Mate or Windows 10 dual boot. It worked fine when I first installed Mate, but recently I no longer have the delete option when I right-click on a file or folder. The delete key does nothing. I also can't paste into the partition (Paste greyed out). It's as if the whole partition is read-only. In Gparted, the partition is marked with a key. Does this mean anything? I'm not aware of having changed anything, however, Windows recently did a big update - have they hijacked my drive?  I've read related posts, but people speak of returned errors - I have no errors, just nothing happens. Also, suggested solutions seem far too technical for what must surely be a simple tick-a-box fix!  Please note - for me the Terminal is where I get off a train and Sudo sounds like a Japanese noodle dish. ;) GUI's preferred if possible! Thanks for your patient help! For what $n$ is $U_n$ cyclic? When true polymorphed creature dies, does it revert to its original form? The  description says:     Creature into Creature.   The transformation lasts for the duration, or until the target drops to 0 hit points or dies. If you concentrate on this spell for the full duration, the transformation lasts until it is dispelled.   Does the second sentence imply the creature won't revert to its normal form, even being killed? (providing the caster were concentrating on the spell for the full duration)  If so, isn't "until the target drops to 0 hit points" enough? Why the "...or dies" addition? A creature can't die having more that 0 hit points, can it? Why is "that"/"which" omitted in this sentence? Computer keeps restarting by itself How to connect and disconnect to a network manually in terminal? Since the network manager is troubling me so much I want to replace it (possibly wicd orNM from ppa:volanin).  I do not know how to connect and disconnect to the network through the terminal without using network manager.  I would like a command-line way of managing the network. Copy files excluding x,y,z causing error in shell script I'm not well versed in shell scripting but I imagine this to be a painfully easy fix but its eluding me.  I need to copy the contents of a directory excluding a number of files. I have a command that works when I enter it into the terminal, but when its run in a shell script it fails with a syntax error or just doesn't work.   The command in question is:  cp -r path/to/!(dir1|dir2|dir3) destination   Any help would be greatly appreciated! Is an HTTPS query string secure? I am creating a secure web based API that uses HTTPS; however, if I allow the users to configure it (include sending password) using a query string will this also be secure or should I force it to be done via a POST? Windows 8.1 Keeps Turning Off Automatic Updates My OS keeps turning off automatic Windows updates without even logging off or restarting the computer.  Action center icon in the task bar warns me about choosing an option for Windows update as if I haven't chosen countless times already.  It started to get really annoying to keep choosing a Windows update option 5 - 10 times a day.   I really appreciate any help you can provide on this matter.  Things I have tried so far;   I have tried  suggested by . Unfortunately didn't help my case Tried following commands; reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 0 /f  and then sc config wuauserv start= auto as suggested . Googling. Tried few suggestions which didn't help my case. Issue with regex backreference in Python