I can't find simple and easy solution how to detect change in my textfield. I dont want to use (keypress) because the user will sometimes paste values into the field. (onchange) for example is working only when user will blur field. And I want to detect change immediately.  What is the easiest angular js $watch equivalent?
In my experience, input type="text" onchange event usually occurs only after you leave (blur) the control.  Is there a way to force browser to trigger onchange every time textfield content changes? If not, what is the most elegant way to track this “manually”?  Using onkey* events is not reliable, since you can right-click the field and choose Paste, and this will change the field without any keyboard input.  Is setTimeout the only way?.. Ugly :-)
pdflatex bash script to supress all output except error messages? I have a bash script which I use to compile a file with pdflatex twice (to make sure it sorts out references properly, etc.). This is the 'latexbuild' script I use:  module load ctan pdflatex --shell-escape --interaction=nonstopmode $1 bibtex $1 pdflatex --shell-escape --interaction=nonstopmode --interaction=batchmode $1   I would then call this script with latexbuild test.tex. It produces a lot of output which I would like to supress, except for the error messages which I'd like to see. Is there any way to only allow error messages to be displayed? Auto mount a disk drive in ubuntu 14.04 LTS (Bookmark directory not found) Story [novel, novella?] that featured faster-than-light or hyperdrive gained from observing distant drive use, also had a sentient star I have little recollection when I read this, but it started with people observing indications of some special engine use many lightyears away, and it led them to 'reverse-engineer' the traces to create their own drive.  Had the usual tropes of international crew-selection for first-voyage.  Somewhere in the travel, they encounter a sentient star or quasar.  When they get back hundreds/thousands of years later, they arrive to an uncaring Earth that no longer pursues space-travel. Are Harry Potter and Ginny Weasley Distant Relatives? Why have header files and .cpp files? Indent math blocks? I want all math blocks \begin{math} in my document to be intended automatically, like it's the case with \begin{itemize}.   Can anyone please give me a hint on how to do this? Thanks :-) TeXLive Pretest 2018: beamer and subfig collide \documentclass{beamer}  \usepackage{subfig}  \begin{document}  test  \end{document}   returns undefined control sequence \@@magyar@captionfix  (It was not so in January; I am on fully updated pretest) Install CentOS 7 on HP dl120 gen9 server with b140i raid controller I'm trying to install CentOS 7 on a HP DL120 gen 9 server with a b140i controller. I have 4 1TB HDD setup in a raid 1+0 and the CentOS installer doesn't seem to recognize the logical drive created from the storage utility.  From my understanding i need some drivers for CentOS 7 to recognize the B140i controller. Also, the driver seems to be closed source by HP.  What is my approach here? Is there any other free linux OS that i can use on this server and that would recognize the raid controller?  Thank you. Android Seekbar with two thumbs Recently, I have answered a few questions that were upvoted by factors more than the accepted answer, but not accepted. , at the time of my writing, has an accepted answer that the asker said was not what he wanted. I don't know why. In the future, when people view this, people might only look at the accepted answer and move on. Would it be possible to have a "community accepted" feature? Maybe only the people at the top can vote to accept it or something. How much rep, if any, should go to that person? How do I evaluate this integral $\int_0^\pi{\frac{{{x^2}}}{{\sqrt 5-2\cos x}}}\operatorname d\!x$? Show that $$\int\limits_0^\pi{\frac{{{x^2}}}{{\sqrt 5-2\cos x}}}\operatorname d\!x =\frac{{{\pi^3}}}{{15}}+2\pi \ln^2 \left({\frac{{1+\sqrt 5 }}{2}}\right).$$   I don't have any idea how to start, but . Modern textbook on statistical field theory with an emphasis on applications to non-equilibrium phenomena? Getting Acquaintances to become Friends I've been learning about Galois theory recently on my own, and I've been trying to solve tests from my university. Even though I understand all the theorems, I  seem to be having some trouble with the technical stuff. A specific example would be how to find the Galois group of a given polynomial. I know some tricks, and I manage to solve some of those questions, but some not.  For example, one of the tests asks to find the Galois group of $x^{4}-4x+2$.  I can see that it is irreducible over $\mathbb Q$ (Eisenstein), but I have no clue as to how to find its Galois group over $\mathbb Q$. Can someone tell me how to do this? General techniques concerning this sort of problems are also welcome :).  Thanks! So, I'm working with OpenGL (I'm not exactly sure of the version), and I want to do an old-style lighting setup by essentially drawing a black rectangle over the screen, and drawing white circles over the areas that should be lit. I already have the rectangle and the circles, but I can't figure out how to make it so that the white circles are transparent when applied to the black areas. Any ideas? I tried to use blending modes, but it still evades me...  EDIT: Here's the code that I'm using (Python).  view_buf = Buffer(GL_INT, 4) glGetIntegerv(GL_VIEWPORT, view_buf) view = view_buf.to_list() if hasattr(view_buf, "to_list") else view_buf.list  glDisable(GL_DEPTH_TEST)  glDisable(GL_LIGHTING)  glEnable(GL_BLEND)  if logic.lights['smooth']:     glEnable(GL_LINE_SMOOTH)  # # Make sure we're using smooth shading instead of flat # glShadeModel(GL_SMOOTH)  # Setup the matrices  glMatrixMode(GL_PROJECTION) glPushMatrix() glLoadIdentity() gluOrtho2D(0, view[2], 0, view[3]) glMatrixMode(GL_MODELVIEW) glPushMatrix() glLoadIdentity()  #glAlphaFunc(GL_GREATER, 0.5)  glColor4f(0.0, 0, 0, 0.75)  glBegin(GL_QUADS);                              # Draw Black screen glVertex2d(0.0, 0.0); glVertex2d(view[2], 0.0); glVertex2d(view[2], view[3]); glVertex2d(0.0, view[3]); glEnd()  glColor4f(1, 1, 1, 1)  degtorad = 3.14159/180.0   glBlendFunc(GL_ZERO, GL_SRC_ALPHA)  def DrawCircle(x, y, radius, fill = 1, step = 11):      glVertex2f(x, y)      if fill:         glBegin(GL_TRIANGLE_FAN)     else:         glBegin(GL_LINE_LOOP)      for a in range(0, 360, step):         angle = degtorad * a         glVertex2f(x + (sin(angle) * radius), y + (cos(angle) * radius))      glEnd()   #for layer in range(len(logic.lights['layers'])): #   size =  for light in logic.lights['points']:     DrawCircle(light[0][0] * view[2], (1 - light[0][1]) * view[3], light[1], step = light[2])     if logic.lights['smooth']:         DrawCircle(light[0][0] * view[2], (1 - light[0][1]) * view[3], light[1], 0, light[2])  # Reset the state glPopMatrix() glMatrixMode(GL_PROJECTION) glPopMatrix() Prove the inequality and limitation Suppose $\{a_k\}$ ,$\{b_k\}$ and $\{\xi_k\}$ are non negative, and for all $k\ge 0$ , we have $$a_{k+1}^2\le(a_k+b_k)^2-\xi_k^2$$   Prove   1.$$\sum_{i=1}^{k}\xi_i^2\le(a_1+\sum_{i=0}^kb_i)^2$$   2. If $\{b_k\}$ also satisfy $\sum_{k=0}^{\infty}b_k^2\lt+\infty $, then $$\lim_{k\to\infty}\frac{1}{k}\sum_{i=1}^k\xi_i^2=0$$   After doing this transformation:$$\xi_k^2\le(a_k+b_k)^2-a_{k+1}^2$$ $\Rightarrow$ $$\sum_{i=1}^{k}\xi_k^2\le(a_1+b_1-a_2)(a_1+b_1+a_2)+(a_2+b_2-a_3)(a_2+b_2+a_3)+\cdots(a_k+b_k-a_{k+1})(a_k+b_k+a_{k+1})$$ then I can't move forward any more. How can tangential acceleration from a radial force be explained? A mass is attached to a rope, and put into a circular motion. If I pull the string from the center, the tangential speed of the mass will increase (by conservation of angular momentum).   I am applying a force only in the radial direction, so how can the tangential velocity increase if there is no tangential force? When & how did Yoda come to know about the Rule of Two? At the very end of Star Wars Episode I: The Phantom Menace, Mace Windu and Yoda had this conversation:     Mace Windu: There is no doubt. The mysterious warrior was a Sith.   Yoda: Always two there are....no more...no less. A master and an   apprentice.   When did he come to know about the secret ? And, how? Any evidence from ? Make Windows 7 ignore WiFi when ethernet is available When I dock my Windows 7 laptop, I want it to prefer the wired ethernet connection over WiFi.  This is a pretty straightforward thing to do on my Mac - I just reorder my network preferences, and it "does the right thing." I just can't figure out how to achieve the same thing on my Win7 laptop.  So, when I'm docked, it connects to WiFi, and then fails to connect to servers on the local wired network. How do I fix this? Catch Regex too complicated when splitting a string in salesforce