Why is this not working? I'm going absolutely nuts.              &lt;span class="fav"&gt;&lt;/span&gt;              $('.fav').on('click', function() {                 $(this).addClass('item-selected');             });              $('.fav.item-selected').on('click', function() {                 $(this).removeClass('item-selected');             });   BELOW IS FULL CODE. It's the second part that wont undo.          $('.fav').on('click', function() {             $(this).addClass('item-selected').next('span.notification').toggleClass('show-notification').html("Hello world!");             setTimeout(function(){                 $('.show-notification').removeClass('show-notification');             },4000);         });          $('.fav.item-selected').on('click', function() {             $(this).removeClass('item-selected').next('span.notification').toggleClass('show-notification').html("Goodbye world!");             setTimeout(function(){                 $('.show-notification').removeClass('show-notification');             },4000);         });
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.
There is an UI issue for the ranking div when a user crossed 200 reputation When a user just crossed 200, or 200+ reputation, the ranked div (i.e., top 10% overall) is trying to display. But rank calculation can be done on end of the UTC day. So instead of the ranking div, there is a blue colored hyphen is visible to users, it may be the initial loader for the ranking div.  I saw this UI issue previously too for the same scenario. Can this be fixed? How can phone companies detect tethering (incl. Wifi hotspot) Let $\mu$ be a general measure, suppose $f,g$ has compact support on $\mathbb{R}$, when does the integration by parts formula hold $$\int f'g d\mu = - \int g'fd\mu?$$ I know in general this is false, we can take $\mu$ to be supported on a point, say $0$, then it is not necessarily true that  $$f'(0)g(0) = -g'(0)f(0).$$  If $\mu$ is absolute continuous w.r.t. Lebesgue measure, we have $\frac{d\mu}{dx} = h$ $$\int f'gd\mu = \int f'gh dx = -\int f(gh)'dx$$ where $(gh)'dx$ might be a measure. but we can not recover the form $\int g'fh dx$.  Thank you very much! How do you run Ubuntu Server with a GUI? to set start Thunderbird in minimized mode at startup, but it wasn't helpful.   After following the instructions, I could not even start Thunderbird. So I was forced to start TB in safe mode to delete the "FireTray Plugin" and fix this issue. After that it started to work but it deleted all my email accounts and I had to do that chore all over again .  So is there any working way to start Thunderbird minimized on start-up? Windows 7 SP1 Windows Update stuck checking for updates I installed Windows 7 fresh and installed SP1. Now, when I try to check manually for Windows Updates it just hangs on the Checking for updates screen.    I tried running the tools in , but this did not fix the issue either:  No matter what I do it just hangs on the "Checking for updates..." screen and goes no further. At what stage should acknowledgements be inserted into the paper if review is not double-blind? When the review process is double-blind, I guess (although I have not read this anywhere) that acknowledgements should not be written in the submitted paper, as this might break anonimity. They should only be inserted into the camera-ready version, after the paper is accepted.  What is the custom when the review process is not double-blind? Should I write the acknowledgements in the submitted version, or wait to the camera-ready version? I'm using this code to get standard output from an external program:  &gt;&gt;&gt; from subprocess import * &gt;&gt;&gt; command_stdout = Popen(['ls', '-l'], stdout=PIPE).communicate()[0]   The communicate() method returns an array of bytes:  &gt;&gt;&gt; command_stdout b'total 0\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2\n'   However, I'd like to work with the output as a normal Python string. So that I could print it like this:  &gt;&gt;&gt; print(command_stdout) -rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1 -rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2   I thought that's what the  method is for, but when I tried it, I got the same byte array again:  &gt;&gt;&gt; binascii.b2a_qp(command_stdout) b'total 0\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2\n'   How do I convert the bytes value back to string? I mean, using the "batteries" instead of doing it manually. And I'd like it to be OK with Python&nbsp;3. Changing the size of the mouse pointer in Ubuntu MATE 18.04 does not work How to add a default item to a custom taxonomy? Wordpress default taxonomy (Categories) has the item Uncategorized by default. How to add a default item to a new custom taxonomy?  functions.php:  // === CUSTOM TAXONOMIES === // function my_custom_taxonomies() {     register_taxonomy(         'block',        // internal name = machine-readable taxonomy name         'static_content',       // object type = post, page, link, or custom post-type         array(             'hierarchical' =&gt; true,             'labels' =&gt; array(                 'name' =&gt; __( 'Blocks' ),                 'singular_name' =&gt; __( 'Block' ),                 'add_new_item' =&gt; 'Add New Block',                 'edit_item' =&gt; 'Edit Block',                 'new_item' =&gt; 'New Block',                 'search_items' =&gt; 'Search Block',                 'not_found' =&gt; 'No Block found',                 'not_found_in_trash' =&gt; 'No Block found in trash',             ),             'query_var' =&gt; true,    // enable taxonomy-specific querying             'rewrite' =&gt; array( 'slug' =&gt; 'block' ),    // pretty permalinks for your taxonomy?         )     ); } add_action('init', 'my_custom_taxonomies', 0);   EDIT: I just want to have the taxonomy item there when the theme is installed. It doesn't have to automatically be added to any empty term. What is the difference between image size and image quality? Which is correct: "one or more is" or "one or more are"? Should the phrase be "one or more is...", or "one or more are..."? Is is possible that a software issue could be causing spotty USB-C connections on 2017 MacBook Pro? I have a 2017 MacBook Pro. It has 2 USB-C ports on the left side and I use an Aukey hub to provide more ports (4 USB, 1 HDMI, 1 USB-C) and always to connect two monitors.   I connect one monitor through the hub with the HDMI port and another directly to the MBP with a USB-C adapter. Sometimes when I connect the hub to the Mac and the 2nd monitor to the Mac, it works as it should with no problem...but more than half the time I have to connect, disconnect, jiggle, jangle, switch ports, reconnect HDMI, etc. and hopefully they will both work. OFTEN, I can only get one monitor to fire up.  Is there any kind of software fix or reset that might solve this issue? Any other thoughts welcome. Thanks. What is the purpose of Jordan Canonical Form? A contractive mapping on $M$ is a function $f$ from the metric space $(M,d)$ into itself satisfying $$d(f(x),f(y))&lt;d(x,y)$$ whenever $x,y\in M$ with $x\ne y$. Prove that if $f$ is a contractive mapping on a compact metric space $M$, there exists a unique point $x\in M$ with $f(x)=x$.   Consider the function $g(x)=d(f(x),x)$. Note that   \begin{align*}d(f(x),x)-d(f(y),y)&amp;\leq (d(x,y)+d(y,f(x))-(d(y,f(x)-d(f(x),f(y)) \\ &amp;=d(x,y)+d(f(x),f(y)) \\ &amp;&lt;2d(x,y)  \end{align*}  And similarly for $d(f(y),y)-d(f(x),x)$, so we have $|d(f(x),x)-d(f(y),y)|&lt;2d(x,y)$. This means $g(x)$ is continuous.  So $g(x)$ is a real-valued continuous function on a compact space, so must be bounded and has a minimum $c$, i.e. there exists $x_0$ such that $d(f(x_0),x_0)$ equals the minimum $c$. What then? According to general relativity, inertial mass and gravitational mass are the same, and all accelerated reference frames (such as a uniformly rotating reference frame with its proper time dilation) are physically equivalent to a gravitational field of the same strength.  Refer: Einstein's thought experiment of a Physicist in an Accelerated Box.  I find that the 'How' part of this question is somewhat easy to understand Mathematically but hard to visualize physically and on the 'Why' part I am totally blank. I'm a fan of extension methods in C#, but haven't had any success adding an extension method to a static class, such as Console.  For example, if I want to add an extension to Console, called 'WriteBlueLine', so that I can go:  Console.WriteBlueLine("This text is blue");   I tried this by adding a local, public static method, with Console as a 'this' parameter... but no dice!      public static class Helpers {     public static void WriteBlueLine(this Console c, string text)     {         Console.ForegroundColor = ConsoleColor.Blue;         Console.WriteLine(text);         Console.ResetColor();     } }   This didn't add a 'WriteBlueLine' method to Console... am I doing it wrong? Or asking for the impossible? How do I create a Java string from the contents of a file? how to pass objects between intents I am simply adding user in 'Monitored Users' in Debug Logs. But User is not getting added.