There is user input in textarea like "somefoo foo". I want to change foo word color to blue.Code below doesnt work!  &lt;body&gt; &lt;div&gt;&lt;textarea rows="4" cols="50"&gt;somefoo foo&lt;/textarea&gt;&lt;/div&gt; &lt;script&gt; var regx=new RegExp("foo"); var value=' otherfoo'; $("textarea").html( $("textarea").val().replace(regx,value.fontcolor('blue'))); &lt;/script&gt; &lt;/body&gt;
Is it possible to highlight text inside of a textarea using javascript? Either changing the background of just a portion of the text area or making a portion of the text selected?
Run an exe from C# code Can I use a USB stick for a normal install? (to get platform adaptability) So I know I can make a persistent LiveUSB whereby there would be anywhere up to 4GB (I think that's the max) of persistent storage for downloads, etc.  I am asking the opposite, in a sense. I'd like to configure a USB install to have the platform adaptability that a Live OS offers while fully utilizing the 120GB of space I have.  In essence I'm hoping to have a boot up install that reconfigures most/all the hardware/drivers as necessary every boot as I'd like to be able to boot off of it on nearly any machine. (Within reason - they will all be 64-bit)  The biggest gripe with doing multi-platform booting is the video driver stuff. Sometimes the system I'm booting off of is AMD, sometimes Nvidia, sometimes Intel.  Alternatively, a usable answer may be a way to better configure the LiveUSB setup for more storage utilization and customization. Add an API key to QGIS for QOSM layer Is there a simple way of proving that $\text{GL}_n(R) \not\cong \text{GL}_m(R)$? Letting $\mathbb{F}_{1}$ and $\mathbb{F}_{2}$ be fields, and letting $n \geq 3$ and $m$ be natural numbers, it is known that $\text{GL}_{m}(\mathbb{F}_{1})$ and $\text{GL}_{n}(\mathbb{F}_{2})$ are elementarily equivalent if and only if $m=n$ and $\mathbb{F}_{1} \equiv \mathbb{F}_{2}$ (as proven in "Elementary Properties of Linear Groups" in the collection "The Metamathematics of Algebraic Systems — Collected Papers: 1936–1967").  So, given a field $\mathbb{F}$, if $n \neq m$, then $\text{GL}_{m}(\mathbb{F}) \not\equiv \text{GL}_{n}(\mathbb{F})$, and thus $\text{GL}_{m}(\mathbb{F}) \not\cong \text{GL}_{n}(\mathbb{F})$.  Letting $R$ be a commutative ring (with unity), and letting $n, m \in \mathbb{N}$ be such that $n \neq m$, is there a simple "algebraic" way of proving that $\text{GL}_{m}(R)$ and $\text{GL}_{n}(R)$ are not isomorphic (as groups)? Is there a simple group-theoretic way of showing that $\text{GL}_{m}(\mathbb{F}) \not\cong \text{GL}_{n}(\mathbb{F})$ for a field $\mathbb{F}$?  Certain special cases of this problem trivially hold, for example in the case whereby $\mathbb{F}$ is finite, in which case $|\text{GL}_{m}(\mathbb{F})| \neq |\text{GL}_{n}(\mathbb{F})|$. How can I test within a document, whether or not the initial  \documentclass[a4paper,11pt,twoside,fleqn,draft]{report}   includes the "draft" option? My naive attempt  \newif\ifmydraft \mydraftfalse \DeclareOption{draft}{\mydrafttrue}   does not work, and breaks a later \usepackage command. I need to reset my password. I have followed these steps:    However, then I go to "root" or "netroot" recovery options, it tells me:  Give root password for maintenance (or type Control-D to continue)   Clearly, I do not know the root password. If I type CTRL+D, I return to the list of options. From  I read:  Under chapter 'The Other Way':  4. Highlight the line that begins kernel and press 'e' to edit`   But in the grub configuration file I have no line that starts with kernel. Only:  setparams 'Ubuntu...' recordfail set gxfpayload... insmod part_msdos insmod ext2 set root=... search --no-floppy... linux /boot/vmlinuz-2.6.38... initrd /boot/initrd.img-2.6....   Those are all lines in my GRUB. Which line should I edit? Or is there another way to reset my password? Iterating each character in a string using Python In C++, I can iterate over an std::string like this:  std::string str = "Hello World!";  for (int i = 0; i &lt; str.length(); ++i) {     std::cout &lt;&lt; str[i] &lt;&lt; std::endl; }   How do I iterate over a string in Python? How do I cd into a directory in the home folder? How to create a generic array in Java? Prove the definitions of $e$ to be equivalent How to prove that the following definitions of $e^x$ are equivalent, with as simple tools as possible and without any knowledge of $e$ or logarithms ?  $$\sum_{n=0}^{\infty} \frac{x^n}{n!}=\lim_{n\to\infty}\left(1+\frac{x}{n}\right)^n$$  Also preferably, prove that this is $a^x$ for some real number $a&gt;0$. Lowest voltage drop diode possible I am harvesting energy from an NFC device using a tuned antenna on my PCB. Though this method I am able to generate about 3.05V. I would like to charge a super capacitor using the power harvested from the NFC device. To do this I have  used the simple diode circuit provided  (and shown in Figure 1 below).  The problem I am facing is my circuit requires a minimum of 3V to operate within operating conditions, however with the added drop by typical diodes I believe there with be various situations where the generated voltage will drop below the required 3V. Are there any Diodes available which have ultra low voltage drops of less then 0.01V? and is that even possible?  Please note:   my system load will be &lt; 5mA  The 3.05V generated was without a diode in the circuit Raster generalization - buffers in rasters, expand pixels? Is it possible to create buffers for pixels of raster files? Actually I need to expand the pixels classified as 1 (in white in the figure) with a spatial range of 1 or 2 pixels, in order to perform some generalization.  I'm using QGIS, is this possible with gdal or something? diagram software for Ubuntu? Command to run an application with Administrator privileges, but NOT AS administrator (prompt with UAC) Query for list of attribute instead of tuples in SQLAlchemy How can I convince hyperref and xindy to play together nicely? Changing sides in tennis This  says:      A player has to win six games, and at least two more than the foe, to claim a tennis match. Players switch sides after every odd game, as in the first, third and fifth games, and so on. Players also switch sides at the end of a set if they're playing an odd number of games.   So, you start, 1-0, and change sides. If the game ends 6-0, 6-2 or 6-4 (or an even number of games), you play the first game of the new set, change sides, and you are back to the previous rule.  But what if a player wins 6-1 or 6-3? You win the set, then change sides. Now, you play a new set, do you change again at 1-0 (therefore after having played just one game), or wait until the 1-1 or 2-0, therefore now changing after an even number of games in the second set? Why is Excel truncating my 16-digit numbers? If I type in a 16 digit number (format: number, no decimals) it changes the number on me. Example: 1234567812345678 changes the view to 1234567812345670.    If I type it in as a general format it changes the numbers above so it displays 1.23457E+15 but if you click on the cell, the display shows the last digit as a 0 instead of an 8 once again.   I opened the file on a different computer and same issue now with it.  I have changed the auto correction and auto formatting all to no avail.  Help! is $y = \sqrt{x^2 + 1}− x$ a injective (one-to-one) function? I have a function  $y = \sqrt{x^2 + 1}− x$ and I need to prove if it's a Injective function (one-to-one).  The function f is injective if and only if for all a and b in A, if f(a) = f(b), then a = b  $\sqrt{a^2 + 1} − a = \sqrt{b^2 + 1} − b$  $\sqrt{a^2 + 1} + b = \sqrt{b^2 + 1} + a$  $(\sqrt{a^2 + 1} + b)^2 = (\sqrt{b^2 + 1} + a)^2$  $a^2 + 1 + b^2 + 2b\sqrt{a^2 + 1} = b^2 + 1 + a^2 + 2a\sqrt{b^2 + 1}$  $2b\sqrt{a^2 + 1} = 2a\sqrt{b^2 + 1}$  $b\sqrt{a^2 + 1} = a\sqrt{b^2 + 1}$  $(b\sqrt{a^2 + 1})^2 = (a\sqrt{b^2 + 1})^2$  $b^2(a^2 + 1) = a^2(b^2 + 1)$  $b^2a^2 + b^2 = a^2b^2 + a^2$  $b^2 = a^2$  $\sqrt{b^2} = \sqrt{a^2}$  $b = \pm a$  then the function is not injective because $b$ in not equal to $a$, but using online  the function is injective. Prove that $\sum_{k=1}^{n}k\binom{n}{k}=n\cdot2^{n-1}$ I want to prove the following: $$\sum_{k=1}^{n}k\binom{n}{k}=n\cdot2^{n-1}$$ what I did is(use binominal): $$\binom{n}{k}X^k\cdot 1^{n-k} = (X+1)^n$$ $$k\binom{n}{k}X^k\cdot 1^{n-k} = k(X+1)^k-1$$ now I replace $k$ by $n$ and insert $X=1$ , I will get now $n\cdot2^{n-1}$ what you are suggesting? there is another way to do that? thanks!