Principled BSDF ,micro displacement turns black with normal map
Microdisplacements with adaptive subdivision turning black
Duplicate application icons in Ubuntu dock upon launch I'm using Ubuntu 17.10 with GNOME shell and Numix-Circle icon theme.   When I hover over the Numix icon for Nightly Web Browser, which is pinned to the dock I get the title "Nightly Web Browser".      But when I launch the program, another icon pops up at the bottom, with the name "Nightly". How to use xcolor to color a pgfplot How do I use xcolor to color a specific cell from a table in pgfplots? Is xcolor the best tool to use here? I'm trying to loop over a list of colors and color the cells in the column individually.  \documentclass{article} \usepackage{pgfplotstable,filecontents} \RequirePackage{listofitems} \usepackage{}  \begin{filecontents*}{test.csv}     ColA, ColB, ColC     0.17, 0.91, 0.67     0.15, 0.17, 0.92     0.48, 0.1, 0.28 \end{filecontents*}     \begin{document}     \pgfplotstabletypeset[col sep=comma,     ]{test.csv}     \def\mylistOne{green, blue, orange}     \readlist*\mylistTwo{\mylistOne}     \newcounter{myCounter}     \setcounter{myCounter}{-1}     \foreachitem\x\in\mylistTwo[]{         \stepcounter{myCounter}         \pgfplotstableset{             every row \themyCounter column 1/.style={                 \cellcolor{\x}         }     } } \end{document} Irreducibility of $X^n - 2$ over $\mathbf Z[i]$. I was “playing” with Eisenstein's criterion and the polynomials $X^n-p$ ($p$ being a prime number).  Over $\mathbf Z$, the classical Eisenstein's criterion directly applies and shows that $X^n - p$ is an irreducible element of $\mathbf Z[X]$. The question was “what happens over $\mathbf Z[i]$?”  We know that in this new ring, a prime number $p$ has one of three different fates:   if $p \equiv -1\ (\mathrm{mod}\, 4)$, $p$ still is an irreducible element of $\mathbf Z[i]$, or equivalently $(p) \subset \mathbf Z[i]$ still is prime. (Unless I'm mistaken, number theorists say that $p$ is inert). Eisenstein's criterion still applies and the polynomial is irreducible over $\mathbf Z[i]$. if $p \equiv 1\ (\mathrm{mod}\, 4)$, $p$ can be written as a sum of two squares: $p = n^2 + m^2$ and is therefore reducible on $\mathbf Z[i]$: $p = (n+im)(n-im)$. These two factors aren't associated (the units in $\mathbf Z[i]$ being $\pm 1$ and $\pm i$) so $(p)$ splits: $(p) = (n+im)(n-im)$ is the product of two different prime ideals. One can still use Eisenstein's criterion with either of these prime ideals, and $X^n - p$ is irreducible over $\mathbf Z[i]$. if $p = 2$, the oddest of all primes, one still has a factorisation $p = (1+i)(1-i)$ but this time, $1+i$ and $1-i$ are associated. In NT slang, $(2)$ is ramified: $(2) = (1+i)(1-i) = (1+i)^2$ and one cannot directly use Eisenstein's criterion.   So here's my question: how do we prove (or disprove) the irreducibility of $X^n - 2$ over $\mathbf Z[i]$? systemd gives us the systemctl commands suite which is mostly used to enable services to start at boot time. We can also start, stop, reload, restart and check status of services with the help of systemctl.  We can do, for example, sudo systemctl enable service_name, and service_name will automatically start at boot time. We can also disable services not to start at boot time.  Is the only difference between the service and systemctl commands that systemctl can be used to enable the start of services at run time? Can we use systemctl on any service? What other significant differences are there? Two very closely related questions:  If a card has two different "Sacrifice this creature for X" abilities on it, does sacrificing it give both benefits?  Likewise, if a card requires a creature to be sacrificed, but that creature has a "Sacrifice this creature for X" ability, do you get the sacrifice benefit when you sacrifice it for the other requirement? In several cases I want to add a toolbar to the top of the iPhone keyboard (as in iPhone Safari when you're navigating form elements, for example).    Currently I am specifying the toolbar's rectangle with constants but because other elements of the interface are in flux - toolbars and nav bars at the top of the screen - every time we make a minor interface change, the toolbar goes out of alignment.  Is there a way to programmatically determine the position of the keyboard in relation to the current view? Does C1 code coverage analysis exist for Ruby? I'm currently using  to get C0 code coverage analysis for a rails project that I'm working on.  However, those results are practically meaningless- I have 100% coverage according to rcov (as it only covers C0 analysis) and I've barely written half the test cases for the functionality that exists thus far.  I'm used to the useful results from the code coverage in Visual Studio 2008 Team, which has C1 coverage.  Are there any tools that provide similar coverage for ruby? I have the formula $x! + y! = z!$ and I'm looking for positive integers that make it true. Upon  inspection it seems that x = y = 1 and z = 2 is the only solution. The problem is how to show it.   From the definition of the factorial function we know $x! = x(x-1)(x-2)...(2)(1)$  So we can do something like this:  $$ [x(x-1)(x-2)...(2)(1)] + [y(y-1)(y-2)...(2)(1)] = [z(z-1)(z-2)...(2)(1)]$$   we can then factor all of the common terms out on the LHS.  $$ [...(2)(1)][x(x-1)(x-2)... + y(y-1)(y-2)...] = [z(z-1)(z-2)...(2)(1)]$$ and divide the common terms out of the right hand side  $$[x(x-1)(x-2)...] + [y(y-1)(y-2)...] = [z(z-1)(z-2)...]$$  I'm stuck on how to proceed and how to make a clearer argument that there is only the one solution (if indeed there is only the one solution).   If anybody can provide a hint as to how to proceed I would appreciate it. Would a Cup of Tea Be Hotter If you Add the Milk Before or After Boiling Water? This is a bit of dispute between work colleagues. An answer would be greatly appreciated.  My argument is as follows:  If you add X amount of milk at a temperature of M to a mug at room temperature R before adding X amount of water at temp W, the result would be a cooler cup of tea than if you'd added the hot water first. This would be due to the milk reducing the overall temperature of the mug in the time that has been in it resulting in the addition of boiling water having less of an effect and resulting in a slightly cooler cup of tea/coffee.   Conversely, if you add the hot water first, due to the mug being heated, the effect of adding the cool milk will be less and therefore the end result will be a hotter cup of tea.  My Colleagues arguement is simply that it would not make a difference but without any form of justification.   If anyone can give real scientific light to this issue it would be greatly appreciated :) Referring to correctly-styled algpseudocode procedure name in document Given an algorithm written in algpseudocode:  \documentclass{article} \usepackage{algorithm} \usepackage{algpseudocode} \begin{document} \begin{algorithm}   \caption{Part 1}   \begin{algorithmic}[1]     \Procedure {FooProc}{$G$}       \State ...     \EndProcedure   \end{algorithmic} \end{algorithm} \end{document}   How can I now refer to FooProc in my document (outside of the algorithm environment) such that it has the same typeset as in inside the algorithm environment? Working with IPv6 Addresses in PHP After searching around somewhat thoroughly, I noticed a slight lack of functions in PHP for handling . For my own personal satisfaction I created a few functions to help the transition.  The IPv6ToLong() function is a temporary solution to that brought up here: . It will split the IP in to two integers and return them in an array.  /**  * Convert an IPv4 address to IPv6  *  * @param string IP Address in dot notation (192.168.1.100)  * @return string IPv6 formatted address or false if invalid input  */ function IPv4To6($Ip) {     static $Mask = '::ffff:'; // This tells IPv6 it has an IPv4 address     $IPv6 = (strpos($Ip, '::') === 0);     $IPv4 = (strpos($Ip, '.') &gt; 0);      if (!$IPv4 &amp;&amp; !$IPv6) return false;     if ($IPv6 &amp;&amp; $IPv4) $Ip = substr($Ip, strrpos($Ip, ':')+1); // Strip IPv4 Compatibility notation     elseif (!$IPv4) return $Ip; // Seems to be IPv6 already?     $Ip = array_pad(explode('.', $Ip), 4, 0);     if (count($Ip) &gt; 4) return false;     for ($i = 0; $i &lt; 4; $i++) if ($Ip[$i] &gt; 255) return false;      $Part7 = base_convert(($Ip[0] * 256) + $Ip[1], 10, 16);     $Part8 = base_convert(($Ip[2] * 256) + $Ip[3], 10, 16);     return $Mask.$Part7.':'.$Part8; }  /**  * Replace '::' with appropriate number of ':0'  */ function ExpandIPv6Notation($Ip) {     if (strpos($Ip, '::') !== false)         $Ip = str_replace('::', str_repeat(':0', 8 - substr_count($Ip, ':')).':', $Ip);     if (strpos($Ip, ':') === 0) $Ip = '0'.$Ip;     return $Ip; }  /**  * Convert IPv6 address to an integer  *  * Optionally split in to two parts.  *  * @see https://stackoverflow.com/questions/420680/  */ function IPv6ToLong($Ip, $DatabaseParts= 2) {     $Ip = ExpandIPv6Notation($Ip);     $Parts = explode(':', $Ip);     $Ip = array('', '');     for ($i = 0; $i &lt; 4; $i++) $Ip[0] .= str_pad(base_convert($Parts[$i], 16, 2), 16, 0, STR_PAD_LEFT);     for ($i = 4; $i &lt; 8; $i++) $Ip[1] .= str_pad(base_convert($Parts[$i], 16, 2), 16, 0, STR_PAD_LEFT);      if ($DatabaseParts == 2)             return array(base_convert($Ip[0], 2, 10), base_convert($Ip[1], 2, 10));     else    return base_convert($Ip[0], 2, 10) + base_convert($Ip[1], 2, 10); }   For these functions I typically implement them by calling this function first:  /**  * Attempt to find the client's IP Address  *  * @param bool Should the IP be converted using ip2long?  * @return string|long The IP Address  */ function GetRealRemoteIp($ForDatabase= false, $DatabaseParts= 2) {     $Ip = '0.0.0.0';     if (isset($_SERVER['HTTP_CLIENT_IP']) &amp;&amp; $_SERVER['HTTP_CLIENT_IP'] != '')         $Ip = $_SERVER['HTTP_CLIENT_IP'];     elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR']) &amp;&amp; $_SERVER['HTTP_X_FORWARDED_FOR'] != '')         $Ip = $_SERVER['HTTP_X_FORWARDED_FOR'];     elseif (isset($_SERVER['REMOTE_ADDR']) &amp;&amp; $_SERVER['REMOTE_ADDR'] != '')         $Ip = $_SERVER['REMOTE_ADDR'];     if (($CommaPos = strpos($Ip, ',')) &gt; 0)         $Ip = substr($Ip, 0, ($CommaPos - 1));      $Ip = IPv4To6($Ip);     return ($ForDatabase ? IPv6ToLong($Ip, $DatabaseParts) : $Ip); }   Someone please tell me if I'm reinventing the wheel here or I've done something wrong.  This implementation converts IPv4 to IPv6. Any IPv6 address it doesn't touch. When should I use the subjunctive mood? Find all $n \in \mathbb{N}$ such that $\phi(n) = 4294967296=2^{32}$.  I managed to find that $16106127360$, $8589934592$, $10737418240$ and $12884901888$ are solutions for the equation, but I do not know how to find all of them. Is my phone liable to explode if I charge it with a charger that came with a different phone? Difference between knockout View Models declared as object literals vs functions A friend of mine was trying to explain to me how all infinities are equal. For example, they were saying that there are the same amount of numbers between $0$–$1$ as there are between $0$–$2$.  The way they explained it, you could prove that there are the same amount of numbers by getting a match to each number.  For example, for any number in the range from $0$–$2$, you can find a matching number in the range $0$–$1$ by dividing the number by 2. In every case, the ending number will end up between $0$–$1$. In addition, if you multiplied any number in the range of $0$–$1$ by 2, you will always end up with a number between $0$–$2$ Therefore, there should be the same infinite amount of numbers between  $0$–$1$ as there are between $0$–$2$.  Is this principle accurate? The problem that I had with it was, if in-fact there are the same amount of numbers between 0 and 1 as there are between 0 and 2, why is 2 greater than 1? Case insensitive 'Contains(string)' This is what is supposedly his claim:     My noumenal self is an uncaused cause outside of time, which therefore   is not subject to the deterministic laws of nature in accordance with   which our understanding constructs experience.   How can he say that if a noumenal self has to exist in nature and be bound to body that exists in nature? Also, if his noumenal self is free then so does 7 billion other people's, which is not the case because they all live in a societal structure where everyone has freedom that comes with a bunch conditions as to what is forbidden. $x^3+x+1$ irreducible over $\mathbb{F}_2$, $\theta$ root, compute powers of $\theta$ Problem statement:     Show that $x^3+x+1$ is irreducible over $\mathbb{F}_2$ and let $\theta$ be a root. Compute the powers of $\theta$ in $\mathbb{F}_2$.   I am having trouble computing the powers of $\theta$. $x^3+x+1$ is irreducible, since any cubic polynomial over a field is reducible if and only if it has a root in the field. Since $\mathbb{F}_2=\{0,1\}$, we see that none of these is a root of $x^3+x+1$.  To compute the powers of $\theta$, note that $\theta^3+\theta+1=0$. Hence $\theta^3=-(\theta+1)$. Is this a good enough answer for $\theta^3$?  To compute $\theta^2$, note that $\theta = -(\theta^3+1)$. Therefore, $$\theta^2=(\theta^3+1)^2 = \theta^6 + 2\theta^3 + 1 = (-\theta-1)^2-2\theta-2+1,$$ which just reduces to $\theta^2$. Any ideas for computing these powers?  Thanks! Punctuation of direct speech, edge cases I recently learned that I have developed a consistent, but entirely wrong approach to punctuating direct speech in fiction. I am in the unenviable position of trying to relearn.  Previously I wrote such things as:     "I'm done." She said.   when the quoted speech was definitely, absolutely the end of a sentence. So now I know I need.     "I'm done," she said.   This follows the rule that a period is only allowed when the end of the spoken sentence is also the end of the sentence in the narrative. For example:     "I'm done." She slammed the door on the way out.   So, it now looks odd to me when there are multiple sentences in the speech:     "I can't take her. I'm done," she said.   Can you reassure me that is correct, or give the correct form? Please don't suggest rewriting the sentence to put 'she said' in the middle - I'm aware of that: I'm specifically asking about the punctuation rules.  The other odd case is speech ending with an ellipsis. Do sentence terminating ellipses (four periods normally) become:     "I can't take her. You know, ...," she said, nodding towards Jane.   If so, are non-terminating ellipses dealt with the same way?     "I can't take ...," she nodded towards Jane, "any more!"   or can non-terminating ellipses be used unadorned?     "I can't take ..." she nodded towards Jane, "any more!"   I'd be very grateful if you could point me at references as well as answers. For the record I am a British writer writing for both British and US publication, so any variation is also interesting to me!