How to bind event to callable in addEventListener('event', callable.bind(???))
How to pass arguments to addEventListener listener function?
I have association bonus on superuser.com. After that I've started a bounty worst of 50 rep and earned more than 10 rep. Now I have 89 rep (38 of which is earned at superuser which is more than 10) but still not able to answer protected questions.  So, currently new user with 10 rep can answer protected question and I with 89 (38) rep can't.   How does it work now: after registration on new Stack Exchange site you get 101 rep Association Bonus and are able to answer protected questions only when you have 111+ rep on that site. How should it work: after registration on new stackexchange site you get 101 rep Association Bonus and are able to answer protected questions only when you have earned 10+ rep on that site. Age from Date of Birth using JQuery I need to calculate if someone is over 18 from their date of birth using JQuery.  var curr = new Date(); curr.setFullYear(curr.getFullYear() - 18);  var dob = Date.parse($(this).text());  if((curr-dob)&lt;0) {     $(this).text("Under 18"); } else {     $(this).text(" Over 18"); }   There must be some easier functions to use to compare dates rather than using the setFullYear and getFullYear methods.  Note: My actual reason for wanting to find a new method is length of the code. I have to fit this code into a database field that is limited to 250 chars. Changing the database is not something that can happen quickly or easily. Can colliding gravitational waves create a black hole? Inequality involving the sup of a function and its first and second derivatives Let $f:\mathbb{R} \to \mathbb{R}$ be a twice differentiable function. And let  $$\eqalign{   &amp; M_0  = \sup \left|f(x)\right|  \cr                &amp; M_1  = \sup \left|\frac{d}{dx} f(x) \right|  \cr                &amp; M_2  = \sup \left|\frac{d^2}{dx^2} f(x) \right| \cr }$$ Prove that  $$M_1 ^2  \leqslant 4M_0 M_2$$ I can not think how I can relate these values ​​in some inequality )= Why doesn't current pass through a resistance if there is another path without resistance? Why doesn't current pass through a resistance if there is another path without resistance? How does it know there is resistance on that path? Some clarification:  I understand that some current will flow through the resistance. A depiction of this phenomenon through Ohm's laws does not answer the 'why' part of the question as it does not illuminate the process behind this phenomenon. There seems to be disagreement among the answers on whether the charge repulsions are enough to cause this effect. Cited research would be appreciated to resolve this issue. To refine what I mean by this question, I think I should give an example of why I am curious as to the causal background of this phenomenon. If charge repulsions do in fact repel 'current' in the example of the short circuit, then why does the same phenomenon not happen in other parallel circuits. (Again, I know that not all circuits behave ideally) I believe the question is expressed in the most straightforward way possible. This should, however, not affect the scope of the answers. I do not wish to see or think on the level of an electron as circuit behavior always includes a cumulative effect due to the nature of electrostatic interactions. Callback after the record was created using e.force:createRecord Are there a way to add callback after the user created a record and clicked the Save button?  I am using a custom tab and custom components and open the Create a record modal window using e.force:createRecord, but I was not able to find out how to attach callback to the event.  I even found :     Currently force:createRecord event does not accept any callback method or any after save event to handle custom action. Current force:createRecord always redirects to the newly created record. But in case if you want to just close the force:createRecord popup after save and refresh some other related component using the refresh is not possible.    So, is it really impossible? If so, what are current workarounds here? Every nonzero element in a finite ring is either a unit or a zero divisor How to Translate Content type name using i18n module? I am developing a multilingual site that supports English and Norsk bokmal. I have set English as my default language. I wanted to translate the contents and the other things in the site.  My real problem started when I found that I was unable to see the translation of the content type's name. I went to admin/config/regional/translate/translate and translated everything, but still my content type's name is not translated.  I have attached a screenshot of the translation page. Still I don't find a way to translate the content type's name. How can I render an object with an hdr background? I have an object with an hdr for the background. What do I do in Cycles to render the background with my object?  How is this different from an ordinary render in Cycles?  The hdr is a big one, 350MB. Show that   $$\displaystyle1 - \frac{x^2}2\leq\cos x\quad\forall x \in \mathbb{R}$$   Let $f(x) = \cos x - 1 + \frac{x^2}2$; then we need to show that $f(x) \geq 0\quad\forall x \in \mathbb{R}$.  Since $$\lim_{x \to \pm\infty} f(x) = +\infty$$ and $$\operatorname{im}f'' = [0, 2]$$ (as $f''(x) = 1 -\cos x$), it remains to show that $x = 0$ is a minimum for $f(x)$, but I cannot do that because I would need to solve $f'(x) = x -\sin x = 0$, which I cannot. I think it would suffice to show that plugging in $x = 0$ we have that $f'(x) = 0$, and combining it with the fact that the function $f$ is convex, we would be done.    Is it enough? What's a better proof?  EDIT: It just occurred to me that there is a way to solve $f'(x) = 0$. Just observe that $f'(x)$ is an odd function and that $f''(x) \geq 0$ implies that $f'(x)$ is monotonically increasing. Since an odd function, if defined at $x = 0$, must be $0$ there, $x = 0$ is a solution to the equation and it's the only one. Plural nouns in nominal compounds I wonder whether there are rules or guidelines regarding plural nouns in nominal compounds. For example a compound university students list. If there are many lists and many universities is it grammatically correct to say universities students lists? Must all elements be in the plural form or can some be left in singular, even though the meaning is plural? I've seen an expression universities student lists; is it correct? gedit "cannot open display" , on remote computer , using ssh - Ubuntu 12.04 I've tried to render my scene but there's an object that won't show up. I've checked the camera, I've checked the visibility, it isn't hidden and it's showing in the viewport. I feel like I've opened every setting and have achieved nothing. I’m trying to render a book with a cover, flipping pages and stacks of pages. I have no idea how to fix the fact that the book cover doesn’t render. If I create a plane and select both the book cover and the plane and join them with Ctrl+J, the render contains a book cover but it doesn’t turn as it’s rigged to do so because it’s now linked to the plane and loses all the animated properties. As soon as I unjoin them the book cover stops rendering and everything appears as you see it there, a book with binding, pages, but no cover. For the life of me I cannot figure out what’s going on. There's a link to the file here: Commandline shortcut for current directory similar to ~ for home directory? A book on quantum mechanics supported by the high-level mathematics Previous questions confirmed that Hex can last through multiple encounters (assuming my warlock's concentration doesn't get broken by a club to the head or the like) and at higher levels even through a short rest.   My question is how targeting Hex works when trying to keep it up for extended periods of time.   Can I just cast it on nothing and keep it up until a valid target presents itself or is an initial valid target required?   Then later, does changing the target of the Hex require that the original target is brought to 0 HP?   Once the initial target dies does the spell stay active even if I don't immediately choose a new target?  My suspicion from reading the spell is that it needs an initial target, but then from that point on I can just keep it up after that target dies until it either expires or a new target presents itself. Is this correct? Which is the best way to install new hplip versions? Hplip is the software that drives most hp printers. Usually new printers are only supported in newer versions of the software. Canonical doesn't backport new versions packages to older Ubuntu versions, that means that newer drivers are not going to be available in the Software Center of older Ubuntu versions.  As an example yesterday I needed to hook a hp 1005p to a computer running 8.04. I was forced to install a newer hplip than the version available in the repositories. I installed it using the script from the hp page, but I'd like to know other alternatives.  Which is the best (technically, not the easiest) way to install it and why?. How Do You Use An Image As The World Background? Map not loading when using getLegend and showing error for getView() I was able to run my application on using Legend earlier but now I want to update my Legend when scrolling on the map. So I tried to used this code  . And I got the gist of how he is able to do that but when I am trying the same I keeping getting the error var graphicUrl = wmsSource.getLegendUrl(currentResolution);  I think this is mainly due to the wmsSource not declare. But I tried to initialize  seems wmsSource in TileWMS but does not seems to work. var getExtent = function () {     return map.getView().calculateExtent(); } var getProjectionCode = function () {     return map.getView().getProjection().getCode(); }  var updateLegend = function() {     var currentResolution = map.getView().getResolution();     var graphicUrl = wmsSource.getLegendUrl(currentResolution);        const crs = `&amp;CRS=${getProjectionCode()}`;     const bbox = `&amp;BBOX=${getExtent().join(',')}`;     const height = getHeight(getExtent());     const width = getWidth(getExtent());     const heightAndWidth = `&amp;srcwidth=${height}&amp;srcheight=${width}` ;     const legenOptions = &quot;&amp;legend_options=countMatched:true;fontAntiAliasing:true;hideEmptyRules:true;forceLabels:on&quot; ;        var img = document.getElementById('legend');     img.src = `${graphicUrl}${crs}${bbox}${heightAndWidth}${legenOptions}`; }; //Updated Legend End   //View var myview = new ol.View({     center : [8717490.201868,2788422.791843],     zoom : 4 })  var firstSel = document.getElementById(&quot;City&quot;); var secSel = document.getElementById(&quot;Sector&quot;);  //var LayerArray = [baseLayer, firstLayer]  //Map var map = new ol.Map({       target : 'mymap',       view: myview,       layers: [         new ol.layer.Tile({             source : new ol.source.OSM({                 attributions: 'Surveyor Allpication'             })         }),         new ol.layer.Tile({             source : new ol.source.TileWMS({                url: 'http://localhost:8089/geoserver/India/wms',                params: {'LAYERS': 'India:India', 'TILED': true,'TRANSPARENT':true},                ratio: 1,                serverType: 'geoserver',                transition: 0,             })         })       ] }) updateLegend();   This here is my JS &lt;div class=&quot;innerMap&quot;&gt;     &lt;div class=&quot;map&quot; id=&quot;mymap&quot;&gt;&lt;/div&gt;         Legend:     &lt;div&gt;&lt;img id=&quot;legend&quot;/&gt;&lt;/div&gt;     &lt;!--    &lt;div&gt;&lt;img src=&quot;http://localhost:8089/geoserver/wms?REQUEST=GetLegendGraphic&amp;VERSION=1.0.0&amp;FORMAT=image/png&amp;WIDTH=20&amp;HEIGHT=20&amp;LAYER=India%3AIndia&amp;RULE=Agra&quot; /&gt;%Name&lt;/div&gt; --&gt; &lt;!--    &lt;div&gt;&lt;img src=&quot;http://localhost:8089/geoserver/India/wms?SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GetLegendGraphic&amp;FORMAT=image/png&amp;WIDTH=20&amp;HEIGHT=20&amp;LAYER=India%3AIndia&amp;SRS=EPSG%3A4326&amp;STYLES=&amp;SRCWIDTH=742&amp;SRCHEIGHT=768&amp;BBOX=75.4541015625%2C14.21630859375%2C91.7578125%2C31.09130859375&amp;LEGEND_OPTIONS=countMatched:true;fontAntiAliasing:true;hideEmptyRules:true&quot; /&gt; &lt;/div&gt;  --&gt;     &lt;/div&gt;  This is my HTML. How do I make this work? How does a Windows 10 'digital license' activate the OS?