I have a problem with a  function Execution ,   I  call a function   inside another function but it appears an error like &quot;Invoice is not defined&quot; I tried  some methods but didnt' work , also some value  from objects not appearing on table  when i want to post Any solution for this ? It will helps me so much Thanks   let bill = [  {    name : "Sandra",      price : 50,      payment : "visa",      cardnumber:"1234 xxxx xxxx xxxx"  },   {    name : "Johnson",      price : 200,      payment : "master",      cardnumber:"1234 xxxx xxxx xxxx"  },  {    name : "Maria",      price : 500,      payment : "master",      cardnumber:"1234 xxxx xxxx xxxx"  },  {    name : "Bueno",      price : 1000,      payment : "american-express",      cardnumber:"1234 xxxx xxxx xxxx"  }, ]  let get  = document.querySelector(".get"); let first =  document.querySelector(".first"); let second =  document.querySelector(".second"); let third =  document.querySelector(".third"); let counter = document.querySelector("b"); let add = 0; let table = document.querySelector("table"); table.style.display="none"; let fourth=  document.querySelector(".fourth"); let result = document.querySelector("h2"); let reven = document.querySelector("strong");  GetBills = () =&gt; {   get.addEventListener("click" , ()=&gt; {       table.style.display = "flex";     UpdateDOM();     let invoice= bill[Math.floor(Math.random()* bill.length)];     let store = parseInt(bill[0].price) + parseInt(bill[1].price +                    parseInt(bill[2].price + parseInt(bill[3].price)));       add++;     if(add&gt;bill.length) {       add--;            result.innerHTML = `You have only ${bill.length} Bills,&lt;/br&gt;buy to store to add more` ;         reven.textContent = `Total Revenue from bills:${store} $ `;     } else {       console.log("Very Good")     }   }) } GetBills();  UpdateDOM = () =&gt; {   GetBills();     counter.innerHTML=add;   first.innerHTML =  invoice.name;   second.innerHTML = invoice.price;   third.innerHTML =  invoice.payment;   fourth.innerHTML =  invoice.cardnumber;    if(get) {     console.log("Invoice Transacted")   } else {     console.log("Invoice not transacted")   } }  console.log(UpdateDOM()); body {  font-family:"Lato",sans-serif; display : flex; align-items:center; justify-content:center; background-color:#f4f4f4; flex-direction:column; }  .get { border:1px solid lightgray; padding:10px 50px; background-color:white; box-shadow:2px #fff; margin:20px 0; } &lt;!DOCTYPE html&gt; &lt;html&gt;   &lt;head&gt;     &lt;meta charset="utf-8"&gt;     &lt;meta name="viewport" content="width=device-width"&gt;     &lt;title&gt;repl.it&lt;/title&gt;     &lt;link href="style.css" rel="stylesheet" type="text/css" /&gt;   &lt;/head&gt;   &lt;body&gt;     &lt;h1&gt; Get latest Bill &lt;/h1&gt; &lt;button class="get"&gt;Get&lt;/button&gt; &lt;table &gt;   &lt;tr&gt;     &lt;th&gt;Name&lt;/th&gt;     &lt;th&gt;Price&lt;/th&gt;      &lt;th&gt;Payment&lt;/th&gt;             &lt;th&gt;Card Number&lt;/th&gt;   &lt;/tr&gt;   &lt;tr&gt;     &lt;td class="first"&gt;&lt;/td&gt;     &lt;td class="second "&gt;&lt;/td&gt;     &lt;td class="third"&gt;&lt;/td&gt;             &lt;td class="fourth"&gt;&lt;/td&gt;    &lt;/tr&gt;     &lt;/table&gt;     &lt;h1&gt;     All Bills: &lt;b&gt;0&lt;/b&gt;;     &lt;h2&gt;       Result     &lt;/h2&gt;     &lt;h3&gt;     &lt;strong&gt;&lt;/strong&gt;     &lt;/h3&gt;     &lt;/h1&gt;     &lt;script src="script.js"&gt;&lt;/script&gt;   &lt;/body&gt; &lt;/html&gt;
What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?
Start a longtable in Latex at top of next page I want to use the longtable environment for a table. However, I do not know how to place it at the top of the next page, as I can do with the table environment. Do you know how to do it? Can someone please give me a tip how to show that for distinct prime $p,q$ that $\mathbb{Q}(\sqrt{p},\sqrt[3]{q})=\mathbb{Q}(\sqrt{p}\sqrt[3]{q})$ and how to find the minimal polynomial of $\sqrt{p}\sqrt[3]{q}$ over $\mathbb{Q}$ ? Does the lack of sleep affect my health? In the past month, I've been really busy with the university and stuff, and I don't sleep as much as I used to. I usually sleep 4-5 hours a night.  I haven't been doing that extensively ( I always kept a good sleeping routine), but can the lack of sleep affect my health on the long term ? Should I submit https:// and http:// in Google Search Console both with and without the www? In my site I'm redirecting everything (http://, http://www., https://) to https://www.example.com.  Google webmaster tools says: Make sure you add both "www" and "non-www" versions for your site. Also, if you use the HTTPS protocol, add those variations as well.  So I've added all the FOUR versions to google webmaster tools. Is this a correct process? How can I download a Flash video from a website? External monitors show blank screen until restart MacBook Pro (15-inch, 2016) with 2 USB-C to HDMI adapters. The setup works great if I start up in that configuration.   If I connect the adapters while the machine is running or simply sleeping, one of the monitors will never get a signal and stay in low power mode. The OS sees the monitor, it shows in the display arrangement settings and I can move the mouse into it, but until I restart, I can't see anything on it.  Once I have restarted I can let the machine sleep or whatever, and the display still works unless I disconnect the adapter. As soon as I do that a restart is required to use it again.   Using MacOS Sierra (10.12.4)  Using this adapter: Is TV harmful to my infant's development? Systems of linear differential equations - eigenvectors Active Directory: Is it required that the "A" record for a domain point to a Domain Controller? Why is orbital angular momentum not 0 when spin and linear momentum are not collinear?   Why can it be 0 when spin and linear momentum are parallel?  Like in the example of a scalar field at rest decaying into an electron and a positron via interaction $\frac{1}{2}g\phi \bar{\Psi}\Psi $   If spin is along x axis and three-momenta is along z axis, decay rate will be 0 if two spins are opposite because orbital momentum is not 0 after decaying. Is the expression      All women who are mothers of daughters are here.   correct? I mean every woman who has at least one daughter is here. If there are 5 points on the surface of a sphere, then there is a closed half sphere, containing at least 4 of them.  It's in a pigeonhole list of problems. But, I think I have to use rotations in more than 1 dimension.  Regards How do AD/AP boosts apply to abilities with long cast times, channels or animations? For example: I'm playing Janna in bot lane with Caitlyn. Caitlyn begins channeling Ace in the Hole to finish off an enemy. Will the AD buff from my Eye of the Storm apply extra damage to Caitlyn's ultimate if I cast at after she begins channeling? Similarly, if I see Caitlyn rev up to shoot Piltover Peacemaker, can I boost her AD after the animation begins? (If I remember correctly, Piltover Peacemaker has a quick cast time, but the spell animation is rather long, so it may be a different circumstance from the first example.)  Basically, I want to know if the AD is calculated at the start of a cast, at the end of a cast, or when the ability actually creates and object on the battlefield. Suppose that $f(z)$ is analytic function in the disk $|z|\le R$ and $A(r)=\max_{|z|=r}Re(z)$ then prove that $r&lt;R$  $$\max_{|z|=r}\left|\frac{f^n(z)}{n!}\right|\le \frac{2^{n+2}R}{(R-r)^{n+1}}\{A(r)+|f(0)|\}$$  MY attempt   Using Cauchy generalized integral formula   $f^{(n)}(z_0)=\frac{n!}{2\pi i}\int _c\frac{f(z)dz}{(z-z_0)^{n+1}}$  then $\max_{|z|=r}\left|\frac{f^n(z)}{n!}\right|=\left|\max_{|z|=r} \frac{1}{2\pi i}\int _c\frac{f(z)dz}{(z-z_0)^{n+1}}\right|$  and i think we can solve by using Borel caratheodory theorem  Let $f(z)$ be holomorphic function on $|z|\le R$ and let $M(r)=\max_{|z|=r}|f(z)|$ and $A(r)=\max_{|z|=r}Re f(z)$ then  for $0&lt;r&lt;R$  $$ M(r)\le \frac{2r}{R-r}A(R)+\frac{R+r}{R-r}|f(0)|$$  from here how to processed ? I'm trying to install a service using InstallUtil.exe but invoked through Process.Start. Here's the code:  ProcessStartInfo startInfo = new ProcessStartInfo (m_strInstallUtil, strExePath); System.Diagnostics.Process.Start (startInfo);   where m_strInstallUtil is the fully qualified path and exe to "InstallUtil.exe" and strExePath is the fully qualified path/name to my service.  Running the command line syntax from an elevated command prompt works; running from my app (using the above code) does not. I assume I'm dealing with some process elevation issue, so how would I run my process in an elevated state? Do I need to look at ShellExecute for this?  This is all on Windows Vista. I am running the process in the VS2008 debugger elevated to admin privilege.  I also tried setting startInfo.Verb = "runas"; but it didn't seem to solve the problem. How do I get attention for old, unfixed bug reports and feature requests without official responses here on Meta? How to get Microsoft Search to index common file types like .pdf and .pub I'm trying to get Windows Search (4.0) to index PDFs and .pub, .doc, etc. files.  The files are on an XP Pro PC acting as a file server. But I don't have MS Office, etc. installed (no need, trying to keep it "slim and trim") but WS 4.0 is doing the indexing of those files and not indexing .pdf and .pub.  I've found a few  (from Foxit PDF reader) rated 3/5 and only support WS 2.0 or 3.0.  Looking for other solutions and also a way to index .pub files. I wonder  whether there is a function $f\colon\Bbb R\to\Bbb R$ with the folowing characteristic?   for every two real numbers $\alpha,\beta,\alpha\lt\beta$,  $$\{f(x):x\in(\alpha,\beta)\}=\Bbb R$$   I can't  say such a function does not exist, neither can I construct a example  Thanks a lot! download file on form submission I have created a form which has only a submit button. In the submit function I am generating csv file and saving it to the files folder using fputcsv function.  But Now I need extra functionality of submit. After saving the file it should download the file also.  How to do this? Any one have some idea about this? The Safari app has disappeared from my iPhone? I can't find the safari icon on my iphone 4?  I have tried resetting home screen layout and that doesn't work.  My restrictions button is 'on' and it asks for a password for this button.  I don't have a password.  Can you help? Thanks,