How to tackle Uncaught ReferenceError when an HTMLbuttonElement on clicking cant identify the function targetted
What is the scope of variables in JavaScript?
"I have" vs "I have got" I don't know what is the difference between using "I have got" and "I have" For example:      He's got broad shoulders.    Is it possible to say:      He has broad shoulders.    If yes, so what is the difference? Outlook autocleaning my line breaks and screwing up my email format I'm sending an email using the dotnet framework. Here is the template that I'm using to create the message:  Date of Hire: %HireDate% Annual Salary: %AnnualIncome% Reason for Request: %ReasonForRequest%  Name of Voluntary Employee: %FirstName% %LastName% Total Coverage Applied For:  %EECoverageAmount% Guaranteed Coverage Portion: %GICoveragePortion% Amount Subject to Medical Evident: %GIOverage%   When the messages is received in outlook, outlook tells me "Extra line breaks in this message were removed". And the message displays like this:  Date of Hire: 9/28/2001 Annual Salary: $100,000 Reason for Request: New Hire  Name of Voluntary Employee: Ronald Weasley Total Coverage Applied For:  $500,000 Guaranteed Coverage Portion: $300,000.00 Amount Subject to Medical Evident: $200,000   Note how Outlook incorrectly removes needed line breaks after the name, EECoverageAmount, etc...  It's important for the email recepients to get a correctly formatted email, and I have to assume that some of them use outlook 2003. I also can't assume they will know enough to shutoff the autoclean feature to get the message to format properly.   I have viewed these messages in other mail clients and they display correctly  some more information:   I am using UTF-8 BodyEncoding (msg.BodyEncoding = System.Text.Encoding.UTF8) The msg.Body is being read from a UTF-8 encoded text file, and each line is terminated with a crlf.   Question: How do I change the format of the message to avoid this problem? Is 20 watts of electricity dangerous? I have a few circumstances which invlove someone being shocked with 20 watts of electricity and whether it would be deadly. So here they are:   Would 1000 volts at 20 miliamperes of AC (2MHz frequency) be dangerous or deadly? Would 1000 volts at 20 miliamperes of DC be dangerous or deadly? Would 10 Kilo volts at 2 miliamperes of AC (2MHz frequency) be dangerous or deadly? and Would 10 Kilo volts at 2 miliamperes of DC be dangerous or deadly?   Thanks for everyones help. What is the purpose of LongLength for .Net Arrays? I'm trying to load a field value (machine name: field_theme_image) from a content of node value 3, in "page--front.tpl.php".  &lt;?php   $node=node_load(3);   print $node-&gt;field_theme_image[$node-&gt;language][0]['uri']; ?&gt;   Using the above code I'm not getting full URL value. Please see the image below. I can see the path value in Devel themer. Matrices that commute with all matrices How do I fill a shape with text, like a circle? How do I confine text within a shape such as a circle or triangle?  I don't want text along the perimeter, I would like it to break appropriately at all the inner edges. How to use downloaded fonts with pdfLaTeX on Ubuntu I want to use the  font in my pdfLatex document.  What steps should I do for using a downloaded font   Should I download the TTF or the OpenType version? Where should I store the font? Should any font processing be done? How can pdfLatex find this font?   I am using TexLive 2011 installed in a custom location (/somepath/texlive/2011) on Ubuntu How to filter features in a layer? I am trying to display certain features in a shapefile-based layer using QGIS. I have found the subset function in the properties panel, which does exactly what i want, but is too tedious given that I have to manually sift through a large number of features. Is there a quicker way to do this?  I am using both shapefiles and postGIS best,  dietmar Evaluating logistic regression and interpretation of Hosmer-Lemeshow Goodness of Fit As we all know, there are 2 methods to evaluate the logistic regression model and they are testing very different things  Predictive power: Get a statistic that measures how well you can predict the dependent variable based on the independent variables. The well-known Pseudo R^2 are McFadden (1974) and Cox and Snell (1989).  Goodness-of-fit statistics The test is telling whether you could do even better by making the model more complicated, which is actually testing whether there are any non-linearities or interactions that you have missed.   I implemented both tests on my model, which added quadratic and interaction already:     &gt;summary(spec_q2)      Call:     glm(formula = result ~ Top + Right + Left + Bottom + I(Top^2) +       I(Left^2) + I(Bottom^2) + Top:Right + Top:Bottom + Right:Left,       family = binomial())       Coefficients:                  Estimate Std. Error z value Pr(&gt;|z|)         (Intercept)  0.955431   8.838584   0.108   0.9139         Top          0.311891   0.189793   1.643   0.1003         Right       -1.015460   0.502736  -2.020   0.0434 *       Left        -0.962143   0.431534  -2.230   0.0258 *       Bottom       0.198631   0.157242   1.263   0.2065         I(Top^2)    -0.003213   0.002114  -1.520   0.1285         I(Left^2)   -0.054258   0.008768  -6.188 6.09e-10 ***     I(Bottom^2)  0.003725   0.001782   2.091   0.0366 *       Top:Right    0.012290   0.007540   1.630   0.1031         Top:Bottom   0.004536   0.002880   1.575   0.1153         Right:Left  -0.044283   0.015983  -2.771   0.0056 **      ---     Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1     (Dispersion parameter for binomial family taken to be 1)     Null deviance: 3350.3  on 2799  degrees of freedom     Residual deviance: 1984.6  on 2789  degrees of freedom     AIC: 2006.6  and the predicted power is as below, the MaFadden is 0.4004, and the value between 0.2~0.4 should be taken to present very good fit of the model(Louviere et al (2000), Domenich and McFadden (1975))                                                :  &gt; PseudoR2(spec_q2)     McFadden     Adj.McFadden        Cox.Snell       Nagelkerke McKelvey.Zavoina           Effron            Count        Adj.Count     0.4076315        0.4004680        0.3859918        0.5531859        0.6144487        0.4616466        0.8489286        0.4712500           AIC    Corrected.AIC  2006.6179010     2006.7125925   and the goodness-of-fit statistics:  &gt; hoslem.test(result,phat,g=8)       Hosmer and Lemeshow goodness of fit (GOF) test    data:  result, phat   X-squared = 2800, df = 6, p-value &lt; 2.2e-16  As my understanding, GOF is actually testing the following null and alternative hypothesis:   H0: The models does not need interaction and non-linearity   H1: The models needs interaction and non-linearity  Since my models added interaction, non-linearity already and the p-value shows H0 should be rejected, so I came to the conclusion that my model needs interaction, non-linearity indeed. Hope my interpretation is correct and thanks for any advise in advance, thanks. I was trying to think but cannot figure it out. For instance, if the interaction is small, for instance limited to a windows, the observers in each universe will see that the other goes in reverse. But what if they can start a more meaningful interaction? (for instance, if one observer crosses the window and moves to the other universe, will anything change? why and how fast? (at least at the beginning his thinking will move in the same time arrow than in his universe, but the physical processes around him will still violate the second law? How often did Gandalf return to Hobbiton after the events of The Hobbit? I came across the following problem in a book:  Give a combinatorial proof of  $$ {n \choose 0} + {n \choose 2} + {n \choose 4} + \, \, ... \, = {n \choose 1} + {n \choose 3} + {n \choose 5} + \, \, ...$$ using the "weirdo" method (i.e., where one of the elements is chosen as special and included-excluded -- I'm sure you get the idea).  After days of repeated effort, the proof has failed to strike me. Because every time one of the elements is excluded, the term would be ${n-1 \choose k}$ and not $ {n \choose k}$, which is not the case in either of the sides of the equation. How can I delete Facebook messages I've sent to other Facebook users from their inbox?  I have had a conversation with my friend but now I want to delete my messages from that conversation. Can I have them deleted from my friend's inbox? Unsung hero dilemma This is partly related to  question.  I ran some queries on odata for my work on Stack Overflow, and I have found that my statistics are the following ones:  Accepted answers: 148 Zero score accepted answers: 36 Percentage of total: 24,3%  I probably fit the idea of the Unsong hero badge, as I've mostly been active in  questions, from when it only had around 200 Questions until now.  To get the badge I could either try to get one of my accepted answers downvoted once, that would give me a 25% accept rate; I could also delete 4 of my accepted answers with 1 or more score. That would also give me the badge, but this just seems wrong: You are actually encouraging me to either try to get a down-vote on a good answer, or delete good answers.  So, should I delete good answers to receive a gold badge?  Update: It's not that I care much if I get a badge or not, it's only a badge after all and not why I spend time on Stackoverflow anyways. But it's not ideal [read: problem] that I'm encouraged to delete accepted answers or try to get downvotes to achieve a badge. What is a tty, and how do I access a tty? Determine whether or not a point lies within a rotated rectangle So, I understand that for a NPN transistor to work the emitter-base junction needs to be forward biased and the collector-base junction needs to be reverse biased.  I understand how current flows from the emitter to the base when forward biased, but I can't seem to wrap my head around how it flows from the emitter, through the base, and into the collector.  From what I understand about the depletion region of a PN junction diode, when forward biased, the electrons in the N-type material are repulsed by the negative charge of the supply (say a battery) and the holes in the P-type material are repulsed by the positive charge from the supply, thus narrowing the depletion region and allowing electrons to flow from the N region to the P region.  I also understand that the holes and electrons are attracted to the source charges when reverse biased, widening the depletion region and blocking any electrons from flowing.  What I don't understand is what happens to the depletion region of the collector-base junction that allows electrons to flow from the emitter to the collector even though the collector-base junction is reverse biased.  Take a simple common emitter circuit for example.  I apparently am not cool enough to post pictures yet so you'll have to use your imagination.  So pretend we have the base connected to the positive terminal on a 1v battery (Vbb).  The collector is connected to the positive terminal on a 10v battery (Vcc).  The emitter and both negative terminals are connected to ground.  Also pretend that there is some kind of current limiting.  How does current get from the emitter through to the collector?  I can see how they are at different potentials, but I don't understand how this overcomes the reverse biasing of the collector-base junction.  Can anyone tell me what actually happens at the junction to allow current flow and how changing Vbb will affect that current? For what values of $\theta$ does $\sum_{1}^{\infty} \frac{e^{i n\theta}}{n}$ Converge? I just came across the problem of what happens in the boundary cases of .  More concisely, for what $\theta$ will the following sum converge? $$\sum_{n=1}^{\infty} \frac{e^{ni\theta}}{n}$$ It is well known that this sum will diverge for $\theta=0$ and will converge for $\theta=\pi$. In fact, for any odd multiple of an even root of unity, since we have symmetry, for each line through the origin of the complex plane, we can use the alternating series theorem to show that they converge.  Another idea I had was to split  the sum into imaginary and real parts, and if we can prove each of these converges, then we are all set. So now we must prove that both of the following converge $$\sum_{n=1}^{\infty}\frac{\cos(n\theta)}{n}\space, \space \sum_{n=1}^{\infty}\frac{\sin(n\theta)}{n}$$ Now these can be shown to converge easily by Dirichlet's test for any rational multiple of pi, but what about irrational multiples of pi? I know it has been shown to converge with $\theta=1$, but I don't see how to generalize this. Can jQuery .load append instead of replace?