Can someone please explain in what cases the following syntax can be used and how does this work?  (function($) {     $.fn.hoverIntent = function(f,g) {     }; })(jQuery);   Thanks!
How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.
I have a dictionary: keys are strings, values are integers.  Example:   stats = {'a':1000, 'b':3000, 'c': 100}   I'd like to get 'b' as an answer, since it's the key with a higher value.  I did the following, using an intermediate list with reversed key-value tuples:  inverse = [(value, key) for key, value in stats.items()] print max(inverse)[1]   Is that one the better (or even more elegant) approach? I usually am able to render successfully to the c:\tmp folder, but when I came into work today, I rendered out the image on my work laptop, and everything seems to work, but I'm not getting an output to the tmp directory.  Does anyone know how to make this work? Two circles intersection Could you tell what are all the four points in following? Two circles intersect at two points maximum when we want to draw intersecting circles. But there we are solving quadratic equations, what is the argument about the other two missing points ? The product of a normal and Rademacher variables, independent from each other Let $X\sim N(0,1)$ and let $Z$ be a random variable independent of $X$ such that:  \begin{equation} \Pr(Z=z) = \begin{cases} \frac{1}{2} &amp; \mbox{if $z = -1$ or $z=1$}, \\ \\ 0 &amp; \mbox{otherwise}. \end{cases} \end{equation}   Define $Y = ZX$. Show that $Y \sim N(0,1)$. Determine $\operatorname{Cor}(X,Y)$. Are $X$ and $Y$ independent?   Progress:  I'm basically stuck at the beginning. I got as far as $P(ZX &lt; y) = P(Z &lt; y/X)$, which I'm not even sure is correct. I'm also not clear on what it means by defining $Y = ZX$ - does it mean I need to state the probability density function or something? And how do I show that $Y \sim N(0,1)$? I'm trying to use itemize inside a tabularx environment, but I have a problem when I mention the end of the line. It seems that using \\ end the line after the end of itemize, resulting in a supplementary vertical spacing that I would like to remove.  Any hint?  \begin{frame} \frametitle{Sujet de thèse}         \begin{center}             \textit{Sujet N$^\circ$221 : Formation et dynamique des champs de dunes longitudinales.}         \end{center}          \begin{tabularx}{\textwidth}{l !{\color{blue}\vline width 3pt} X}             Contexte &amp;  \scriptsize{Classification des dunes selon leur mécanisme de croissance, leur orientation et leur forme.              Bonne compréhension :             \begin{itemize}[noitemsep,topsep=0pt, label=\textbullet]                 \item du mécanisme de croissance lié à une disponibilité en sédiment grande.                 \item de la croissance sous un vent unidirectionnel.             \end{itemize}} \\             Objectifs &amp; \scriptsize{Etude de l'orientation longitudinale :             \begin{itemize}[noitemsep,topsep=0pt, label=\textbullet, parsep=0pt ]                 \setlength\itemsep{0cm}                 \item Développement d'un formalisme sous des vents multidirectionnels.                 \item Etude des dunes longitudinales dans le cas d'une faible disponibilité en sédiment. (Fingering mode)                 \item Inversion: données topographiques $\longrightarrow$ Données de vents $\rightarrow$ paléo-climats.              \end{itemize}} \\             Outils &amp; \scriptsize{Modèle numérique (Rescal), Données expérimentales, Théorie.} \\         \end{tabularx}     \end{frame}     And yes, dunno if it's important but everything is inside beamer. What happens with lethargy when Haste is cast again on a creature before first cast runs out? Haste states     When the spell ends, the target can't move or take actions until after its next turn, as a wave of lethargy sweeps over it.   However, let's say Character A cast Haste on Character B. In the 10th round (final round of haste if concentration not broken), Character B casts Haste on himself.  What happens during the next round?    Do they lose a round of the "new" haste while they are lethargic and lose movement and actions? Does the new haste override the lethargy until it ends? Is it some combination? Retain AC/Dex modifications but lose actions/movement? None of the above? Is it the airport security at the country you flying from? I highly doubt it because I have been to countries where it's so corrupted that you buy the airport officials for the price of a dinner.   Is it the aircrew' responsibility? Again I don't think they care much - unless there is severe punishments - in corrupted third world countries.   I have been personally in a situation when an officer at a certain airport insisted on examining my British passport before he allowed me to move to the gate because I refused to slip him a $100 note. I was travelling to the UK yet I have another passport which is valid and it is issued by the country I was flying from, which means he had no reason whatsoever - nor I think he cared - to examine my British passport to check if it's valid.  Edit to summarize it, I want to expose as little as possible of information about my dual nationality. For that I need to know whom I am obligated to show my passport(s) Proving which QM interpretation is correct Let's assume that the existence of gravitons is theoretically proven or they are detected by LHC could one interpretaion be proven correct? For any symbol, how can I get the full context-qualified name of the symbol as a string? Calculate total sum of all numbers in c:forEach loop How to run a fresh version of AIX in a Virtual Machine with a Linux host? What is the best way to convert seconds into (Hour:Minutes:Seconds:Milliseconds) time? How to compile a function whose arguments are lists containing strings? How to determine which form has been submited and to validate them in a servlet What's the "official" explanation for Harry's (and everyone else's) absence from muggle school? If a sequence $(u_n)$ be such that its every subsequence has a subsequence that converges to $0$, then $\lim u_n= 0$ Sometimes I wonder if he is actually/really  as lavish as he   pretends to be.   I know that this sentence can work without either actually or really, but if we were to use one of them to make an impact on the listener, which one should it be? I need another LP-E5 type battery for my Canon 450D. Should I buy an original Canon battery or one of the many generic brands available? There are loads of cheapos on , for example.  I should add that the new battery will be added to my existing Canon battery in a battery grip.  Does anyone have any experience (good or bad) of using generic batteries? I am writing an article in English, with some pages in Russian.  \documentclass[12pt]{article}  \usepackage[T1,T2A]{fontenc}  \usepackage[utf8]{inputenc}  \usepackage[russian,english]{babel}  \usepackage{newtxmath} \usepackage{newtxtext} \begin{document}  hello \textbf{hello}  \selectlanguage{russian} привет \textbf{привет}  \end{document}   Output:  hello hello привет привет  I am using \selectlanguage{} to switch between languages when needed.  However, I noticed that when I try to use \textbf{} when in Russian language mode, it does not work because of newtxtext, which I am using for math formulas.  Does anyone know how to solve this problem?  Thank you. Misplaced Accents in Cyrillic Text In educational material for the Russian language and linguistic literature the need to put accents on Cyrillic vowels often arises. However when I tried to do this with luaLaTeX the accents where misplaced.  \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage{fontspec} \setmainfont{Linux Libertine:style=Regular} \begin{document}  Е́сли вы изу́чите  \'{Е}сли вы из\'{у}чите  \'{E}сли вы из\'{y}чите % Here "E" and "y" are Latin glyphs, but this workaround does not                         % work with all Cyrillic letters e.g. Я, Ю \end{document}     The last line would looks nice, but unfortunately these are Latin glyphs.  Is this a problem with the font used (Linux Libertine) or with LaTeX?