I want to store the text users enter into a textarea in a website into a javascript variable in order to compare it to another variable already defined.  How would you do it? Any hints? Thanks in advance!
Recently I have started playing with jQuery, and have been following a couple of tutorials. Now I feel slightly competent with using it (it's pretty easy), and I thought it would be cool if I were able to make a 'console' on my webpage (as in, you press the ` key like you do in  games, etc.), and then have it Ajax itself back to the server in-order to do stuff.  I originally thought the best way would be to just get the text inside the textarea, and then split it, or should I use the keyup event, convert the keycode returned to an ASCII character, append the character to a string and send the string to the server (then empty the string).  I couldn't find any information on getting text from a textarea, all I got was keyup information. Also, how can I convert the keycode returned to an ASCII character?
I tried to follow the new Blender 2.8 tutorial from Blender Guru.   When entering "Sculpting" with the icing there were suddenly alot of holes in it. Why is this? number theory about index Given the congruence $x^3 \equiv a \pmod p$, where $p \geq 5$ is a prime and $\gcd(a,p)=1$, prove the following:   If $p \equiv1 \pmod 6$, then the congruence has either no solutions or three incongruent solutions modulo $p$ If $p \equiv5 \pmod 6$, then the congruence has a unique solution modulo $p$   Help me...  I don't know what I learn because Prof teaches so quickly.  So I need your help to organize my thoughts. Volume generated by revolving the region in the first quadrant bounded by the parabolas $y^2=x$, $y^2=8x$, $x^2=y$, $x^2=8y$ about the $x$-axis. I came across this question from Schaum's Outlines of Advanced Calculus:     Show that the volume generated by revolving the region in the first quadrant bounded by the parabolas $y^2=x$, $y^2=8x$, $x^2=y$, $x^2=8y$ about the $x$-axis is $\dfrac{279\pi}{2}$.   My solution was to divide the region into three parts:    $$\pi\int_{1}^{2}(x^2)^2 - (\sqrt{x})^2\;dx = 4.7\pi$$  $$\pi\int_{4}^{8}(\sqrt{8x})^2 - (\sqrt{x})^2\;dx = 42\pi$$  $$\pi\int_{2}^{4} (x^2)^2 - \left(\frac{1}{8}x^2 \right)^2\;dx = 44.9\pi.$$  Hence the total volume will be  $$\pi(4.7 + 42 + 44.9) = 91.6\pi$$  which is wrong.  Can someone point out my mistake? To tell about a guess about a case in the past, why use "would+have+past participle" instead of "must+have+past participle? I have seen this sentence in an article on bbc, which is about how people lived thousands of years ago. &quot;When this Neolithic home was built, it would have had a cosy roof of turf..&quot; When I read it, I got confused. Because the fact seems as a simple past situation or guessing/assumption about something in the past. it simply gives information about a past event, eg &quot;when I was a child, I had a blue toy car. I have been making a lot of research on whether or not this structure &quot;would+have+past participle&quot; could be used instead of the simple past or &quot;must+have+past participle&quot;, but I could not find any satisfying explanation. Almost all grammer contents cover this structure is used when we imagine the opposite of what actually happened in the past eg. &quot;referring to a missed opportunity&quot; (eg. &quot;if you had come to the party, you would have seen Tom.&quot;), But, in this case of this sentence, &quot;type 3 conditional&quot; is irrelevant. It is not an if sentence,  It simply gives information about how this house was like or was probably like when it was built long ago. Just like it would be If and old lady would want to tell about &quot;how she was like when she was a child years ago. she would simply say &quot;when I was a child, I had long curly hair.**. So &quot;when I was a child, I would have had long curly hair.&quot; would be wrong. So, my question is: 1-Does this structure &quot;would+have+past participle&quot; completely replace simple past sentences? or can be it be used instead of simple past? 2- If this structure was simply used because the author was not %100 sure about the fact as it was a long long time ago -so he wanted to make a guess or assumption, why did he not simply use &quot;must+have+past participle&quot; or &quot;it was likely that blah blah&quot; which must be used for guessing or assumptions about past happenings. Would it not have made more sense if it was like: &quot;When this Neolithic home was built, it must have had a cosy roof of turf. Escaping HTML strings with jQuery Does anyone know of an easy way to escape HTML from strings in ?  I need to be able to pass an arbitrary string and have it properly escaped for display in an HTML page (preventing JavaScript/HTML injection attacks).  I'm sure it's possible to extend jQuery to do this, but I don't know enough about the framework at the moment to accomplish this. I've been looking at  $$\int\limits_0^\infty  {\frac{{{x^n}}}{{1 + {x^m}}}dx }$$  It seems that it always evaluates in terms of $\sin X$ and $\pi$, where $X$ is to be determined. For example:  $$\displaystyle \int\limits_0^\infty  {\frac{{{x^1}}}{{1 + {x^3}}}dx = } \frac{\pi }{3}\frac{1}{{\sin \frac{\pi }{3}}} = \frac{{2\pi }}{{3\sqrt 3 }}$$  $$\int\limits_0^\infty  {\frac{{{x^1}}}{{1 + {x^4}}}dx = } \frac{\pi }{4}$$  $$\int\limits_0^\infty  {\frac{{{x^2}}}{{1 + {x^5}}}dx = } \frac{\pi }{5}\frac{1}{{\sin \frac{{2\pi }}{5}}}$$  So I guess there must be a closed form - the use of $\Gamma(x)\Gamma(1-x)$ first comess to my mind because of the $\dfrac{{\pi x}}{{\sin \pi x}}$ appearing. Note that the arguments are always the ratio of the exponents, like $\dfrac{1}{4}$, $\dfrac{1}{3}$ and $\dfrac{2}{5}$. Is there any way of finding it? I'll work on it and update with any ideas.    UPDATE:  The integral reduces to finding   $$\int\limits_{ - \infty }^\infty  {\frac{{{e^{a t}}}}{{{e^t} + 1}}dt} $$  With $a =\dfrac{n+1}{m}$ which converges only if   $$0 &lt; a &lt; 1$$  Using series I find the solution is     $$\sum\limits_{k =  - \infty }^\infty  {\frac{{{{\left( { - 1} \right)}^k}}}{{a + k}}} $$ Why are useful questions on StackOverflow being closed as non-constructive? Useful threads are being closed as "not constructive:"     This question is not a good fit to our Q&amp;A format. We expect answers to generally involve facts, references, or specific expertise; this question will likely solicit opinion, debate, arguments, polling, or extended discussion. See the .   For example,  was very useful for me since I am new to obfuscation and the question gave me a start. Also that question has lots of votes and bookmarks - these alone are the  markers of usefulness. The question is closed anyway. No idea why.  Same happened to my question, , which received one bookmark immediately.  I was waiting for an answer with the two products downloaded and installed.  I desired that experienced people would share their thoughts and point me to the better one. No. Closed. I.e. I must go to some other forum and ask there or I must search on Google and write down the pros and cons of each myself. I am not asking questions just because I have tons of time and want to chat; I need an answer, that's why I am asking. I am asking because I think that SO has the most professional people to answer and because I didn't find a good answer in Google.  I saw other questions closed which I myself found to be useful and I bookmarked some of the closed questions.  UPDATE  If I want people who have an experience which I do not have with some software products and I want to see which product is better in the terms of usability and reliability, not just better in terms of the price or has a better official website or better described on the official website, how do I ask this question? Or is this a question which I cannot ask on SO? I.e. this sort of information is not available on SO?  Is this one breaking the rules as well:  ? Visualization for Euclidean Algorithm How do I change how executable files are handled by the file manager? When I double click on text files, nautilus asks me what I would like to do with them. I find this to be intrusive, as I just want them to open.  How can I fix this?  Note: This question is a "canonical" question on the subject; edit if needed. Note 2: Text files can be HTML, CSS, TXT, and more. What is recursion and when should I use it? One of the topics that seems to come up regularly on mailing lists and online discussions is the merits (or lack thereof) of doing a Computer Science Degree. An argument that seems to come up time and again for the negative party is that they have been coding for some number of years and they have never used recursion.  So the question is:   What is recursion? When would I use recursion? Why don't people use recursion? While executing an INSERT statement with many rows, I want to skip duplicate entries that would otherwise cause failure. After some research, my options appear to be the use of either:  ON DUPLICATE KEY UPDATE which implies an unnecessary update at some cost, or INSERT IGNORE implies an invitation for other kinds of failure to slip in unannounced.  Am I right in these assumptions? What's the best way to simply skip the rows that might cause duplicates and just continue on to the other rows? How to "flatten" a multi-dimensional array to simple one in PHP? No error message if the URL is very long I entered a URL with a very long parameter on Stack Exchange.  I have type this url    It shows a blank screen , does not shown any messages.    We need to show a “Page Not Found” message, same as what you did on other Stack Exchange pages. Securing Cable when installing old work box I am installing an electrical outlet above a gas fireplace for TV.  I understand that electrical code requires securing the NM cable within 12" of outlet box.  I am curious how one goes about achieving this in a finished wall being that there is really no room to get hand, hammer, drill or screwdriver inside the wall through that box opening.   I am sure this is straightforward for experienced electricians but I have no idea how to go about this. Does a bad grade in one course (with otherwise OK record) affect graduate admissions? I use Lyx 2.1, document class : Report. My problem is that the titles of figures are written on the numbers at List of Figures. Why does Javascript getYear() return 108? Are all n-ary operators simply compositions of binary operators? Take for example $A \times B \cdot C$ = $(A \times B) \cdot C$ where $A, B, C$ are 3-component real vectors.  We can define a 3-nary operator $\times - \cdot$ that is a composition of the two common binary operators $\times$ and $\cdot$.  The same thing happens with most functions (operators) - the way we calculate them is by doing smaller binary problems and adding together.  Every time I try to come up with an $(n &gt; 2)$-ary operator my mind automatically looks for binary operators.  So, the question is, do there exist operators (of some weird kind in some branch of math) that cannot be decomposed into 2-ary and 1-ary operators?  Thanks. I was given the files for a mini linux, that boots directly into firefox. It works for all it should be doing, only that I do not get an internet connection.  We have 3 DNS servers in the network, which all work. I can ping them, too. But when trying to ping google.de or wget google.de I get a bad address error.  nslookup google.de works for some reason.  I tracked the issue down to my resolv.conf on the booted system not having the same contents as the resolv.conf that I put into the .iso file.  I tried understanding all the factors that go into creating and modifying resolv.conf. I'm not quite sure I got it all, but I definitely didn't find my solution there.  So as a last ditch effort, I tried making the resolv.conf file immutable using   :~# chattr +i /etc/resolv.conf   When rebuilding and booting again to my surprise my file was renamed to resolv.conf~ and in its place was the same standard file that has been haunting me.   The file contents make me believe it gets the information from the network itself. When starting the .iso in Virtualbox without internet access, my file is being kept as it is.  I tried changing /etc/dhcp/dhclient.conf to not get the information from the net, by deleting domain-name-server and domain-name-search from the request part of the file.  Didn't work unfortunately.  I don't have the NetworkManager installed. The iso is based on Ubuntu 14.04.  There is probably vital information missing. I'm happy to provide it.  UPDATE:  I think I found the file that clears resolv.conf.  It seems to be /usr/share/udhcpc/default.script  #!/bin/sh  # udhcpc script edited by Tim Riker &lt;Tim@Rikers.org&gt;  [ -z "$1" ] &amp;&amp; echo "Error: should be called from udhcpc" &amp;&amp; exit 1  RESOLV_CONF="/etc/resolv.conf" [ - n "$broadcast" ] &amp;&amp; BROADCAST="broadcast $broadcast" [ -n "$subnet" ] &amp;&amp; NETMASK="netmask $subnet"  case "$1" in     deconfig)         /bin/ifconfig $interface 0.0.0.0         for i in /etc/ipdown.d/*; do             [ -e $i ] &amp;&amp; . $i $interface         done         ;;      renew|bound)         /bin/ifconfig $interface $ip $BROADCAST $NETMASK          if [ -n "$router" ] ; then             echo "deleting routers"             while route del default gw 0.0.0.0 dev $interface ; do                 :             done              metric=0             for i in $router ; do                 route add default gw $i dev $interface metric $((metric++))             done         fi          echo -n &gt; $RESOLV_CONF # Start ----------------           [ -n "$domain" ] &amp;&amp; echo search $domain &gt;&gt; $RESOLV_CONF         for i in $dns ; do             echo adding dns $i             echo nameserver $i &gt;&gt; $RESOLV_CONF         done         for i in /etc/ipup.d/*; do             [ -e $i ] &amp;&amp; . $i $interface $ip $dns          done # End ------------------         ;; esac  exit 0   It's part of the udhcpc program. A tiny dhcp client, that is part of busybox  Will investigate further.    UPDATE2 AND SOLUTION:  I commented the part out (#Start to #End), that seemingly overwrites the /etc/resolv.conf file and sure enough. That was the culprit. So an obscure script caused all this trouble.  I changed the question to reflect, what actually needed to be known to solve my problem, so it would be easier to find for people with the same problem and so I could accept an answer.  Thanks for the help here in figuring things out. I'd like to make commands I've typed (input) into terminal stand out from all the output.   For example:  imac:~ buster$ chmod -R g-w myfolder  imac:~ buster$ cd myfolder imac:myfolder buster$ ls -l total 0 drwxr-xr-x   9 root  admin   306 Apr 20  2010 bin drwxr-xr-x   7 root  admin   238 Apr 20  2010 include drwxr-xr-x  73 root  admin  2482 May 18 17:16 lib drwxr-xr-x   6 root  admin   204 Apr 20  2010 man imac:myfolder buster$ echo Go Giants! Go Giants!  bold jumps to mind but I'd accept a color or even highlighting the whole line...   I'm sure there's a way to do this but it's not obvious to me...  thanks!