I just watched to this amazing example on how to animate Earth:  So I ask: is it possible to combine the two different textures below so that the night Earth (with lights on) appears in the shaddow region as Earth rotates?  Sources of images:
Some months ago I watched  video of Blenderguru about "How to create a realistic earth in blender". In this video blender render is used and  now that I understand texturing in cycles a little better I am trying to rebuild this "realistic earth" with cycles.    In the video - starting at about 11:30 min - it is shown how to map the "earth day" and "earth night" image textures. Depending on the lights shining on the earth the earth or night image is projected. I tried to rebuild that in cycles but I think I a making mistakes. In the circled box the "night" nodes are found. What Is my mistake ?   P.S When you see other mistakes in this node tree, please let me know.  OK ... I now have implemented the advice of Uncle Snail (except moving the black slider). Below an image of the earth and the updated node tree (I also rearranged nodes for better overview).    In the Color Ramp, I did not move the slider. Is that really necessary ??
How can I change the umask for one command only? How can I interactively execute a command in Linux (zsh, if it matters) with a different umask from the default, for one command only? Perhaps a combination of commands combined in a single line? The new umask should apply only to that command and return to its default value for the next command entered.  Ideally the command would be agnostic to the default umask in force before its entered (in other words, the default umask doesn't have to specified). 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; } If a subring of a ring R has identity, does R also have the identity? I know it does not make sense that if a subring of a ring $R$ is commutative, then $R$ is also commutative. (For example, the set consisting of the matrices whose all entries except (1,1)-entry are zero, is a subring of ring of 2x2 real matrices.)  I also considered the case of a ring containing a subring with identity, but I had no ideas. Maybe it seems that it does not make sense, either.  Who give me some examples supporting my guess? What the reason the number of lines differs?  $ head -n 100000 ./access.log &gt; ./data/log.sample $ cat $_ | wc -l 1933424 What is the coefficient of the term $a^i b^j c^k$ in the expansion of $(a+b+c)^n$? What is the coefficient of the term $a^i b^j c^k$  in the expansion of   $(a+b+c)^n$ ?   Given solution:     Before collecting like terms, each term in the expansion is a product   of $n$ factors each  of which is $a, b,$ or $c$.  Those terms which   have exactly i a’s, j b’s and k c’s can be combined into   the single term $a^i b^j c^k$ and the number of such terms will be   equal to the number of n letter strings containing i a’s, j b’s and k   c’s, which by the Mississippi rule is $\frac{n!}{(i!\times j! \times  k!)}$.   I understand that this problem is actually about the derivation of the coefficient of the multinomial theorem,but I am not sure about the combinatoric reasoning,what I mean is that I understand the analogy problem but what I couldn't is how the analogy holds here,Could anybody explain this to me? Because the beginning of the letter is moved a bit to the left when in italics mode, the breve also needs to move to the left,otherwise it is no longer under the letter.  \documentclass{article} \usepackage{semtrans} \begin{document} Right position: \U{h}  Wrong position: \textit{\U{h}} \end{document}     Any ideas how to correctly use a breve with italics? The general consensus is that the single best indicator of a fund's future performance is the its expense ratio . If you look for more than 5 minutes online you discover the  approach to investing; the , etc. It looks like the less you pay for a fund (and therefore the less it's managed), the better it does in the long run.  So why is it that in peoples' 401(k)s there are so many high-cost actively managed funds? Furthermore, why are there so many high-cost actively managed funds in the first place? Shouldn't the market reflect the fact that actively-managed funds typically don't beat the index they benchmark to and and react by purging itself of these crappy funds? Anybody kindly help me to find how to calculate pressure in bar from flow rate. I have a pipe and from that I am transferring water at a constant flow rate of 5ml/min. At this flow rate, with a 0.5 cm diameter pipe, what will be the pressure generated by water? UK Train - Can I board at a different station If two limits don't exist, are we sure the limit of sum doesn't exist? This is a true/false question.     If the limits $$\lim_ {x\to a}\ f(x)\quad \text{ and }\quad  \lim_ {x\to a}\ g(x)$$ don't exist, limits $$\lim_ {x\to a}\ (f(x)+g(x))\quad \text{ and }\quad \lim_ {x\to a}\ (f(x)g(x))$$ don't exist also.   My idea is, that, because $$\lim_ {x\to a}\ (f(x)+g(x))=\lim_ {x\to a}\ f(x)+\lim_ {x\to a} g(x)$$ then the limits doesn't exist, correct? I'm trying to install queXS cati app on my Ubuntu desktop and I installed MySQL server and PHP 5 and I cannot login into MySQL server as root without password:  mysql -u root    it says  ERROR 1045(28000) : Access denied for user 'root@localhost' (using password: no )   But it's okay when I enter mysql -u root -p   I can't figure out what the problem is. Setting Access-Control-Allow-Origin in ASP.Net MVC - simplest possible method How to copy all files from a directory to a remote directory using scp? How does Fermat's principle make light choose a straight path over a short path? This is a thought experiment where I have made a &quot;C&quot; shaped hole inside diamond. The refractive index $(\mu)$ of diamond is 2.45. Say we shine a laser from top of the &quot;C&quot; as shown. My calculations show that light reaching A can reach B in the least possible time if gone through the &quot;C&quot;. but I'm pretty sure the perpendicular laser beam travels undeflected and straight down. Though I don't have experimental evidence, I see something wrong either with my intuition or with the theory. It would be great if someone could clarify. *       'a' in the diagram is the thickness of the cutout and all comparable distances can be taken 'a'. I have a command that I want to have run again automatically each time it terminates, so I ran something like this:  while [ 1 ]; do COMMAND; done;   but if I can't stop the loop with Ctrl-c as that just kills COMMAND and not the entire loop.  How would I achieve something similar but which I can stop without having to close the terminal? Is there any UNIX variant on which a child process dies with its parent? Can polymorphing monsters spam their ability to effectively give themselves a massive health pool? Some creatures have an ability that lets them polymorph, such as the Couatl's Change Shape action. I am wondering if this ability could be used again whenever the form is dropped to give the creature a massive effective health pool.  For example, if the Couatl used their action to Change Shape and become a Veteran, then was hit for enough damage to kill the polymorphed form, could it then re-use the Change Shape ability to transform into a fully healed Veteran once more? Vector spaces for the irreducible representations of the Lorentz Group Proof of the First Isomorphism Theorem for Groups How to get apache to send a 404 based on no matching VirtualHost section (based on ServerName) being found? I am rebuilding an old server.  Only one of the five old sites need to go live and all five of the old sites point to the same IP address.  Unfortunately any time a request is made for one of the old sites via their own unique domain names they are passed the pages from the one site that I'm trying to make live.  I would just like the old sites to display a 404 instead of the one site that I'm actually trying to make live.  As an example:   Site 1 (192.168.0.1) [www.first.com] Site 2 (192.168.0.1) [www.second.com] Site 3 (192.168.0.1) [www.third.com]   I want to move site 1 live again.  So I turned on apache on the machine with the IP address of 192.168.0.1, with all of site 1's files in the /var/www directory.  When I browse to 192.168.0.1 or www.first.com I correctly see site 1. When I browse to www.second.com and www.third.com I also receive site 1 which is the problem.  Is there a way I can 404 any request which comes in without www.first.com?  Here is my sites-available:  NameVirtualHost *:80  LogFormat "%h %l %u %t \"%r\" %&gt;s %b" common  &lt;Files ~ "^\.ht"&gt;     Order allow,deny     Deny from all     Satisfy All &lt;/Files&gt;  &lt;Directory /&gt;   Order Deny,Allow   Deny from all   Options None   AllowOverride None   Options None &lt;/Directory&gt;  &lt;Directory /var/www&gt;   Order Allow,Deny   Allow from all &lt;/Directory&gt;  &lt;VirtualHost *:80&gt;         ServerName first.com         ServerAlias www.first.com         DocumentRoot /var/www         ErrorLog /var/log/first.com.err         CustomLog /var/log/first.com.log common &lt;/VirtualHost&gt;  &lt;VirtualHost _default_:*&gt;         ServerName unknown         DocumentRoot /var/www_404 &lt;/VirtualHost&gt;