I have changed the Trusted Host Settings on my website where I currently installed Drupal beta 8.0 alpha version. But in the error report it is still saying that "Trusted Host Settings NOT ENABLED" . I have changed the code as follows.  // Before $settings['trusted_host_patterns'] = array(   '^www \ .example \ .com$', );     // After $settings['trusted_host_patterns'] = array(   '^www \ .technicalreply \ .com$', );   The error report is still saying that trusted host settings are not enable. What did I do wrong? How can I fix it?
From Drupal 8 beta 6 (released today), I have this error :     Error message UnexpectedValueException: Untrusted Host "localhost" in   Symfony\Component\HttpFoundation\Request->getHost() (line 1221 of   core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Request.php).   I use this local url to call my site:   Inside my setting file, I have:       $settings['trusted_host_patterns'] = array(         'theming\.dev$',      );   Note, this error is displayed only when I uncomment this lines:   if (file_exists(__DIR__ . '/settings.local.php')) {    include __DIR__ . '/settings.local.php';  }   What is the problem please ? Thanks.
How to find correct size inner tube Block network access of a process? Lightning QuickAction (API) without modal I am attempting to replace JS buttons with quick actions. These button simply call a web service method and alert the result and need no user interaction.  With quick action a modal always seems to appear and this is not desirable.   I am calling the Webservice method in the doInit function and  firing a toast event with the results and have no need for the modal popup.  Seems an oversight maybe? But is there a way to accomplish this without the modal to closely mimic the JS button functionality?  Ideally we could show the spinner without the modal   Right now I am simply calling   $A.get("e.force:closeQuickAction").fire();   at the end of the doInit but it is not the most ideal in way of a UI to do this IMHO as it flashes the modal on the screen briefly. Question, is it ok for one of the pages levels to 404? (SEO-wise)  Let's say I have a sitemap like this:  example.com --/services   --/foo   --/bar --/sectors   --/my-sector   --/another-sector   --/the-sector   --/stuff --/about-example --/contact --/etc --/etc   This makes a lot of structural sense. However, from a design point of view, I think having a page to show all the sectors (example.com/sectors) is pointless since all of the sector pages can be accessed from the home page, main navigation, and in each sector page.  Would there be any SEO consequences if the /sectors page were to 404?  Note: in the sitemap 'example.com/sectors' would not be included. Uninstalling Homebrew messed up git I uninstalled Homebrew using .  After running the above commands, I can't find .bashrc and .bash_profle. All files are gone from Documents , Desktop and Downloads :'(  When I do git status on /Users/ava it shows:  # On branch master # Untracked files: #   (use "git add &lt;file&gt;..." to include in what will be committed)  ... all the files which are in /Users/ava   history   113  cd `brew --prefix`   114  rm -rf Cellar   115  brew prune   116  rm `git ls-files`   117  rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions   118  rm -rf .git   119  rm -rf ~/Library/Caches/Homebrew   120  sudo chown -R $USER:admin /usr/local   121  ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"   122  brew doctor   What just happened? My desktop look is empty so all I have is a nice wallpaper. My Windows taskbar has the "Taskbar Appearance" setting to "Auto-hide the taskbar". Although hidden, it leaves a thin top layer so you can still see it a bit, and where the pinned shortcuts are. Is it possible to totally have it hidden without a trace? This is a serious question. It really bugs m. How can I set my system to suspend when inactive to a longer amount of time I run Mythtv on some Ubuntu 11.10 based machines.  In the power settings, I can choose from a list of time periods from 5 minutes up to 1 hour for the the machine to suspend when inactive.  I would like to set the suspend to occur at a longer interval, like 2 hours or 4.  Previously with Gnome, I would think that I could go into the gconf editor and find the key there, I am not sure with Unity where to override a setting like this.  Any suggestions? My usb mouse sleeps after 5 seconds of inactivity when running on battery power. It wakes uo again when i press any button on the mouse. This is really annoying.  I have made lsusb, and I noticed my mouse is   Bus 001 Device 012: ID 04d9:2083 Holtek Semiconductor, Inc.  I have checked my /sys/bus/usb/devices/usb1/power/autosuspend but it is already set to 0, and the directory usb1 has many subdirectories which also have autosuspend files, and i dont know how to edit them.  Also, I would like a permanent solution, which would work for any mouse, on any of my 3 usb ports. Any ideas?  Using: Ubuntu 12.04 64bit Sigmoid vs Relu function in Convnets How can I remove duplicates in my .bash_history, preserving order? I really enjoying using control+r to recursively search my command history. I've found a few good options I like to use with it: # ignore duplicate commands, ignore commands starting with a space export HISTCONTROL=erasedups:ignorespace  # keep the last 5000 entries export HISTSIZE=5000  # append to the history instead of overwriting (good for multiple connections) shopt -s histappend  The only problem for me is that erasedups only erases sequential duplicates - so that with this string of commands: ls cd ~ ls  The ls command will actually be recorded twice. I've thought about periodically running w/ cron: cat .bash_history | sort | uniq &gt; temp.txt mv temp.txt .bash_history  This would achieve removing the duplicates, but unfortunately the order would not be preserved. If I don't sort the file first I don't believe uniq can work properly. How can I remove duplicates in my .bash_history, preserving order? Extra Credit: Are there any problems with overwriting the .bash_history file via a script? For example, if you remove an apache log file I think you need to send a nohup / reset signal with kill to have it flush it's connection to the file. If that is the case with the .bash_history file, perhaps I could somehow use ps to check and make sure there are no connected sessions before the filtering script is run? When using the \cite command in figure captions and the ieeetr bibliography style, then  BibTeX numbers the citations as appearing earlier than they do in reality (i.e. the first citation in the document ends up being [42]).  Is there any way to get BibTeX to ignore the \listoffigures section when numbering? When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details. Taking Seats on a Plane Probably a really simple one this - I'm starting out with C# and need to add values to an array, for example:  int[] terms;  for(int runs = 0; runs &lt; 400; runs++) {     terms[] = runs; }   For those who have used PHP, here's what I'm trying to do in C#:  $arr = array(); for ($i = 0; $i &lt; 10; $i++) {     $arr[] = $i; } Why can't energy be created or destroyed? I need to do create a file with a filename such as :&gt;?, is this possible somehow? Windows stops it. I have searched this for hours but still no luck, obviously doing something wrong.  The journal (Risk Analysis) wants "Reference style is based on the National Library of Medicine (NLM) style guide. In-text citations are numbered, superscripted and in parentheses, and the reference list is numbered in order of appearance within the manuscript. Footnotes are superscripted without parentheses".  Could someone please suggest an appropriate .bst file to use that will produce this? Thanks, J Flag and close my own question Why is it possible to flag and close my own question?   The only realistic usage I could think of is when I see that my question is a duplicate, but it has already got some great answers. So instead of deleting the question, I would vote to close it as a duplicate.   But still, I can't see how flagging my own question would be useful. Convert a character digit to the corresponding integer in C it seems my bash-completion got corrupted. Every time I try to use command substitution, for example when I type  ls $(ls Deskto&lt;Tab&gt;   ..result is..  ls $(ls Desktobash unexpected eof while looking for matching ")".   I tried removing my .bashrc file and cp /etc/skel/bashrc ~/ to get a new one. That works until I add something into my new bashrc. Even when I do echo '#" &gt;&gt; ./.bashrc it breaks again. Removing my bash_aliases did not help either.  Also sudo apt-get install --reinstall bash-completion did not do the trick.  However there are some threads about similar problem, nothing works.  ANY hint will be greatly appreciated! :)