i am not sure the best way to go about this. here is the problem. i have a menu (list items) that has an irregular pattern of display. i cant alter the html directly as it is being spit out of a cms. i would like it so that if a word in an array matches a word in the link then that word has a span wrapped around it. this is that code simplified:  &lt;li class="item1"&gt;&lt;a href="gosomewhere.html"&gt;About My Store&lt;/a&gt;&lt;/li&gt; &lt;li class="item2"&gt;&lt;a href="gosomewhereelse.html"&gt;Find Locations&lt;/a&gt;&lt;/li&gt;   result i want is this:  &lt;li class="item1"&gt;&lt;a href="gosomewhere.html"&gt;&lt;span class="bigwords"&gt;About My &lt;/span&gt;Store&lt;/a&gt;&lt;/li&gt; &lt;li class="item2"&gt;&lt;a href="gosomewhere.html"&gt;Find &lt;span class="bigwords"&gt;Locations&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;   i can find the first word(s) doing this:        $(function() {     $.fn.wrapStart = function (numWords) {     var node = this.contents().filter(function () { return this.nodeType == 3 }).first(),         text = node.text(),         first = text.split(" ", numWords).join(" ");      if (!node.length)         return;      node[0].nodeValue = text.slice(first.length);     node.before('&lt;span class="bigwords"&gt;' + first + '&lt;/span&gt;'); };   $("li.item1 a").wrapStart(1);   however, what i would like to do is look through an array list and wrap those specific words that i want  in whatever position they occur.  the array would be like about, store, faq...  the script would look for those words and wrap them...  not really sure how to go about this. if its easier. since the big words only occur either at the beginning or the end but not in middle... i could have another function that looks for the last word(s).  there are only 5 menu  items (wont change) and the words will never change, which is why i thought of just using an array...  here is the output i get of the plugin use:  &lt;ul class="menu&gt;&lt;li class="item-102 parent"&gt; &lt;a class="about" title="About my store" href="#"&gt; &lt;span class="bigwords"&gt; &lt;a xmlns="http://www.w3.org/1999/xhtml"&gt;About&lt;/a&gt; &lt;/span&gt; &lt;a xmlns="http://www.w3.org/1999/xhtml"&gt; my store&lt;/a&gt; &lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;
I basically need to highlight a particular word in a block of text. For example, pretend I wanted to highlight the word &quot;dolor&quot; in this text: &lt;p&gt;     Lorem ipsum dolor sit amet, consectetuer adipiscing elit. &lt;/p&gt; &lt;p&gt;     Quisque bibendum sem ut lacus. Integer dolor ullamcorper libero.     Aliquam rhoncus eros at augue. Suspendisse vitae mauris. &lt;/p&gt;  How do I convert the above to something like this: &lt;p&gt;     Lorem ipsum &lt;span class=&quot;myClass&quot;&gt;dolor&lt;/span&gt; sit amet, consectetuer adipiscing elit. &lt;/p&gt; &lt;p&gt;     Quisque bibendum sem ut lacus. Integer &lt;span class=&quot;myClass&quot;&gt;dolor&lt;/span&gt; ullamcorper     libero. Aliquam rhoncus eros at augue. Suspendisse vitae mauris. &lt;/p&gt;  Is this possible with jQuery? Edit: As  , this is quite possible without jQuery - but I was hoping there might be a special method of jQuery which would let you do selectors on the text itself. I'm already using jQuery heavily on this site, so keeping everything wrapped up in jQuery would make things perhaps a bit more tidy.
I'm studying for qualifying exams and ran into this problem.  Show that if $\{a_n\}$ is a nonincreasing sequence of positive real numbers such that $\sum_n a_n$ converges, then $\lim_{n \rightarrow \infty} n a_n = 0$.  Using the definition of the limit, this is equivalent to showing \begin{equation} \forall \varepsilon &gt; 0 \; \exists n_0 \text{ such that } |n a_n| &lt; \varepsilon \; \forall n &gt; n_0 \end{equation} or \begin{equation} \forall \varepsilon &gt; 0 \; \exists n_0 \text{ such that } a_n &lt; \frac{\varepsilon}{n} \; \forall n &gt; n_0 \end{equation} Basically, the terms must be bounded by the harmonic series. Thanks, I'm really stuck on this seemingly simple problem! Reduce Spacing In $$ In math, one often needs to put a letter inside the symbols &lt;&gt;, e.g. to denote a cyclic group &lt;x&gt; generated by some element x. However, plain text displays the symbols &lt; and &gt; as an upside down exclamation point and an upside down question mark, respectively, while math type displays a large space like so:  &lt; x &gt;    Is there some way to reduce this spacing? Proof that every finite dimensional normed vector space is complete Can you read my proof and tell me if it's correct? Thanks.  Let $V$ be a vector space over a complete topological field say $\mathbb R$ (or $\mathbb C$) with $\dim(V) = n$, base $e_i$ and norm $\|\cdot\|$. Let $v_k$ be a Cauchy sequence w.r.t. $\|\cdot\|$. Since any two norms on a finite dimensional space are equivalent, $\|\cdot\|$ is equivalent to the $l^1$-norm $\|\cdot\|_1$ which means that for some constant $C$, $\varepsilon &gt; 0$, $k,j$ large enough, $$ \varepsilon &gt; \|v_j - v_k\| \geq C \|v_j - v_k\|_1 e_i= C \sum_{i=1}^n |v_{ji} - v_{ki}| \geq |v_{ji} - v_{ki}|$$ for each $1 \leq i \leq n$. Hence $v_{ki}$ is a Cauchy sequence in $\mathbb R$ (or $\mathbb C$) for each $i$. $\mathbb R$ (or $\mathbb C$) is complete hence $v_i = \lim_{k \to \infty} v_{ki} $ is in $\mathbb R$ (or $\Bbb C$) for each $i$. Let $v = (v_1, \dots , v_n) = \sum_i v_i e_i$. Then $v$ is in $V$ and $\|v_k - v\| \to 0$:  Let $\varepsilon &gt; 0$. Then $$ \|v_k - v\| \leq C \|v_k - v\|_1 = C \sum_{i=1}^n |v_{ki} - v_i| \leq C^{'}n \varepsilon$$  for $k$ large enough. What level is a spell if you cast it without expending a spell slot? Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile? Note: This was posted when I was starting out C#. With 2014 knowledge, I can truly say that auto-properties are among the best things that ever happened to the C# language.  I am used to create my properties in C# using a private and a public field:  private string title; public string Title {     get { return title;  }     set { title = value;  } }   Now, with  3.0, we got auto-properties:  public string Title { get; set; }   I know this is more a philosophical/subjective questions, but is there any reason to use these auto-properties except from saving five lines of code for each field? My personal gripe is that those properties are hiding stuff from me, and I am not a big fan of black magic.  In fact, the hidden private field does not even show up in the debugger, which is OK given the fact that the get/set functions do nothing. But when I want to actually implement some getter/setter logic, I have to use the private/public pair anyway.  I see the benefit that I save a lot of code (one vs six lines) without losing the ability to change the getter/setter logic later, but then again I can already do that by simply declaring a public field "Public string Title" without the need of the { get; set; } block, thus even saving more code.  So, what am I missing here? Why would anyone actually want to use auto-properties? How can I render an edge only mesh as solid lines? I have a schematic of a raspberry pi that is completely flat, no solid faces, just connected vertices.  Is it possible to render these lines somehow, so that it looks like a 2D drawing?  Maybe with freestyle? Is it time for Stack Exchange, Inc and the community to legally separate amicably? There's no need to  the  that have led to a lack of trust between  of  and . Suffice it to say that astoundingly they continue to assert that  and, instead of apologizing and reinstating Monica have demanded that she go through a process with no transparency, due process, or involvement from the community.   Has the time has come for Stack Exchange, Inc to spin off the community and all the data needed to keep the sites running to a separate non-profit, who would then in turn license the software from the company?  What's in it for the community?   The community can practice self determination for issues from as basic as the number of moderators they have to as fundamental as the policies they enforce. If the company development continues to be unresponsive to the community's needs, the community would be able to develop its own open source software that would meet its needs. They can find their own funding model instead of having ads imposed on them.   What's in it for the company?   Community actions will no longer reflect on the company. Interaction with the community as a customer may come more naturally to current leadership than the present paradigm. They don't have to worry about paying for the community's operating expenses. They can focus on doing one thing well. Proof for maximal ideals in $\mathbb{Z}[x]$ I have been trying to prove the following theorem:      Every maximal ideal in $\mathbb{Z}[x]$ has the form $(p, f(x))$ where $p$ is prime integer and $f$ is primitive integer polynomial that is irreducible modulo $p$.    Idea: I tried to establish a homomorphism $\phi: \mathbb{Z}[x] \rightarrow \mathbb{F}$. Since $\mathbb{F}$ is a field it has characteristic $p$ and so integer prime p are mapped to 0 in $\mathbb{F}$. Hence $p\in \ker \phi$. Next we consider $\phi': \mathbb{Z}[x] \rightarrow \mathbb{Z_p}[x]$ and pick an arbitrary maximal ideal $M\in \mathbb{Z}[x]$. So, $\phi'(M)$ is maximal as long as $p \in M$ by correspondence. But now I am stuck at this stage and do not know how to proceed. I guess we might have to use primitivity given in problem but dont know how. Cannot remove a repository that complains it has no public key How much money do I need to show as proof of support when applying for a UK Standard Visitor visa? Did other meta-humans enter a coma? In the first episode of The Flash (2014), Barry's struck by lightning, some chemicals fall on him, and he enters a coma for 9 months.  This happens when the S.T.A.R. Labs particle accelerator is turned on for the first time.  9 months later, he wakes up and has powers.  He then starts fighting crime, especially other meta-humans who were created by the same particle accelerator accident.  However, this is all 9 months after the accident, where were the other meta-humans during those 9 months?  The S.T.A.R. Labs people make it sound like they hadn't seen any meta-humans active during the 9 months Barry was out.  Did all people granted powers by the particle accelerator accident also fall into comas?  Why weren't they active heroes/villains during the 9 month gap? My Android device screen got broken and I can't see what I'm doing. That's the only wrong thing with my device, the rest is apparently working OK. Is there any way to send my device screen to my computer? I don't want to work blindly anymore! Can not unlock my Android device as have no internet connection? I have an Android device which is running Android 4.0.3 (or something like that).  My little brother decided to try and guess my lock screen pattern the other day, and ended up locking me out.   I have since been unable to log back in to the tablet using my Google Account details. I provided the correct login details, however it says they are incorrect. Could this be connected to the fact I have no internet connection?  I have no internet connection as the device is WiFi only, and the WiFi is currently turned off. I cannot turn it on, as I am locked out.  How can I log back into my tablet without wiping the user data? How do I grant sudo privileges to an existing user? I want to grant a newly created user sudo privileges in Ubuntu.  I tried  sudo adduser hduser admin   but it says no admin group exists. How can I do it? Remember window locations when docked and undocked I find this beyond frustrating.  I have two extra screens on my laptop at work. I take my laptop and go home, with no extra screens connected. I come back, dock the laptop, and the windows need to be rearranged again.  Is there a way to get windows (or a utility) to keep track of the overall screen configuration (#, size, resolution), and remember where windows were placed, so when the screen configuration matches again, it puts applications BACK where they were? Is the tabu package obsolete? What is the relationship between the focal length and field of view for an equal-area ("equisolid") projection fisheye lens?  Alternatively, what is the relationship between the 180-degree image circle size and the focal length for such a lens?  Ultimately I want to find the field of view of a Tokina 10-17 mm fisheye zoom at focal lengths other than 10 mm on APS-C (). Why is the edit button disabled? I edited some questions before, but now I get an error message when clicking the edit button. I thought there was a problem with the specific question, but I cannot click it on any question.  What's going on? InDesign: How do I automatically align the bottoms of different columns of text boxes to the same height as the one with the most text? In InDesign, I have some filled text boxes, sized by columns, with the one on the left being three columns wide.   The wide text box is most likely to contain the most text (it's an invoice template).  I will use the 'Fit frame to content' button on the Selection Tool toolbar for automatically vertically resize it to fit the containing text.  How do I make the other three smaller text frames automatically adjust to the same height as the big (and longer) text box?