This is my current code, I'm trying to set the background of my site to a rainbow gradient however this code isn't working, however I know its being called as the alert goes off on the page? How would I go about fixing this? var date = new Date(); var hours = date.getHours(); var day = date.getDay(); var seconds = date.getSeconds(); var minutes = date.getMinutes(); var month = date.getMonth();  if (month == 4) {     document.getElementById(&quot;container&quot;).style.backgroundColor = `linear-gradient(red, yellow, green)`;     alert(&quot;test&quot;); }
Anyone know a simple method to swap the background color of a webpage using JavaScript?
How to handle OutOfMemoryError in Java? What is Thanos's motivation for his action? If I had a gauntlet with essentially unlimited power, and my goal was to help make sure life in the universe was able to prosper, then my first thought toward this goal probably would not be      to extinguish half of all life.   This doesn't directly help anyone, and it is, at best, a temporary solution, since      populations will eventually grow back.   Assuming that I am not, in fact, secretly in love with an avatar of death itself, why would I choose to      commit universal genocide   instead of directly solving the limited resource problem?  So, to be specific, my question is: In-universe, what is Thanos's motivation for attempting to do this instead of more reasonable alternatives? Why does $1+2+3+\cdots = -\frac{1}{12}$? $\displaystyle\sum_{n=1}^\infty \frac{1}{n^s}$ only converges to $\zeta(s)$ if $\text{Re}(s) &gt; 1$.  Why should analytically continuing to $\zeta(-1)$ give the right answer? I am trying to add jQuery to my page (it is not being added by default). The file is adding to the page but after drupal.js causing the error:  SCRIPT5009: 'jQuery' is undefined  drupal.js, line 5 character 1    The code that adds drupal.js to the page in common.inc  ... 'misc/drupal.js' =&gt; array(           'data' =&gt; 'misc/drupal.js',           'type' =&gt; 'file',           'scope' =&gt; 'header',           'group' =&gt; JS_LIBRARY,           'every_page' =&gt; TRUE,           'weight' =&gt; -1,           'preprocess' =&gt; TRUE,           'cache' =&gt; TRUE,           'defer' =&gt; FALSE,         ), ...   In my module hook_init I have:    drupal_add_js('misc/jquery.js', array(     'group' =&gt; JS_LIBRARY,     'weight' =&gt; -20,     'cache' =&gt; TRUE,   ));   I would think with a lower weight it would load before drupal.js?  The header of the page contains the following scripts:  &lt;script type="text/javascript" src="http://mysite.com/misc/drupal.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/misc/jquery.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/misc/jquery.once.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/sites/default/files/languages/nl_c9aC92_wtuULa79-hTFcGPM53oqk1yKwciOa_Q3yO28.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/sites/all/modules/lang_dropdown/msdropdown/jquery.dd.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/sites/all/modules/lang_dropdown/lang_dropdown.js?mqdxrf"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://mysite.com/sites/all/modules/devel/devel_krumo_path.js?mqdxrf"&gt;&lt;/script&gt; How to not have an equation in the first line using the align environment? Paradox of General Comprehension in Set Theory, other than Russell's Paradox As is well known, the General Set Comprehension Principle (any class is a set) leads to the Russell Paradox (the class $x \notin x$ cannot be a set). As a result, set theories must restrict the Comprehension Principle to avoid self-reference. For example, in the case of ZFC, this is done by enumerating a small list of "safe" comprehension schema such as Separation.  Does General Comprehension lead to other types of paradox than Russell's? Or is this basically the only thing that can go wrong? Partial adb restore ICS devices support creating backups using adb backup, and restoring them using adb restore. Using adb backup, one can select that everything should be backed up, or only a certain package.  However, adb restore lacks all the options of adb backup. When I call adb restore backup.ab, where backup.ab is only the backup of a single package, the phone shows me a warning dialog saying that all settings are going to be lost after restoring the backup. Is it true that restoring a single package backup wipes all data on the phone? If yes, is it somehow possible to restore a single package using adb restore? Minecraft directory doesn't have a 'Resource Packs' folder? I go into my .minecraft folder and there's Assets and all the other files and folders, but no resource packs folder?  If I create one manually, and place the textures inside, they don't show up in-game.  I'm on a Mac. I met a guy on a sugar daddy dating site and we talked, I told him my situation and he said he would help.   He asked for my bank account information and I told him you can use cash app or PayPal to go through. He said his account manager deals with his finances. So I set up an account with a bank that I don’t use so that my primary account isn’t used.  Eventually he was in the process of sending me money and we had agreed on a amount that wasn't crazy. But then he asked for my address and I asked why and he said just wondering. Then said he wanted to send me a surprise for being his baby. Which I didn’t give.  Then later on he sent the money and said he sent me a bonus and that I was supposed to use that to pay his mothers caregiver, which he didn’t mention until after.  I kept questioning him and he was saying that he works in construction and he’s trusting me to carry out the errand. Then he said don’t let him down and I asked him if he was threatening me and he kept saying I need this done but didn’t really answer my question.  Am I being scammed? I’m about to change my password but is this a scam? I have an upcoming trip where I will be flying to and from Copenhagen, through Toronto.  I notice that my departure and return gate in the Philadelphia airport is not in the international terminal.  Where will I clear customs? If $X$ follows a Binomial distribution with parameters $n$ and $p$, what can we say on the distribution of $n\choose x$ and $x\choose n$ ? ($x$ is realization of $X$). Today I came across an OBVIOUSLY good answer in /review. It had 7 upvotes, contained lists, paragraphs of explanation, and well-applied sample code. It was also moderately long. How does a question like this get flagged for review? I don't really know how the algorithm works.   If this is low-quality then I feel bad about all of my answers.  Here's a  if you care to see it in context. It's not really a huge problem (as Bart's comment emphasizes), but this seems like an extreme outlier in every measurable aspect. How to change default viewport shading in 2.8? Is it possible to change the default mesh color/shading in 2.8 to be more like 2.79? I'm finding it hard to see finer detail in 2.8. On the left is 2.8 and the right is 2.79 Why does `last` show '{' and '|' in the TTY field? I am  new to Linux. I am using Ubuntu 11.04 and do not know how to compile and execute C++ program in it. I need to know the commands to Compile and Execute a C++ program in Linux. Emails Per Invocation Still Capped at 100? Long transit in Cairo (Egypt) Putting a piece of code in between two html tags in Solaris Where is the dimensions option? Is Ubuntu compatible with my hardware? I am a bit financially strapped and received a Gateway GT5056 tower. The tower has an AMD dual core 64-bit processor in it. Will Ubuntu 12.04 run on this machine? I will not have any other application other than LibreOffice installed.