simple (hopefully) question; I have a Dell XPS 13 with a Skylake processor, running Ubuntu 16.04. Some webpages cause flickering (namely Twitch); I have Googled solutions and came across hardware acceleration as an option to fix it, which worked but caused a lot of screen tearing and increased page load times. Any other suggestions on a solution?
I've upgraded from 4.4.0 to 4.4.8 and then 4.5.2 on Ubuntu 16.04 LTS 64-bit, and it's still happening.   At 4.5.2 it's even more frequent, and mainly in Chrome (haven't tried firefox or opera just yet). Every time I open a new web page. Any way to fix that, or is it a bug?  00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09) 04:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (rev 81)   Cheers.
Who did that to the priest's dog? In John Michael McDonagh's wonderful philosophical black comedy , a good priest receives a death threat during a confessional giving him a week to sort out his affairs.   During the course of the week there are a lot of encounters between the priest and his parishioners, many acting as red herrings to distract the audience form the identity of the potential killer. Several threatening acts also take place: the church is burned and the priest's dog is killed.   But in the final encounter between the priest and the mystery antagonist (I'm not saying who to avoid spoilers) the antagonist admits burning the church but claims not to have killed the priest's dog.  Are they lying? Or is there a good reason that someone else might have killed the dog? It would be nice to be able to put emphasis on specific bits of a fragment or of a quote (bold can help for a quote but I find that it makes things less readable sometimes). What do you think? Update: On , you can highlight particular lines by prefixing each line with @@. See also: Because of a former error in our ASP.Net application, created by my predecessor and undiscovered for a long time, thousands of wrong URLs where created dynamically. The normal user did not notice it, but Google followed these links and crawled itself through these incorrect URLs, creating more and more wrong links.  To make it clearer, consider the url     example.com/folder   should create the link     example.com/folder/subfolder   but was creating     example.com/subfolder   instead. Because of bad url rewriting, this was accepted and by default showed the index page for any unknown url, creating more and more links like this.     example.com/subfolder/subfolder/....   The problem is resolved by now, but now I have thousands of 404 errors listed in the Google Webmaster Tools, which got discovered 1 or 2 years ago, and more keep coming up.  Unfortunately the links do not follow a common pattern that I could deny for crawling in the robots.txt.  Is there anything I can do to stop google from trying out those very old links and remove the already listed 404s from Webmaster Tools? Is it possible to automatically "add" \left and \right commands in front of all brackets? The source code should be left intact, but LaTeX should interpret every pair of brackets as if they were preceded by such commands. This is because adding \left and \right commands is time consuming and makes source code longer and less readable. I considered defining new commands such as \lb and \rb for \left( and \right), but it doesn't seem very elegant to me: what if I also want to add square brackets for example?  Any ideas? Thanks. A closed ball in a metric space is a closed set Prove that a closed ball in a metric space is a closed set   My attempt: Suppose $D(x_0, r)$ is a closed ball. We show that $X \setminus D $ is open. In other words, we need to find an open ball contained in $X \setminus D$.   Pick $$t \in X-D \implies d(t,x_0) &gt; r \implies d(t,x_0) - r &gt; 0 $$ Let $B(y, r_1)$ be an open ball, and pick $z \in B(y,r_1)$. Then, we must have $d(y,z) &lt; r_1 $. We need to choose $r_1$ so that $d(z,x_0) &gt; r$. Notice by the triangle inequality  $$ d(x_0,t) \leq d(x_0,z) + d(z,t) \implies d(z,x_0) \geq d(x_0,t) - d(z,t) &gt; d(x_0,t) - r_1.$$  Notice, if we pick $r_1 = d(t,x_0)-r$ then we are done.  Is this correct? Is there a way to "auto login" in PuTTY with a password? Is there a way to configure a password for a stored session in ?  I know there is the capability to specify an "auto-login username" (under Connection/Data), but is there a way to do the same with the password? How to toggle or turn off text selection being sent to the clipboard I would like to disable the default behavior that seems to happen with every Linux distribution that I've ever tried that any selected text is immediately sent to the clipboard (Mint, Ubuntu, Fedora, SuSE, etc.) and every window manager (Gnome, KDE, Cinnamon), and instead to behave more like the Windows implementation.    I know that this is a beloved behavior by many in Linux, and I'm sure many will think I'm an idiot.  The reason I want to do this, is that I'm a keyboard junky when navigating a GUI.  (e.g.  when I'm in Linux and I copy a URL and then switch to my browser and type Ctrl+L, it selects the address bar and moves my intended paste down one notch and replaces it with what I'm trying to overwrite.)  I know there are MANY workarounds, but I don't really care about that, what I'd prefer is to be able to toggle the behavior for the clipboard. What is the volatile keyword useful for? At work today, I came across the volatile keyword in Java. Not being very familiar with it, I found . Given the detail in which that article explains the keyword in question, do you ever use it or could you ever see a case in which you could use this keyword in the correct manner? I'm trying to follow a line in a derivation for $P(Z&gt;X+Y)$ where $X,Y,Z$ are independent continuous random variables distributed uniformly on $(0,1)$.  I've already derived the pdf of $X+Y$ using the convolution theorem, but there's a line in the answer that says:  $P(Z&gt;X+Y) = \mathbb{E}[\ P(Z&gt;X+Y\ |\  X+Y )\  ]$ where $\mathbb{E}$ is the expectation.  I'm not familiar with this result. Could anyone give a pointer to a similar result if one exists?  Thanks. Fixing a code to highlight formulas and text on several lines In  I've found the following amazing code to highlight text on several lines.  The problem is that code dosen't work well with formulas : for example, fraction using the mode display are partially out of the highlighting frame.   Here is the code with one content showing the problem.  \documentclass{article}     \usepackage{soul}     \usepackage{tikz}     \usetikzlibrary{calc}     \usepackage{amsmath}     \usepackage{xcolor}      \makeatletter         \newcommand{\defhighlighter}[3][]{%             \tikzset{every highlighter/.style={color=#2, fill opacity=#3, #1}}%         }          \defhighlighter{yellow}{.5}          \newcommand{\highlight@DoHighlight}{             \fill[                 outer sep = -15pt, inner sep = 0pt,                  every highlighter, this highlighter              ](                 $(begin highlight)+(0,8pt)$) rectangle ($(end highlight)+(0,-3pt)$             );         }          \newcommand{\highlight@BeginHighlight}{             \coordinate (begin highlight) at (0,0) ;         }          \newcommand{\highlight@EndHighlight}{             \coordinate (end highlight) at (0,0) ;         }          \newdimen\highlight@previous         \newdimen\highlight@current          \DeclareRobustCommand*\highlight[1][]{%             \tikzset{this highlighter/.style={#1}}%             \SOUL@setup             %             \def\SOUL@preamble{%                 \begin{tikzpicture}[overlay, remember picture]                     \highlight@BeginHighlight                     \highlight@EndHighlight                 \end{tikzpicture}%             }%             %             \def\SOUL@postamble{%                 \begin{tikzpicture}[overlay, remember picture]                     \highlight@EndHighlight                     \highlight@DoHighlight                 \end{tikzpicture}%             }%             %             \def\SOUL@everyhyphen{%                 \discretionary{%                     \SOUL@setkern\SOUL@hyphkern                     \SOUL@sethyphenchar                     \tikz[overlay, remember picture] \highlight@EndHighlight ;%                 }{}{%                     \SOUL@setkern\SOUL@charkern                 }%             }%             %             \def\SOUL@everyexhyphen##1{%                 \SOUL@setkern\SOUL@hyphkern                 \hbox{##1}%                 \discretionary{%                     \tikz[overlay, remember picture] \highlight@EndHighlight ;%                 }{}{%                     \SOUL@setkern\SOUL@charkern                 }%             }%             %             \def\SOUL@everysyllable{%                 \begin{tikzpicture}[overlay, remember picture]                     \path let \p0 = (begin highlight), \p1 = (0,0) in \pgfextra                     \global\highlight@previous=\y0                     \global\highlight@current =\y1                     \endpgfextra (0,0) ;                     \ifdim\highlight@current &lt; \highlight@previous                         \highlight@DoHighlight                         \highlight@BeginHighlight                     \fi                 \end{tikzpicture}%                 \the\SOUL@syllable                 \tikz[overlay, remember picture] \highlight@EndHighlight ;%             }%             \SOUL@         }     \makeatother   \begin{document}  Lorem ipsum \highlight{dolor sit amet, consectetur adipis-icing elit, sed do eiusmod tempor} incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation \highlight[red]{ullamco $laboris$ nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit} in voluptate velit esse cillum dolore eu fugiat nulla pariatur.  Excepteur sint occaecat \highlight[green, draw=blue]{cupidatat non proident  $\dfrac{789}{7889}$ % The frame is not good for that formula ! suntinculpaquiofficiadeseruntmollitanimidestlaborum. Loremipsumdolorsitametconsecteturadipisicingelitseddoeiusmodtemporincididuntutlabore-etdoloremagnaaliqua.} I suppose I could write some more text here.  \end{document}     Is someone could help me to fix it? Using JQuery and Prototype in the same page Several of my pages use both JQuery and Protoype. Since I upgraded to version 1.3 of JQuery this appears to be causing problems, because both libraries define a function named '$'.  JQuery provides a function noConflict() which relinquishes control of $ to other libraries that may be using it. So it seems like I need to go through all my pages that look like this:  &lt;head&gt;           &lt;script type="text/javascript" src="/obp/js/prototype.js"&gt;&lt;/script&gt;     &lt;script type="text/javascript" src="/obp/js/jquery.js"&gt;&lt;/script&gt; &lt;/head&gt;   and change them to look like this:  &lt;head&gt;           &lt;script type="text/javascript" src="/obp/js/prototype.js"&gt;&lt;/script&gt;     &lt;script type="text/javascript" src="/obp/js/jquery.js"&gt;&lt;/script&gt;     &lt;script type="text/javascript"&gt;         jQuery.noConflict();         var $j = jQuery;     &lt;/script&gt; &lt;/head&gt;   I should then be able to use '$' for Prototype and '$j' (or 'jQuery') for JQuery. I'm not entirely happy about duplicating these 2 lines of code in every relevant page, and expect that at some point somebody is likely to forget to add them to a new page. I'd prefer to be able to do the following    Create a file jquery-noconflict.js which "includes" jquery.js and the 2 lines of code shown above Import jquery-noconflict.js (instead of jquery.js) in all my JSP/HTML pages   However, I'm not sure if it's possible to include one JS file in another, in the manner I've described? Of course an alternate solution is simply to add the 2 lines of code above to jquery.js directly, but if I do that I'll need to remember to do it every time I upgrade JQuery. Area51 proposals are being advertised now all over the network? While happily browsing  I suddenly noticed this:        Curious, I clicked and landed . Appears to be ordinary Area51 proposal, one out of hundreds.  Do all proposals get such ad at some point? What is the criteria? Any way to ask for such ad? When your body burns calories and you lose weight, obviously mass is leaving your body.  In what form does it leave?  In other words, what is the physical process by which the body loses weight when it burns its fuel?    Somebody said it leaves the body in the form of heat but I knew this is wrong, since heat is simply the internal kinetic energy of a lump of matter and doesn't have anything do with mass.  Obviously the chemical reactions going on in the body cause it to produce heat, but this alone won't reduce its mass. In the first series of the TV show several things apparently bypass  to reach Winterfell:   The Night's Watch member  captured near Winterfell and executed by Ned. The Direwolf &amp; her pups found immediately after the execution  and the other Wildlings travelling with her   If The Wall is approximately the same along its length it would presumably be impassible. Is the only option for them to go around the western end (since it stops at the Shadow Tower)? Is this clarified in the book? Are other methods mentioned in subsequent books? I'm using the Webform module for Drupal 8. The module confirmation settings for a form are the following:   Page (redirects to new page and displays the confirmation message) Inline (reloads the current page and replaces the webform with the confirmation message.) Message (reloads the current page/form and displays the confirmation message at the top of the page.) URL (redirects to a custom path or URL) URL with message (redirects to a custom path or URL and displays the confirmation message at the top of the page.)   But how am I able to submit a form via AJAX so that the page doesn't reload on submit, but a confirmation message still replaces the form? What did I do wrong?    EDIT:  Here is the solution which works:  First you have to hook the form alter function and set an AJAX callback (as in ):  use \Drupal\Core\Form\FormStateInterface;  function MYTHEME_form_alter(&amp;$form, FormStateInterface $form_state, $form_id) {   if ( isset($form['#webform_id']) &amp;&amp; $form['#webform_id'] == 'MYWEBFORM' )   {     // add an AJAX callback to the form submission     $form['actions']['submit']['#ajax'] = array(       'callback' =&gt; '\Drupal\MYMODULE\Controller\DefaultController::processFormSubmission',       'event' =&gt; 'click',     );   } }   Then in the processFormSubmission function you can process the form (put use \Drupal\Core\Form\FormStateInterface; at the top of your file) like:  // Instantiate an AjaxResponse Object to return. $ajax_response = new \Drupal\Core\Ajax\AjaxResponse();  /* do sth */  // in the DOM: replace the form with the text 'form submitted' $ajax_response-&gt;addCommand(new \Drupal\Core\Ajax\HtmlCommand('#MYFORM', 'form submitted'));  return $ajax_response; How to redirect output of an entire shell script within the script itself? Is it possible to redirect all of the output of a Bourne shell script to somewhere, but with shell commands inside the script itself? Redirecting the output of a single command is easy, but I want something more like this: #!/bin/sh if [ ! -t 0 ]; then     # redirect all of my output to a file here fi  # rest of script...  Meaning: if the script is run non-interactively (for example, cron), save off the output of everything to a file.  If run interactively from a shell, let the output go to stdout as usual. I want to do this for a script normally run by the FreeBSD periodic utility.  It's part of the daily run, which I don't normally care to see every day in email, so I don't have it sent.  However, if something inside this one particular script fails, that's important to me and I'd like to be able to capture and email the output of this one part of the daily jobs. Update: Joshua's answer is spot-on, but I also wanted to save and restore stdout and stderr around the entire script, which is done like this: # save stdout and stderr to file  # descriptors 3 and 4,  # then redirect them to &quot;foo&quot; exec 3&gt;&amp;1 4&gt;&amp;2 &gt;foo 2&gt;&amp;1  # ...  # restore stdout and stderr exec 1&gt;&amp;3 2&gt;&amp;4 I'm confused about the use of symbols $\vdash$ and  $ \models$. Reading the answers to  and  I see that:  the turnstile symbol $ \vdash $ denotes syntactic implication. Then $ S \vdash \psi$ means that $\psi$ can be derived from the formulae in $S$  the double turnstile $ \models $, denotes semantic implication. Then the notation $A \models B$ means simply that B is true in every model in which A is true.  So I understand that, e.g., $(ZFC+ A) \vdash B$ means that $A \Rightarrow B$ is a theorem in ZFC and, in this sense $\vdash$ is a mathematical symbol for a theorem. While $(ZFC+ A) \models B$ means that $ B$ is true in every model of ZFC in which $A$ is true, and, in this sense $\models$ is not a mathematical but a metamathematical symbol.  I understand correctly? And those are the only uses of the two symbols? What if I accidentally run command "chmod -R" on system directories (/, /etc, ...) I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back? How do I use dependency injection on \Drupal::moduleHandler() to a Controller? I am using the following line in a controller class.      \Drupal::moduleHandler()-&gt;alter('mymodule_myfunction', $plugin_items);   Pareview.sh is giving me this error message.     \Drupal calls should be avoided in classes, use dependency injection instead.   How should I accomplish this? Do I need to create a constructor, create a method, or a service? If so, what code should the service need? I found an example on  for a case where a service already exists. How to perform hard / cold reboot of iPhone or iPad?