How to clear setInterval function? `#bulb{width:100px; height: 100px; border: 1px #333 solid; margin: 20px;}     #bulb.active{background: yellow;}`   &lt;button type="button" id="toggle"&gt;toggle&lt;/button&gt;  &lt;button type="button" id="getState"&gt;getState&lt;/button&gt;  &lt;button type="button" id="off"&gt;off&lt;/button&gt;  &lt;button type="button" id="on"&gt;on&lt;/button&gt;  &lt;button type="button" id="blink"&gt;blink&lt;/button&gt;   &lt;div id="bulb"&gt;&lt;/div&gt;         var $ = function(el){             return document.getElementById(el);         };         var bulb = $('bulb');         var lightBulbAPI = {             toggle : function(){                 if(bulb.className == 'active'){                     bulb.className = '';                     }else{                     bulb.className = 'active';                 }             },             getState : function(){                 if(bulb.className == 'active'){                     console.log("ON");                   }else{                     console.log("OFF");                  }             },             off : function(){                 if(bulb.className == 'active'){                     bulb.className = '';                     }                 bulb.className = '';                 clearInterval();             },             on : function(){                 bulb.className = 'active';             },             blink : function(){                 setInterval(function(){                     console.log(this.off);                     if(bulb.className == 'active'){                         bulb.className = '';                         }else{                         bulb.className = 'active';                     }                 }, 300);             }         };          $('on').addEventListener('click', lightBulbAPI.on);          $('off').addEventListener('click', lightBulbAPI.off);             $('getState').addEventListener('click', lightBulbAPI.getState);           $('toggle').addEventListener('click', lightBulbAPI.toggle);          $('blink').addEventListener('click', lightBulbAPI.blink);
Stop setInterval call in JavaScript I am using setInterval(fname, 10000); to call a function every 10 seconds in JavaScript. Is it possible to stop calling it on some event?   I want the user to be able to stop the repeated refresh of data.
Single word for people who are like "a frog in the well" Is there a single word describing someone who is like a frog in a well? The frog believes the well is the entire world. How can I describe people who think that their own small environment is the entire world? What is the optimal path between $2$ fixed points around an invisible obstructing wall? Missing files (basic sty files) when TEXINPUTS is set Below is my files tree:  .../Doc/Tex/book.tex .../Doc/Tex/images/im.jpg .../Doc/TexBase/myTemplate.sty .../Doc/TexBase/baseImages/logo.jpg   On Windows it was enough to set TEXINPUTS evironment variable with some paths and then I was able to compile with:  pdflatex Tex/book.tex   my document book.tex which uses package myTemplate.sty And now im trying to do teh same on Ubuntu 18.04. When i move all things to one folder (book.tex and myTemplate.sty and folder with images) then compilation is succesfull. But i would like to keep my foder structure as it is more clearly. So i tried to export TEXINPUTS:  export TEXTINPUTS=.:./TexBase/   but my compilation fail because of unfound many sty-files wchich are part of texlive-latex-extra that i already installed. When i UNSET this variable - it compiles ok. So my question is: Am i correctly set TEXINPUTS variable? Maybe i should add some other paths? What is the path to those "latex basic STY files"? I wanted to create a WP plugin. So I requested and my request was approved by WordPress.org But I don't want to develop that plugin anymore. How can I delete the repository forever or request its deletion. changed primary email in google account. how to log in? I added gmail to my google account. Now when i try to log into stack exchange using google it prompts me to create a new account instead of using the existing.   The google account is still the same but google changed the primary email adress.  How can i log in again? C# has the keyword called . VB.NET lacks this keyword. How have the Visual Basic programmers gotten around the lack of this keyword? Do they implement they own iterator class?  Or do they try and code to avoid the need of an iterator?  The  keyword does force the compiler to do some coding behind the scenes.  has a good example of that. Multiple letters without spacing in Math Let $A$ be a diagonalizable matrix and $\lambda$ be an eigenvalue of A. Prove that rank($\lambda I - A$) = rank(($\lambda I - A)^2$). Let $A$ be a diagonalizable matrix and $\lambda$ be an eigenvalue of A. Prove that rank($\lambda I - A$) = rank(($\lambda I - A)^2$).  The hint they provided is that for any invertible matrix B, rank(AB) = rank (A) and rank(BA) = rank(A). What is Ubuntu's status on the Meltdown and Spectre vulnerabilities? Any questions relating to status updates, or asking if anything is going to be patched for these vulnerabilities should be closed as duplicates of this question.    are in the news right now and sound pretty severe. I don't see any security updates from Ubuntu that cover these vulnerabilities.  What is Ubuntu doing about these vulnerabilities, and what should Ubuntu users be doing?  These are CVE-2017-5753, CVE-2017-5715 and CVE-2017-5754. I'm married have a job with stable income.I have 2 kids. I have applied for UK visit visa about 7 years ago and was refused. I can't remember what exactly was the reason for refusal.  I want to travel for tourism to spend 9 days and my budget is around 1300GBP for the trip. I would be spending part of my annual leave in the UK. I have the following people in UK: Mother, Dad, Sister(she's married), Brother (married), Uncle and Aunt.  I'm travelling alone since my wife is pregnant. I haven't travelled since I was in school then.  I will be on my yearly 21 days annual leave during which I will be spending 9days in UK. I can't think of anything more about my circumstance.  So what should a cover letter look like?  secondly I have just 1 account where my salary is paid in monthly and my savings.I will be submitting the 6 months bank statement for the account.  Additional question:  In the income &amp; expenditure where one is asked to indicate if I have income and savings,should I click Yes or No. And if Yes should state the ending balance as at the time of my application. What are the minimum requirements to run Windows 10? I am looking to upgrade my system to Windows 10 RTM, but I'm afraid of losing performance.  I researched on the site but found details (maybe I have not sought duty) on the hardware minimum.  What are the minimum and recommended requirements for running Windows 10 RTM? We have a fairly big MS SQL 2008R2 database that resides on a SSD drive. The drive itself only has ~110Gb of space, and the database files are the only files on the drive.  The database is in "Simple" recovery mode, and only has two files, .MDF and .LDF.   The disk is now nearly full: the MDF is currently 109Gb in size. However, SSMS tells me there's nearly 18Gb of "Space Available" (in the 'General' properties page), and if I go through the motions of Shrinking the file it also tells me there's 18Gb of space free. SSMS also tells me the database size is around 132Gb, which surprises me - that wouldn't fit on the drive!  From what I've read, shrink is a really bad idea. However, I'm starting to see replication errors (could not allocate space for object). We've previously tried shrinking the database, but within a few hours the file was back to it's original size.  How should we proceed - given there's apparently 18Gb of free space, should SQL automatically use that free space? Or is it as simple as: we really need more disk space? We are going to change the IP address of our SharePoint Servers can any one point out the RISK and IMPACT CKEditor buttons not showing I'm using Drupal CKEditor module 7.x-1.13 and CKEditor 4.3.2. Everything is installed and appears to work fine... except that there are some buttons that don't appear despite being configured to do so, notably "Select All" and the justify left/right/centre/justified buttons. Here are the buttons as configured:    And here are the buttons as they appear: number of ways to make $2.00 Assuming I have an ArrayList  ArrayList&lt;MyClass&gt; myList;   And I want to call toArray, is there a performance reason to use  MyClass[] arr = myList.toArray(new MyClass[myList.size()]);   over  MyClass[] arr = myList.toArray(new MyClass[0]);   ?  I prefer the second style, since it's less verbose, and I assumed that the compiler will make sure the empty array doesn't really get created, but I've been wondering if that's true.  Of course, in 99% of the cases it doesn't make a difference one way or the other, but I'd like to keep a consistent style between my normal code and my optimized inner loops... Is there a word for saying "um" or "uh", etc, during speaking?  Or a word for "um" and "uh", etc? How to reduce title bar height? Is there a way to see what were the Candidate Execution Plans generated by the Query Optimizer? The Query Optimizer creates more than one possible execution plan. How can I see all the plans generated before the executed one was chosen?   :     The Query Optimizer must analyze the possible plans and choose the one   with the lowest estimated cost.   Please, notice that I'm not talking about , I'm talking about candidate execution plans, the ones that were generated but not selected to be executed.  According to Benjamin Nevarez's article :     The generation of candidate execution plans is performed inside the   Query Optimizer using transformation rules, and the use of heuristics   limits the number of choices considered in order to keep the   optimization time reasonable. Candidate plans are stored in memory   during the optimization, in a component called the Memo.   Would it be possible to visualize the candidate plans rendered the way we can ? Show that the set of all finite subsets of $\mathbb{N}$ is countable. Show that the set of all finite subsets of $\mathbb{N}$ is countable.   I'm not sure how to do this problem. I keep trying to think of an explicit formula for 1-1 correspondence like adding all the elements in each subset and sending that sum to itself in the natural numbers, but that wouldn't be 1-1 because, for example, the set {1,2,3} would send to 6 and so would the set {2,4}.  Multiplying all the elements in each subset and sending that product to itself in the natural numbers wouldn't work either since, for example, {2,3} would send to 5 and so would the set {1,5}. Any ideas?