I have created a custom theme in Drupal. When the code runs on the server jQuery is not being added to the page so I am getting errors such as:  'jQuery' is undefined   I thought jQuery was updated to the page automatically? How can I go about seeing why jQUery has not been added?  Update The code works on my local machine but not the test server.  The two missing files are:    &lt;script type="text/javascript" src="http://localhost:2013/misc/jquery.js?v=1.4.4"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="http://localhost:2013/misc/jquery.once.js?v=1.2"&gt;&lt;/script&gt;   When I pull the code from the server and restore locally I get the same problem. If I run drush cc all then it starts working again and the script reference appears.  The header section of my 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;
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;
What do you call an 'unselfish' action made with a selfish reason? There are many examples of this, and I'd like to give a few:   A person who puts a lot of effort to help the community and earns reputation points. But that reputation is the motivation behind helping the community, not because they really want to. A student approaches a professor, and helps them in their teaching and doing research in order to have a good LOR (letter of recommendation). To a SEO, the content of the website must be good (well, this one is a little tricky, but you get the spirit.)   I'm not saying that the reputation/LOR/high-ranked is not deserved. It is. I just want to focus more on the selfish reason(s) behind that.  Any kind of answer can be accepted: single word, phrase, proverb or idiom. How to add a directory to the PATH? How do I add a directory to the $PATH in Ubuntu and make the changes permanent? Obtaining remote host name in bash script Sorry my knowledge of Linux bash commands is pretty basic, I've been searching for a while but I'm not 100% sure what I need to search for.  I was wondering if there's a way to grab the current logged in users remote host name in a Linux bash script? I have a script in which I need to log each time a user runs it. I'm obtaining the date like so:  cdat=`/bin/date +%a' '%d' '%h' '%Y', '%H':'%M`;   I now need to add the users remote host (not the username they logged in with). I'm not 100% sure I'm using the right terminology here either, just to clarify; by 'remote host name' I mean the same output that prints on the screen on most servers I've logged into over ssh, for example:  Last login: Mon Jul 22 16:35:09 2013 from win7-i7-stuart.my.domain.com   I'm looking for the win7-i7-stuart.my.domain.com bit. How can I detect if my apple device supports Bluetooth Low Energy How to run a cron job using the sudo command Is it possible to run a  job which needs the  command?  Like:   sudo rm somefile There have been a few questions regarding installing this package in the past, but they now seem to be out of date. I'm using MiKTeX 2.9 and TexMaker. When I try \usepackage{mathtools} in TexMaker it will try to install the package for me but will fail. I took the advice given in this thread:   As suggested I tried installing the mh package using the MiKTeX Package Manager, unfortunately I get the "unknown archive size" error, which I have read means that the package no longer exists. Another thread (lost the link) said you can use the MiKTeX Package Manager to directly install mathtools, however I do not see mathtools listed anywhere in the MiKTeX Package Manager...   So I ask, is the package under a different name? Are there any other ways to install this package? What does high credit utilization really mean? How to escape text for regular expression in Java Does Java have a built-in way to escape arbitrary text so that it can be included in a regular expression? For example, if my users enter "$5", I'd like to match that exactly rather than a "5" after the end of input. Arrows linking table cells I'm currently trying to add arrows in my synthetic division example to show people clearly how synthetic division works. I'm working on Overleaf.   The code for my synthetic division right now is:  \begin{tabular}{c |r r r r r}     &amp;1&amp; 4 &amp; -1&amp;16&amp;-20\\   1&amp;&amp; 1 &amp; 5 &amp; 4&amp;20\\   \hline    &amp;1 &amp;5 &amp; 4 &amp; 20 &amp;\rule{3pt}{16pt}\;0\\   \end{tabular}   How would I add arrows to this? For instance, a down arrow going from the first 1 to 1, then an upwards arrow pointing right from 1 to 1, then an arrow pointing down from 1 to 5, etc. Basically I would like to add arrows that look like this: I would like to be able to render several files one after the other, when I am not using my computer, e.g. at night. Is there a way of doing this? Finding $\tan t$ if $t=\sum\tan^{-1}(1/2t^2)$ I am solving this problem. If $$\sum\limits_{i=1}^{\infty} \tan^{-1}\biggl(\frac{1}{2i^{2}}\biggr)= t$$ then find the value of $\tan{t}$.   My solution is like the following: I can rewrite: \begin{align*} \tan^{-1}\biggl(\frac{1}{2i^{2}}\biggr) &amp; = \tan^{-1}\biggl[\frac{(2i+1) - (2i-1)}{1+(2i+1)\cdot (2i-1)}\biggr] \\\ &amp;= \tan^{-1}(2i+1) - \tan^{-1}(2i-1) \end{align*}  and when I take the summation the only term which remains is $-\tan^{-1}(1)$, from which I get the value of $\tan{t}$ as $-1$. But the answer appears to be $1$. Can anyone help me on this. I just installed Dufour on my Windows 7 Lenovo ThinkCentre desktop. When I open 2.0.1 I get this error window:    And when I try to add the 'Add Delimited Text Layer' plugin I get this message:    When I click 'OK' the program closes.   Any help is greatly appreciated - thanks. Prove $\operatorname{rank}A^TA=\operatorname{rank}A$ for any $A\in M_{m \times n}$ I notice that modern C and C++ code seems to use size_t instead of int/unsigned int pretty much everywhere - from parameters for C string functions to the STL.  I am curious as to the reason for this and the benefits it brings. Converting a drupal/drupal site to Work With Composer Pretty sure that my edit was correct but it was rejected? How closely can we estimate $\sum_{i=0}^n \sqrt{i}$ By looking at an integral and bounding the error? Can open sets and closed sets of $\mathbb{R}^n$ be homeomorphic? Suppose $A$ is an open subset of $\mathbb{R}^n$ considered as a topological subspace. Suppose $B$ is a another susbet of $\mathbb{R}^n$, and under the induced topology, is homeomorphic to $A$.  If $B$ is closed and bounded, then by the Heine-Borel theorem, $B$ is compact as a topological space so $A$ and $B$ cannot be homeomorhpic, because $A$ is not compact. But if $B$ is not bounded, what can be said about $B$, if any? Must $B$ be open, can it ever be closed (let's leave out the only case of being both open and closed--the entire ambient space $\mathbb{R}^n$), or can it be neither open nor closed? How do you keep parents of floated elements from collapsing? Although elements like &lt;div&gt;s normally grow to fit their contents, using the float property can cause a startling problem for CSS newbies: If floated elements have non-floated parent elements, the parent will collapse. For example:   &lt;div&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    The parent div in this example will not expand to contain its floated children - it will appear to have height: 0. How do you solve this problem? I would like to create an exhaustive list of solutions here. If you're aware of cross-browser compatibility issues, please point them out. Solution 1 Float the parent.   &lt;div style="float: left;"&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    Pros: Semantic code. Cons: You may not always want the parent floated. Even if you do, do you float the parents' parent, and so on? Must you float every ancestor element? Solution 2 Give the parent an explicit height.   &lt;div style="height: 300px;"&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    Pros: Semantic code. Cons: Not flexible - if the content changes or the browser is resized, the layout will break. Solution 3 Append a &quot;spacer&quot; element inside the parent element, like this:   &lt;div&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt;   &lt;div class="spacer" style="clear: both;"&gt;&lt;/div&gt; &lt;/div&gt;    Pros: Straightforward to code. Cons: Not semantic; the spacer div exists only as a layout hack. Solution 4 Set parent to overflow: auto.   &lt;div style="overflow: auto;"&gt;   &lt;div style="float: left;"&gt;Div 1&lt;/div&gt;   &lt;div style="float: left;"&gt;Div 2&lt;/div&gt; &lt;/div&gt;    Pros: Doesn't require extra div. Cons: Seems like a hack - that's not the overflow property's stated purpose. Comments? Other suggestions? How to view/erase images from both CF and SD cards on Canon EOS 5D mk3? I've been trying to setup my Canon EOS 5D mk3 to shoot in "backup mode". I have two cards:    32GB CF  8GB SD   I've set it like the following:  SET UP1 menu ------------ Record func.:       Rec. separately Playback:           1 [CF]  SHOOT1 menu ------------ Image type/size CF: RAW 22M Image type/size SD: JPEG 9,8M   It works ok, except I have one problem. Since I have only these two cards, on some large shoots I need to erase some in order to free some space to make the card last till the end of shoot.  When viewing images and deleting the ones I want to delete, it seems that I can only see the contents of the CF card, and when I delete an image I delete only the RAW file saved on the CF.  Is there a way to delete the JPEG from the SD card along with it's RAW "parent" on the CF card?