I'm using a library called SweetAlert2 to display a popup. In this popup I have a basic HTML form. function createParty() {     $('.gui-create-party').on('click', function () {         Swal.fire({             title: 'EINE PARTY ERSTELLEN',             html: '&lt;form method=&quot;post&quot; class=&quot;gui-jp-form gui-swal2&quot;&gt;' +                     //My HTML (to much to show)                    '&lt;input type=&quot;submit&quot; name=&quot;gui_create_party&quot; value=&quot;ERSTELLEN&quot; class=&quot;gui-jp-submit&quot;&gt;' +                   '&lt;/form&gt;',             showConfirmButton: false,             showCancelButton: false,             cancelButtonText: 'Abbrechen'         })     }) }  However I have an function that will do some animation but my jQuery selector can't find the element. I'm guessing this is because the popup is getting rendered after the script is loaded. If I use the console to search for my element after the popup is displayed I find the elements, but unfortunately my animation function can't find them. So I thought, why not adding my animation function to the HTML string like this, so it is getting executed after the popup is rendered. '&lt;script&gt;avatarSelectAnim();&lt;/script&gt;' +  Unfortunately this won't work either. Does anyone know how I could achive this? Thanks!
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.
LWC Get Pick-list Field Values In LWC, is it possible to get a pick-list field's possible values?  I'm writing a component that is embded into a lightning record page. I need my component to be able to load the record from the page, get data from the fields and use that data to pre-populate my search form with default values.  I have this working with city/state and checkbox fields. Right now the city/state fields are built pull data from an aggregate query of contacts to find all possible state/city combinations (I know this is doomed to fail when the records reach over 50k contacts but Its good enough for now).  I have a pick-list field on my object called skill level, I need to be able to build a combo box that has all the possible values for skill level and set the default value to the value on the associated record.  I'd like to avoid hard-coding the available options if possible.  In LWC, is it possible to get a pick-list field's possible values? todonotes: How to make multiple listoftodos? In this MWE, I made two commands to highlight parts of the text as a reviewer comment, while the comments are colored uniquely to indicate the author whose comment is typeset.  If I want to make two listoftodos, each has the comments entries of one author, how can it be done?  \documentclass{article} \usepackage{hyperref,lipsum}  \usepackage[textwidth=2.5cm,colorinlistoftodos]{todonotes} \setlength{\marginparwidth}{2.5cm}  \newcommand\stR[2]{% 1st reviewer comment     \todo[%     author=1st Reviewer,noline,caption={1st Reviewer #1 Comment},color=blue!20%     ]%     {#1 Comment}{\color{blue}{\bfseries#2}}}  \newcommand\ndR[2]{% 2nd reviewer comment     \todo[%     author=2nd Reviewer,noline,caption={2nd Reviewer #1 Comment},color=red!50!white%     ]%     {#1 Comment}{\color{red}{\bfseries#2}}}  \begin{document} \listoftodos[Reviewers Comments] \section{Section} Text \stR{2nd}{2nd comment of the 1st reviewer} another text\vspace{\baselineskip} \lipsum[1]\vspace{\baselineskip} Some text \ndR{1st}{1st comment of the 2nd reviewer} continue text \end{document} Why do you need explicitly have the "self" argument in a Python method? Visual Studio Editor does not underline errors anymore My Visual Studio (2008) Editor has stopped to underline Errors (this nifty wavy red lines). I can't really tell when, but it can be related to the installation of .Net Framework 3.5 SP 1 or the MVC Beta (which I guess is unlikely). Furthermore have I installed and uninstalled both CodeRush and Resharper for evaluation purposes (decided not to keep either one of them).  Does anyone know the problem and how to restore this functionality again? Order of general- and special linear groups over finite fields. How to Execute ShortCut From Command line in Windows 7 We came with a scenario where we have to use Shortcut file (.lnk), which is on the desktop, to execute an application for a headless device (i.e, without manual intervention).  Is there any way to execute it from Command prompt? Given $\int_0^{\infty}e^{-x^2}dx = \frac{\sqrt{\pi}}{2}$, evaluate $\int_0^{\infty}e^{-a^2x^2-\frac{b^2}{x^2}}dx $ Given $$\int_0^{\infty}e^{-x^2}dx = \frac{\sqrt{\pi}}{2}$$ evaluate:   $$\int_0^{\infty}e^{-a^2x^2-\frac{b^2}{x^2}}dx. $$   I can find that  $$\left(ax+\frac{b}{x}\right)^2 = a^2x^2+2ab+\frac{b^2}{x^2}$$  therefore: $$\int_0^{\infty}e^{-a^2x^2-\frac{b^2}{x^2}}dx = e^{2ab}\int_0^{\infty}e^{-\left(ax+\frac{b}{x}\right)^2}dx$$  but I can't find any clue then. Why doesn't my screen lock in XFCE? I have a simple question regarding "conditional probability" and "Likelihood". (I have already surveyed this question  but to no avail.)  It starts from the Wikipedia . They say this:     The likelihood of a set of parameter values, $\theta$, given   outcomes $x$, is equal to the probability of those observed outcomes   given those parameter values, that is      $$\mathcal{L}(\theta \mid x) = P(x \mid \theta)$$   Great! So in English, I read this as: "The likelihood of parameters equaling theta, given data X = x, (the left-hand-side), is equal to the probability of the data X being equal to x, given that the parameters are equal to theta". (Bold is mine for emphasis).  However, no less than 3 lines later on the same page, the Wikipedia entry then goes on to say:     Let $X$ be a random variable with a discrete probability distribution   $p$ depending on a parameter $\theta$. Then the function      $$\mathcal{L}(\theta \mid x) = p_\theta (x) = P_\theta (X=x), \, $$      considered as a function of $\theta$, is called the likelihood   function (of $\theta$, given the outcome $x$ of the random variable   $X$). Sometimes the probability of the value $x$ of $X$ for the   parameter value $\theta$ is written as $P(X=x\mid\theta)$; often   written as $P(X=x;\theta)$ to emphasize that this differs from   $\mathcal{L}(\theta \mid x) $ which is not a conditional probability,   because $\theta$ is a parameter and not a random variable.   (Bold is mine for emphasis). So, in the first quote, we are literally told about a conditional probability of $P(x\mid\theta)$, but immediately afterwards, we are told that this is actually NOT a conditional probability, and should be in fact written as $P(X = x; \theta)$?   So, which one is is? Does the likelihood actually connote a conditional probability ala the first quote? Or does it connote a simple probability ala the second quote?  EDIT:  Based on all the helpful and insightful answers I have received thus far, I have summarized my question - and my understanding thus far as so:    In English, we say that: "The likelihood is a function of parameters, GIVEN the observed data." In math, we write it as: $L(\mathbf{\Theta}= \theta \mid \mathbf{X}=x)$. The likelihood is not a probability.  The likelihood is not a probability distribution.  The likelihood is not a probability mass. The likelihood is however, in English: "A product of probability distributions, (continuous case), or a product of probability masses, (discrete case), at where $\mathbf{X} = x$, and parameterized by $\mathbf{\Theta}= \theta$." In math, we then write it as such: $L(\mathbf{\Theta}= \theta \mid \mathbf{X}=x) = f(\mathbf{X}=x ; \mathbf{\Theta}= \theta) $ (continuous case, where $f$ is a PDF), and as $L(\mathbf{\Theta}= \theta \mid \mathbf{X}=x) = P(\mathbf{X}=x ; \mathbf{\Theta}= \theta) $ (discrete case, where $P$ is a probability mass). The takeaway here is that at no point here whatsoever is a conditional probability coming into play at all.  In Bayes theorem, we have: $P(\mathbf{\Theta}= \theta \mid \mathbf{X}=x) = \frac{P(\mathbf{X}=x \mid \mathbf{\Theta}= \theta) \ P(\mathbf{\Theta}= \theta)}{P(\mathbf{X}=x)}$. Colloquially, we are told that "$P(\mathbf{X}=x \mid  \mathbf{\Theta}= \theta)$ is a likelihood", however, this is not true, since $\mathbf{\Theta}$ might be an actual random variable. Therefore, what we can correctly say however, is that this term $P(\mathbf{X}=x \mid \mathbf{\Theta}= \theta)$ is simply "similar" to a likelihood. (?) [On this I am not sure.]   EDIT II:  Based on @amoebas answer, I have drawn his last comment. I think it's quite elucidating, and I think it clears up the main contention I was having. (Comments on the image).    EDIT III:   I extended @amoebas comments to the Bayesian case just now as well: Order Bars in ggplot2 bar graph Can I get SSD rw performance while keeing data security if I combine SSD & HDD in btrfs RAID1 I have 2 storage devices; classical slow HDD (750GB, /dev/sda) and faster SSD (128GB, /dev/sdb). Currently I have installed Ubuntu &amp; Mint on same btrfs partition on SSD (/dev/sdb5). My btrfs pool consists of /dev/sdb5.  What I want to achieve is data replication on HDD while keeping SSD performance: Something like this:  For read case it would be ideal for procedure to go like this:   read from SSD check checksum if it verifies.. awesome, give me the data if not, fetch data from HDD and perform error correction through duplicate data   I'd manually run (some tool I'm not sure which one... btrfs check --repair perhaps?) every month or so to check HDD checksums and correct them via SSD data against bitrot.  For write case:   write to SSD sync to HDD when write requirements are low, thus not slowing down the system.   Is this possible and how would I do it?  Bottom line is, I like btrfs and would like it to duplicate data across HDD &amp; SSD drive automatically while keeping SSD excellent performance.   Using SSD as write cache is not an option since it's missing data duplication and security. Elements order in a "for (… in …)" loop How to install Ubuntu on VirtualBox? Trailing characters stripped from titles bypass length minimum It is an usual practice that any quantum field theory starts with a suitable Lagrangian density. It has been proved enormously successful. I understand, it automatically ensures valuable symmetries of physics to be preserved. But nevertheless the question about the generality of this approach keeps coming to my mind. My question is how one can be sure that this approach has to be always right and fruitful. Isn't it possible, at least from the mathematical point of view that a future theory of physics does not subscribe to this approach? Unzipping geoprocessing package (GPK) file? I was under the impression that all ArcGIS package files could have their contents examined and potentially used by renaming them to *.zip and unzipping them.  This impression is supported for map package (*.mpk) files by  to  and I thought I had used it succesfully on geoprocessing package (*.gpk) files in the past.  However, today I am unable to use a  which I think is because it was created using ArcGIS Desktop 10.5.x when I am using 10.2.1.01. When I rename this *.gpk as *.zip and try to examine it in Windows Explorer I get:     Compressed (zipped) Folders Error      Windows cannot open the folder      The Compressed (zipped) Folder ....zip is invalid.     Is it possible to unzip a geoprocessing package (*.gpk) file to see whether it may contain some useful ArcPy code when that *.gpk cannot be unpacked to provide a usable toolbox? Why does English spelling use silent letters? Why have a letter in a word when it’s silent in pronunciation, like the b in debt?  Can anyone please clarify my uncertainty here? How do I calculate if a spell hits and how much damage it does? I'm not entirely sure I understand what the PHB is telling me about spell attacks.  Say I'm a wizard who's casting Fire Bolt (I could also be a Cleric casting Inflict Wounds or what-have-you), the spell itself doesn't say anything about making an attack roll or the enemy making a saving throw.    So do I make an attack roll and then add in my INT mod + proficiency bonus?  Or does the target have to make a saving throw against a DC of 8+ my INT mod + proficiency bonus?  And, assuming I hit, do I add my INT mod + proficiency bonus to the damage? Methods to compute $\sum_{k=1}^nk^p$ without Faulhaber's formula As far as every question I've seen concerning "what is $\sum_{k=1}^nk^p$" is always answered with "Faulhaber's formula" and that is just about the only answer.  In an attempt to make more interesting answers, I ask that this question concern the problem of "Methods to compute $\sum_{k=1}^nk^p$ without Faulhaber's formula for fixed $p\in\mathbb N$".  I've even checked this  without finding what I want.  Rule #1: Any method to compute the sum in question for arbitrary $p$ is good, either recursively or in some manner that is not in itself a closed form solution.  Even algorithms will suffice.  Rule #2: I don't want answers confined to "only some values of $p$".  (A good challenge I have on the side is a generalized geometric proof, as that I have not yet seen)  Exception: If your answer does not generalize to arbitrary $p$, but it still generalizes to an infinite amount of special $p$'s, that is acceptable.  Preferably, the method is to be easily applied, unique, and interesting.  To start us off, I have given my answer below and I hope you all enjoy. Scale-dependent displaying of a layer using OpenLayers plugin? When I am creating a layer in QGIS the layer position/lines does not stay the same when I zoom in closer than, it seems like 1: 1000. I am adding 2 images to explain the problem. The moment I zoom in closer than 1: 1 000 then the original layer does not display correctly anymore.  Please, can you assist in this matter?