I have a switch Statement in JavaScript in which the keyup event handler doesn't return the callback to my variable (var test in this case).  It is the last case (110) that doesnt work.  Here is the code. Hope you can help to enlight me:  var getDateRange;  $(".nav-reports").append(   '&lt;div id="daterange-container"&gt;' +   '&lt;select id="daterange"&gt;' +   '&lt;option value="0"&gt;Choose duration:&lt;/option&gt;' +   '&lt;option value="10"&gt;Today&lt;/option&gt;' +   '&lt;option value="20"&gt;Yesterday&lt;/option&gt;' +   '&lt;option value="30"&gt;This week&lt;/option&gt;' +   '&lt;option value="40"&gt;Last week&lt;/option&gt;' +   '&lt;option value="50"&gt;This month&lt;/option&gt;' +   '&lt;option value="60"&gt;Last month&lt;/option&gt;' +   '&lt;option value="70"&gt;This year&lt;/option&gt;' +   '&lt;option value="80"&gt;Last year&lt;/option&gt;' +   '&lt;option value="100"&gt;Everything&lt;/option&gt;' +   '&lt;option value="110"&gt;Last x days&lt;/option&gt;' +   '&lt;/select&gt;' +   '&lt;/div&gt;' );  getDateRange = function () {   var test;   var dateString = "yyyy-MM-dd";   var selectedOption = parseInt($('#daterange').change().val());   $('.daterange-input').detach();   switch (selectedOption) {     case 10: // works             break;     case 20: // works             break;     case 30: // works             break;     case 40: // works             break;     case 50: // works             break;     case 60: // works             break;     case 70: // works             break;     case 80: // works             break;     case 100: // works             break;     case 110: // doesnt't work             $('#daterange-container').append('&lt;input class="daterange-input" type="text" maxlength="4"&gt;');             $('.daterange-input').keyup(function () {               test = '/' + Date.today().addDays(-parseInt($(this).val())).toString(dateString) + '/' + Date.today().toString(dateString);             });             break;   }   return test; };   Thank you in advance.  I call the getDateRange function here:  $('.' + report.description).click(function () {                     var dateRange = getDateRange(); // some more code not in relation                 })
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
Printing labels along with equation numbers Working with documents with huge amount of equations it becomes cumbersome to go back and remind yourself what you labeled a certain equation to (I try to name them in a smart way, but there are too many).  Is there a convenient way to have equations print the label along with the tag/number, so that I can easily check the label in the compiled document?  Something like this would be perfect:  x = y               (14.1) eq:my_label How to make a particular app the default viewer / editor for ALL its supported file types at once? Windows 10 Anniversary Upgrade error 0xc1900101 - 0x30018 referring to SYSPREP How do I enable the "Universe" repository? Does voltage drop occur with zero load and zero resistance Before upgrading to macOS Sierra, I really liked the Character Accent Menu by doing a long press on a key (for example, the character e) and being able to add an accent on it.   However, this functionality seems to not work anymore, and so far, I can't find out why?   Also, before, doing a long press on the delete button, would repeatly delete characters. Now, it is doing only one character deletion disregarding how long I'm pressing the key. So if I want to erase 10 characters, I need to press the delete button 10 times...  Also, I am not able to log off or shut down. When doing it, all applications are closed, status bar disappears but nothing happens. The dock remains here. I have no way to shut down or log out without doing a long press on the power button.  Is someone facing the same issue?  EDIT : Logging with a new user account or guest account fix all the problems. But I still would like to know what, in my user account, became corrupted during the upgrade. If I have a sentence that starts with additionally, finally, consequently, etc. do I always have to put a comma after it? Or is there a different rule? How do I stop program from skipping over getline? Can a Paladin take levels of other classes? In 3.5 D&amp;D,  have severe restrictions on multiclassing:     Like a member of any other class, a paladin may be a multiclass character, but multiclass paladins face a special restriction. A paladin who gains a level in any class other than paladin may never again raise her paladin level, though she retains all her paladin abilities.   Because Pathfinder is based on 3.5 D&amp;D, do Pathfinder paladins face the same restriction? That is, if a Paladin multiclasses to say, a fighter, can she take another level of Paladin later on? Installing titling.sty onto an offline Windows machine I'm trying to compile a file for which I need titling.sty:  ! LaTeX Error: File `titling.sty` not found.  The two biggest issues are 1) it's on a Windows machine (I'm really only &quot;comfortable&quot; with the Unix command line) and 2) the machine cannot be connected to the internet (so automatic approaches are impossible). Assuming the error means I'm missing a package and following some related advice (e.g., ), I downloaded the file , transferred it to the offline machine, and unzipped it, then tried to run: latex titling.ins  But this gave me an error (given I can't copy-paste, I'm including what I think may be relevant):  ******************************************************** * No Configuration file found, using default settings. * ******************************************************** ! ************************************************** * Could not find your \batchfile=titling.ins. **************************************************. \processbatchFile ...****************************}                                                  \fi \else \ifDefault \Msg ... 1.1092 \process@first@batchfile  I have no idea how to proceed from this. How can I install titling.sty on this machine? inequality on the unit disk $n$ points $z_1,z_2,\cdots,z_n$ in the unit open disk are given. Prove or disprove that there exists $z$ in the unit circle such that $\prod_{i=1}^n |z-z_i|^i \ge 1$.  I think it can be solved by elementary analytic methods but no idea. Create a virtual file that is actually a command Is there any way to create a virtual file, such that reading from the file actually reads from the stdout of a command; writing to the file is acually writing to the stdin of a command?  So far I have kludged this with an inotifywait on a file, which calls a command when the file is modified, taking it's input from the file and writing back to it.  I don't like that the inotifywait has to be constantly restarted though (and I have to ensure that it is always running). I only use this file perhaps twice a week. How do I check the Database type in a Rails Migration? What does the minus sign in Maxwell's third equation imply? If we write out Maxwell's equations with magnetic charges, we get $$ \begin{align} \nabla \cdot \mathbf{E} &amp;= 4 \pi \rho_e \tag{1}\\ \nabla \cdot \mathbf{B} &amp;= 4 \pi \rho_m \tag{2}\\ -\nabla \times \mathbf{E} &amp;= \frac{\partial \mathbf{B}}{\partial t} + 4 \pi \mathbf{J}_m \tag{3}\label{Eq:Faraday}\\ \nabla \times \mathbf{B} &amp;= \frac{\partial \mathbf{E}}{\partial t} + 4 \pi \mathbf{J}_e \tag{4}\label{Eq:Ampere} \end{align} $$ In particular, Faraday's law \eqref{Eq:Faraday} contains a minus sign that Ampere's law \eqref{Eq:Ampere} does not. This always struck me as odd because it's often said the fields are dual to each other (i.e. you can replace E with B and &quot;get the same result&quot;), but that requires a bit of mental recalibration to accommodate that minus. So I'm curious what the origin of that negative is and what it means. Are there any intuitive explanations for how to think about it? Storing Images in DB - Yea or Nay? How to get apt-cacher-ng to download AND cache packages from Apt HTTPS repositories? What happens to the Matrix if Neo takes the blue pill? If Neo defies his fate and refuses to be removed from the Matrix (by taking the blue pill) what happens next?   Would another "The One" get selected by The Architect or The Oracle and is there anything to suggest that the current instance of The Matrix actually could have multiple "The One"'s (perhaps one of the 'potentials') in the event that the Chosen One manages to get himself killed or simply refuses to play ball? Use chown to set the ownership of all a folder's subfolders and files? How to convert Strings to and from UTF8 byte arrays in Java In Java, I have a String and I want to encode it as a byte array (in UTF8, or some other encoding). Alternately, I have a byte array (in some known encoding) and I want to convert it into a Java String. How do I do these conversions? What is $\lim_{n\to \infty}\sum_{k=1}^n \left(\frac{k}{n}\right)^n$? I'm asked to find $\displaystyle\lim_{n\to \infty}\sum_{k=1}^n \left(\frac{k}{n}\right)^n$.  It seems that the sum converges.  I managed to prove that $\forall n,1&lt;\sum_{k=1}^n \left(\frac{k}{n}\right)^n&lt;e$  But I don't know how to prove convergence, nor find the value of the limit.