I have HTML list:  &lt;ul&gt;   contains initial items of:  &lt;li&gt;   I have added new items dynamically to that list. Old items are responding very well , but the new ones cannot be triggered for the same event.  I am using (.on) event as per JQuery documentation to trigger the current and future elements. But still not responding.  $(".favorite-btn").on("click",function(){     alert("Yes!");                });   Could you help ?
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.
Recently I have been working on a mini-game that gives a few players custom spawn eggs. I want the mob to simply have a name and be on a team. I'm attempting to use this command:   /give @p[x=-102,y=48,z=81,distance=..1] shulker_spawn_egg{Team:PurpleTeam,CustomName:"\"Purple Turret\""}   It does give the player a spawn egg, but the resulting shulker spawn does not have a team or a name. Any ideas why this isn't working? How to invoke a system call via syscall or sysenter in inline assembly? Problems installing xpatch I need to install the xpatch package to make changes to my biblatex setup. The readme file in the install package simply says to run “latex xpatch.ins.” I've moved the xpatch folder (including xpatch.ins and xpatch.dtx files) to the /usr/local/texlive/2011/../texmf-local/ folder. When I run the command above, I get the output Generating file(s) ./xpatch.sty  ! Cannot find file xpatch.dtx. \readsource ...ot find file \uptospace #1 \qStop }                                                   \else \processedLines \z@ ... l.34 ...xpatch.sty} {\from{xpatch.dtx} {package}}}   I've checked, and the .dtx file is in the folder. Any ideas what the problem is? I came across a user with a notification that states:     This account is temporarily suspended network-wide. The suspension period ends on Dec 2 '18 at 2:35.   Screencap for posterity:    Unless this user is  (in which case the full year should be shown, or at least a tooltip), it seems like they should have been unbanned 4 months ago. Show that Function Compositions Are Associative HP Easy Scan - "HP Scanner 3" will damage your computer How to correctly add a path to PATH? How can I create launcher icon for PhpStorm? I have PhpStorm on my PC, to launch it I have to go to phpstorm/bin/ and launch phpstorm.sh, how can I pin this to launcher so that I dont have to go into folders every time? What is a polite substitute for badass (used as a noun)? In Python, how can I parse a numeric string like "545.2222" to its corresponding float value, 545.2222? Or parse the string "31" to an integer, 31?  I just want to know how to parse a float str to a float, and (separately) an int str to an int. System.ListException: Before Insert or Upsert list must not have two identically equal elements - Deep Dive what's the type of movement when the electron jump from level to another when gaining or losing a quantum of energy is it actually jump or move in a specific movement? I realize I am taking a risk by reopening what seems to be an old, hoary, and thorny discussion. However, it seems that in all the long discussions about Meta Stack Exchange reputation, what it means, and why it's separate from reputation on other sites, I have never seen a complete answer to this question:  If reputation on Meta Stack Exchange is used by the community to indicate agreement with an opinion instead of the quality of a post, why is it still tied to site privileges?  The association between reputation and privileges makes sense on other Stack Exchange sites, where reputation is a measure of your participation in the site and the quality of your questions and answers. If you contribute positively to the community your reward is increased privileges, whereas your punishment for "polluting" the site with bad questions or unhelpful answers is a loss of privileges.  However, on Meta Stack Exchange, reputation is a measure of the popularity, not the quality, of your contributions. Tying reputation to privileges means that losing privileges on the site is a punishment for expressing an unpopular opinion, and gaining them is a reward for agreeing with the majority.   My opinion:  I don't think that tying privileges to popularity makes sense as a feedback system. It doesn't really encourage quality contributions, and even worse, acts to suppress minority opinions through the threat of losing privileges. As a user with fairly low reputation, I am afraid of asking a question that may be controversial, because if enough other members disagree with me I will be stripped of the ability to vote and chat. Even if I had higher reputation, I would still be concerned that expressing a controversial opinion would cause me to lose helpful privileges like editing and viewing close votes.   The FAQ tells new users "not to be concerned" by downvotes because all it means is that the community disagrees with them. However, I think new users have every right to be concerned about downvotes, because they still mean the loss of privileges. URL of cited web site in bibliography I am using natbib with the chicago style as bibliography style. I am trying to cite a web site, but in the bibliography the URL (given in the BibTeX entry) is not printed.   Is there a simple solution to this matter? What am I doing wrong?  ok, as a little example (the entries are generated via Mendeley)  @misc{Carlson2011,    author = {Carlson, Nicholas},   booktitle = {Businessinsider.com},   title = {{How Many Users Does Twitter REALLY  Have?}},   url = {www.businessinsider.com/chart-of-the-day-how-many-users-does-twitter-really-have-2011-31/3},   year = {2011} }   and the output in chicago-style looks like this:     Carlson, N. (2011). How Many Users Does Twitter REALLY Have? What is -crf used for in ffmpeg When converting an array of jpegs to a video file (ogg format) I have been using the -crf option.  What are the valid ranges for -crf? Currently I am using 23.    I cannot find the bookmark I read to know what this flag does and I have spent some time Googling around.  These are the arguments I am using at the moment:  -f image2 -r 10 -i " + _sourcePath + @"\img%05d.jpg -crf 18  -y -r 10 " + _destPath + "\\" + _filename + ".ogg" what is wrong with this??? please,can anyone help?  \begin{equation} \label{probabilityy} P^{t}({E_{0})=P_{0}+(1-P_{0})P_{1}+ (1-P_{0})(1-P_{1})P_{2}+.......+P_{n}\Pi_{k_{0}}^{n-1}(1-P_{k}) \end{equation} Integrate $\int_{0}^{\pi}{\frac{x\cos{x}}{1+\sin^{2}{x}}dx}$ There are tons of questions I could maybe post this as an answer to, but before choosing the best one, I'll just post this as an announcement question that can be linked elsewhere. The short story From now on, intra-word emphasis is possible in our Markdown version. That means you can now write  The &quot;V&quot; is for Model**View**Controller. That's un*fricking*believable.  and it renders like this:  The &quot;V&quot; is for ModelViewController. That's unfrickingbelievable.  This only works for asterisks, not for underscores. It works in posts and comments. The reasons There are two big reasons for this. For one thing, this is more or less the behavior of , which we eventually . &quot;More or less&quot; because CommonMark's emphasis behavior is still in flux, and supports a few things that we don't support yet, but at least with this change we're closer. The other reason is languages that don't even have the concept of &quot;words separated by spaces&quot;. See  and  for two examples. This change allow posts in those languages to emphasize words without having to resort to HTML tags. To use an example from the first linked post,  **北京**和**上海**是直辖市。   now renders like this:  北京和上海是直辖市。  Possible issues In the 99% cases, this should only make things better; I've only found very few posts where this change causes unintended bolding/italicizing. And even in those cases, note that the rendered versions of questions and answers are not re-rendered until a post is edited, so this will not affect anything in posts retroactively. Unlike posts, comments are rendered , so this immediately applies to all comments. In most cases this doesn't change anything or actually fixes things. Should you discover a rare case where this breaks an important comment badly, we can always edit it to fix. There's one side effect that I'd like to mention: If you find a great quicksort implementation on GitHub that has a bug that causes a crash when sorting Windows versions, and the author doesn't want to fix it, you may be inclined to say  f**k this s**t   (i.e., &quot;fork this sort&quot;). With intraword emphasis, this would however look like this:  fk this st  So you would have to escape the asterisks (one of them would actually be enough). I'm not worried about this case too much, since if you must put censor-worthy words into a post, you might as well have to jump through a little hoop. Some details This being Meta, there are probably lots of people interested in a more detailed description of the new behavior (don't feel bad if you're not one of them; just skip this section). Here are the major rules regarding intraword-emphasis:  As mentioned, it only applies to asterisks, not underscores. Underscores  this restriction was in place at all; asterisks are much less of a problem.  If a single or double asterisk is supposed to be interpreted as intra-word emphasis, it cannot have punctuation on one side; it actually must be inside a word. An example of an edge case this solves is  It's a web*-based solution. *see Wikipedia for a definition of &quot;web&quot;  where the asterisks after &quot;web&quot; could cause unintended italicizing if there was a second asterisk in the same paragraph somewhere.  For italics, the &quot;inside a word&quot; part of rule 2 is even a bit stricter. For bolding, any word or digit character is allowed; for italics, digits don't work either. That's because the asterisk is often used as a multiplication symbol, so  The game worked in 320200 and 640480 resolution.  wouldn't look right without this restriction.  A minor addition that I made that's only tangentially related to intra-word emphasis is that a sequence of more than three underscores or more than three asterisks will no longer take part in any emphasis. This shouldn't really cause any problems, but fixes some (e.g. the underline in the second blockquote in , while not really visible, is a weird combination of bold and italic underscore characters; after this change, it would just be (more) underscore characters). This behavior also matches CommonMark. Extremizing sum and difference of lengths using triangle inequality We have three points $P=(2,3)$, $Q=(4,-2)$ and $R=(\alpha,0)$. We need to find the value of $\alpha$ such that:    Part 1: $|PR+QR|$ is maximized.  Part 2: $|PR-QR|$ is minimized.  I have  the solution for both. I have understood the solution for case 1 but not for case 2.  Case 1's solution :    Case 2's Solution:   I have understood case 1 completely but in case 2 why was there a need to take the image of point Q? I fail to understand this. What is the best way to open a file for exclusive access in Python? What is the most elegant way to solve this:   open a file for reading, but only if it is not already opened for writing open a file for writing, but only if it is not already opened for reading or writing   The built-in functions work like this  &gt;&gt;&gt; path = r"c:\scr.txt" &gt;&gt;&gt; file1 = open(path, "w") &gt;&gt;&gt; print file1 &lt;open file 'c:\scr.txt', mode 'w' at 0x019F88D8&gt; &gt;&gt;&gt; file2 = open(path, "w") &gt;&gt;&gt; print file2 &lt;open file 'c:\scr.txt', mode 'w' at 0x02332188&gt; &gt;&gt;&gt; file1.write("111") &gt;&gt;&gt; file2.write("222") &gt;&gt;&gt; file1.close()   scr.txt now contains '111'.  &gt;&gt;&gt; file2.close()   scr.txt was overwritten and now contains '222' (on Windows, Python 2.4).  The solution should work inside the same process (like in the example above) as well as when another process has opened the file. It is preferred, if a crashing program will not keep the lock open.