I had the following jQuery script on a static HTML page and it worked fine. However, when I enqueue it into WordPress it doesn't work.  Here is the JS file.  $(window).scroll(function()   if ($(".navbar").offset().top &gt; 50) {      $(".navbar-fixed-top").addClass("top-nav-collapse");   } else {      $(".navbar-fixed-top").removeClass("top-nav-collapse");   } )};   And here is the functions.php  function hat_rack_media_scripts() {    //THEME CUSTOM STYLES AND SCRIPTS    wp_enqueue_style( 'hat-rack-media-style', get_stylesheet_uri() );    wp_register_script( 'theme-script', get_template_directory_uri() . '/js/script.js', array('jquery'), '1', true );     if ( is_singular() &amp;&amp; comments_open() &amp;&amp; get_option( 'thread_comments' ) ) {     wp_enqueue_script( 'comment-reply' );     } } add_action( 'wp_enqueue_scripts', 'hat_rack_media_scripts' );   I feel like i included the file correctly, it is mapped to the right location, and it worked just fine in a static html page.  Thanks.
I know that jQuery is loaded, because I can switch out the $ for 'jQuery' and everything behaves as expected, but this will be a messy script if I can't fix this  This script:  jQuery(document).ready(function(){     $("ul.vimeo_desc_feed li a").click(function(){         alert($(this).attr('href'));         return false;     }) });   Produces the error $ is not a function  This script:  jQuery(document).ready(function(){     jQuery("ul.vimeo_desc_feed li a").click(function(){         alert(jQuery(this).attr('href'));         return false;     }) });   works fine.
I live in Hong Kong, and the Play Store displays everything in the local Cantonese language. I have set everything I can (Android language, Account language, even the app locale via Xposed Module "App Settings") to English, but I still see all the categories in the store in Chinese. Can someone help me change those to English?  (Click image to enlarge) 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? Exact relationship between electric field and intensity I often see $I(t)\propto |E(t)|^2$. What is the exact form ? Which constants are missing to make this an equality and why are they so often omitted ? I have one bash source run.sh as follows,  #!/bin/bash if [ $# -ne 1 ]; then     exit fi ...   when I execute it in two ways, there are different behaviors. The first way is,  source run.sh   It will close the terminal after execution. The second way is,  ./run.sh   this will simply finish running the script, and stay on the terminal. I am asking if there is a command for exiting a bash scripts for both source run.sh and ./run.sh execution. I have tried return too, which does not work well under ./run.sh execution.  More generally, I am interested in why this is happening, and what's difference between using "source" and "." for script execution? Often floats may land quite a bit later in the document than the point they are created, sometimes after a section break.  Is there a way to force a new section to start on a new page, after any unplaced floats? I need to purchase my first ever lens. So far I've only used lenses that were built into a camera. This specific lens is for the BlackMagic Deign Pocket Cinema Camera (a video only camera, but one that uses photography lenses). I would prefer this to be a prime lens.  I have tried to find the exact way to calculate the focal length of the lens I need but I have not been able to find a good resource to make this simple enough for my limited optics knowledge. Can you please explain a simple way to calculate the focal length of a lens given the following inputs as an example:    I would prefer a simplified mathematical explanation so that I may use it to make similar determinations in the future using a "" method.  I have . Using that method, I came up with:  Required lens focal length = 7.02mm sensor height x (77in / 36in) = 15mm   Is that correct? ASP.NET Stress Testing Is there a way to test an application where you simulate a hundred different clients connecting to a IIS server and asking the same data? At the customer where our project is running they have 400 computers and they often do stress tests with all computers. I on the other hand have only got my laptop... (and a development server).  (In my case the data is asked through a WebORB Gateway). How do I extract an ISO on Linux without root access Combinatorics That Looks Similar to Vandermonde's Identity One hour Lufthansa transit time in Frankfurt from Bangalore to Dublin I am using the Service Console in Lightning Experience, and using the Chatter Feed component on the Case layout to display updates to the Case.  If I use the "Log a Call" Quick Action from the Chatter publisher, these calls are displayed in the Chatter feed.  This is the desired behaviour.  However, if I insert a Log a Call record related to the Case any other way - e.g. using the Developer Console, or my CTI system's custom components - the call does not display in the feed.  If I query the record, it looks exactly the same as the record that is created with the Quick Action.  It just seems that the Chatter post is never made in this situation.  I have checked my Feed Tracking settings:   Task has Enable Feed Tracking and Subject checked Case has All Related Objects checked   How can I enable calls created with a custom component (part of a CTI system) to display in the case feed? Where does tidal energy come from? Laptop power supplies, does current matter? I have two laptops (same manufacture), with the same type of power connector.  However, the power supplies/transformers are slightly different.    The output on the first laptop's power supply is 15.6&nbsp;V at 8.0&nbsp;A. The output on the second laptop's power supply is 15.6&nbsp;V at 5&nbsp;A.  Clearly the voltages are the same, but the currents are different. I assume the second laptop's power supply can not be used on the first, because it can't supply enough power to the laptop.   However, can the first laptop's power supply be safely used on the second laptop? ... and why ?  Assuming $X_1$,$X_2$ are independent random-variables with mean $\mu_1,\mu_2$ and variance $\sigma^2_1,\sigma^2_2$ respectively. My basic statistics book tells me that the distribution of the $X_1-X_2$ has the following properties:    $E(X_1-X_2)=\mu_1-\mu_2$ $Var(X_1-X_2)=\sigma^2_1 +\sigma^2_2$   Now let's say $X_1$, $X_2$  are t-distributions with $n_1-1$, $n_2-2$ degrees of freedom. What is the distribution of $X_1-X_2$ ?   This question has been edited: The original question was "What are the degrees of freedom of the difference of two t-distributions ?". mpiktas has already pointed out that this makes no sense since $X_1-X_2$ is not t-distributed, no matter how approximately normal $X_1,X_2$ (i.e. high df) may be. How to proof that $\forall n \ge 1: \sum_{i=1}^n (i(i+1))^{-1} = n(n+1)^{-1}$ using mathematical induction So for a better presentation:   I need to prove this using mathematical induction, so i started with a base of $n=1$  Since $i$ starts at $i = 1$ I got this:  $$\frac{1}{i(i+1)} = \frac{n}{n+1}$$ $$\frac{1}{2} = \frac{1}{2}$$  So since this was true I went to the induction part: I chose $n = k$ and assumed this was true:  $$\frac{1}{i(i+1)} = \frac{n}{n+1}$$ $$\frac{1}{i(i+1)} = \frac{k}{k+1}$$  but I got stuck here since I didn't know if I needed to increment $i$ or not and because I didn't know if I needed to add the summation symbol or not and needed to do a few things with it. Remove entire row in a file if first column is repeated Finding singularities of a complex function and the respective residues Consider the function,   $$f(z) = \frac{\sin(\frac{1}{z})}{z^2+a^2} \text{ where } a&gt;0$$  I know that this has two simple poles at $z = \pm ia$ and an essential singularity at $z = 0$ because of $\sin(\frac{1}{z})$ in the numerator. For $\operatorname{Res}(f,ia)$ and $\operatorname{Res}(f,-ia)$, it is relatively easy to find the these values using   $$a_{-1} = \lim_{z\rightarrow z_0} ((z-z_0)f(z))$$  However, I am finding it much more difficult to determine the residue at an essential singularity.  From what I have read, it seems that the easiest way to determine the residue is to explicitly find the Laurent Expansion and then get it from there. Would this be the case for this function as well? Prove that $\int_0^\infty \frac{x\,\log x}{(1+x^2)^2} = 0$ I have been asked to prove that $$\int_0^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx = 0$$  I tried proceeding as follows: \begin{align} \int_0^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx &amp;= \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx + \int_1^\infty \frac{x\,\log x}{(1+x^2)^2}\,dx \\ &amp; = \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx + \int_{u=1}^0 \frac{u\,\log u}{(1+u^2)^2}\,du\quad (\text{where }u=1/x) \\ &amp;= \int_0^1 \frac{x\,\log x}{(1+x^2)^2}\,dx - \int_0^1 \frac{u\,\log u}{(1+u^2)^2}\,du \\ &amp;=^? \int_0^1 0 \,dx \\ &amp;= 0 \end{align}  But I think that I should first show that the improper integral $\int_0^1 {x\,\log x}/{(1+x^2)^2}\,dx$ is convergent.  Do I need to show it? If yes, how to do so?  (I have been taught basic methods such as comparison, limit comparison and Dirichlet test.) Clicking community promotion ad renders an instance of SO within the frame of that ad Today I came across an ad on this question on SO:  (I don't expect it to stay very long).   There was a community promotion ad on the right hand side of the site, I think for one of our English sites. It had a sentence that I only partially remember:     Idiom ... poor or even poorer   I found it interesting, so I clicked that ad. Which caused a new instance of SO to open within the ad space. Unfortunately I failed to take a screenshot. I've been refreshing the page like crazy, but can't get the ad to appear again.  Edit: I managed to get a new community add, for the photography site, and captured a screenshot:   Edit2: This bug still persists, I saw it today with an OOP add from CodeReview, and an area 51 add. Getting a FILE* from a std::fstream Is there a (cross-platform) way to get a C FILE* handle from a C++ std::fstream ?  The reason I ask is because my C++ library accepts fstreams and in one particular function I'd like to use a C library that accepts a FILE*.