Min Max Normalization
What's the difference between Normalization and Standardization?
Cycles : shadows on smooth shaded mesh, strange behavior I'm using the caption package.  In the List-Of-Figures I get only the numbers, but I also want to have the prefix. It currently looks like that:     List of Figures   1 Caption of Figure 1........1   2 Caption of Figure 2........9     And I want it to look like:     List of Figures   Figure 1: Caption of Figure 1...1   Figure 2: Caption of Figure 2...9     The same format is already used for the captions themselves. What's the incentive to flag duplicates? I have a web service in C# and would like to have a nested inner class, that abstracts away the session collection, something like this:     public class Service : System.Web.Services.WebService {     [WebMethod]     public string Foo(string ticket)     {         SessionPool.getSession(ticket);     }      private class SessionPool      {         public static Session getSession(string ticket)         {             // this is what i want to do, but I can't access Context             return (Session)Context.Session[ticket];         }     } }    Is it possible to access the HTTP context of the WebService class via a nested class? If not, is there way I can store the reference to it? How do I evaluate these fork() calls with the && and || operators in C? Stack Overflow reputation in CV Should I mention my Stack Overflow (and other Stack Exchange sites) reputation in my CV while applying for a post-graduate position? I have a trained logistic regression model that I am applying to a testing data set. The dependent variable is binary (boolean). For each sample in the testing data set, I apply the logistic regression model to generates a % probability that the dependent variable will be true. Then I record whether the acutal value was true or false. I'm trying to calculate an $R^2$ or Adjusted $R^2$ figure as in a linear regression model.  This gives me a record for each sample in the testing set like:  prob_value_is_true         acutal_value    .34                          0    .45                          1    .11                          0    .84                          0     ....                        ....             I am wondering how to test the accuracy of the model. My first attempt was to use a contingency table and say "if prob_value_is_true > 0.80, guess that the actual value is true" and then measure the ratio of correct to incorrect classifications. But I don't like that, because it feels more like I'm just evaluating the 0.80 as a boundary, not the accuracy of the model as a whole and at all prob_value_is_true values.  Then I tried to just look at each prob_value_is_true discrete value, as an example, looking at all samples where prob_value_is_true=0.34 and measuring the % of those samples where the acutal value is true (in this case, perfect accuracy would be if the % of samples that was true = 34%). I might create a model accuracy score by summing the difference at each discrete value of prob_value_is_true. But sample sizes are a huge concern here, especially for the extremes (nearing 0% or 100%), such that the averages of the acutal values are not accurate, so using them to measure the model accuracy doesn't seem right.  I even tried creating huge ranges to ensure sufficient sample sizes (0-.25, .25-.50, .50-.75, .75-1.0), but how to measure "goodness" of that % of actual value stumps me. Say all samples where prob_value_is_true is between 0.25 and 0.50 have an average acutal_value of 0.45. Is that good since its in the range? Bad since its not near 37.5% (the center of the range)?  So I'm stuck at what seems like should be an easy question, and hoping someone can point me to a resource or method to calculate an accuracy stastic for a logistic regression model. Can I test if a regex is valid in C# without throwing exception What should main() return in C and C++? What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related: Simplest or nicest proof that $1+x \le e^x$ How to call a function in a Twig file a) There's a radially symmetric charge density $\rho(r)$ centered around the origin. Determine the dipolemoment of that charge density. b) Let $\rho(r)$ be an arbitrary charge density now. Under what circumstances does the dipole moment of the displaced charge density  $\rho '(\vec{r}) = \rho (\vec{r}-\vec{b})$ differ from the one not displaced at all.  Here were my ideas so far: a) Just thinking about the situation it has to be zero, right? I mean, since there's no real dipole. But how do I show that mathematically? I was thinking of just going like this (it may be wrong): Let the charge density be $\rho (r)=kr$, then we can get the charge q by integrating: $$q=4\pi \int_0^R kr\cdot r^2dr=\pi k R^4$$ I'm looking at the charge distribution as a spherical electron cloud with radius $R$. Then, since $p=qd$ and $d$ is zero because there are no two different charges the dipole moment is zero. Is that sufficient as an answer? b) I don't know how to approach this one. My guess is that its dipole moment is also zero because we're only looking at a displacement here. Anyone got any idea? I would appreciate any advice on this. I understand why the Empire would want to start using more than one genetic template to create clone troopers, but why did it start using non-clone troopers instead of just continuing the cloning program?  It seems that with cloning they were able to use a training program (and genetic manipulation) that gave them completely loyalty (other than when the Kaminoan rebellion, where the Kaminoans had sabotaged the training programs).  Why stop using such troops and start using people that might question orders or aren't as easily controlled as clones were? Advantages of using different metric signatures in relativity and QFT I am studying General Relativity and some basic QFTs. It bothers me a lot that different books use different metric signatures, i.e. $(-+++)$ and $(+---).$ Can anyone tell me the advantages of using both of them, or why some people prefer the former while some prefer the latter? I would like to know which one should I while tackling different problems. Suppose I have a question in my mind that I think is answerable but because I don't already know the answer, I'm not sure how to express in a way that makes it clear and definitively answerable. I suspect that someone more knowledgable than me would understand what I'm trying to get at though and could help me word the question properly.  Is there a good place to find this sort of help? What's the arc length of an implicit function? While an explicit function $y(x)$'s arc length $s$ is easily obtained as  $$s = \int \sqrt{1+|y'(x)|^2}\,dx,$$   is there any formula for implicit functions given by $f(x,y) = 0$? One can use the implicit differentiation $y'(x) = -\frac{\partial_y f}{\partial_x f}$ to obtain  $$s = \int\sqrt{1 + |\partial_y f / \partial_x f|^2}\,dx,$$  but that still requires (locally) solving for $y(x)$. Is there any formulation that does not require this, e.g. another implicit equation involving $s$?    Thoughts so far:  One could rewrite $s$ as  $$s = \int |\nabla f|\, |\partial_x f|dx,$$  or symmetrize to  $$s = \int |\nabla f|\, \underbrace{(|\partial_x f|dx + |\partial_y f|dy)}_{(*)}/2$$  where $(*)$ might be strongly related to $|df|$ I guess (though it's not identical due to the $|\cdot|$), but then? I would like to know where gravity gets its energy to attract physical bodies?  I know that the law of conservation states that total energy of an isolated system cannot change. So gravity has to be getting its energy from somewhere, or else things like hydropower plants wouldn't be able to turn the power of the falling water into a spinning rotor.  Just to be clear, Lets create an example:  Lets say we have two objects with equal mass close to each other. So gravity does its job and it pulls each other closer, this gets turned into kinetic energy. This is where I'm lost. According to the law of conservation energy can't be created or destroyed and the kinetic energy comes from the gravitational pull so where does the gravitational pull gets its energy.  If that energy isn't being recycled from some where else then that means you have just created energy, therefore breaking the law of conservation. Group member cannot write even with write permission Often, when making a command block contraption, you need to set an entity's data tag. These tags can sometimes be very long, with many layers of nested curly and square brackets. For example, this is the command to summon a villager with a single custom trade:  /summon Villager ~ ~ ~ {Profession:3,Career:2,Offers:{Recipes:[{buy:{id:minecraft:diamond,Count:6b}},sell:{id:minecraft:diamond_hoe,tag:{ench:[{id:16s,lvl:10s}]}]}}   The single-line command block interface of Minecraft makes it incredibly difficult to find and fix errors, especially when it comes to mismatched brackets. In fact, for illustration purposes, I put an error in the above command.  What techniques can I use to find and fix unbalanced square or curly brackets when writing long and complicated data tags? $(a^{2^n}+1,a^{2^m}+1)=1 or 2$ Prove that if $m\not =n,a$ are positive integers then $(a^{2^n}+1,a^{2^m}+1)$ is $1$ if $a$ is even and $2$ if $a$ is odd.    I solve the problem in the following way: I assume that $m&gt;n$ then  $$a^{2^m}+1=a^{2^m}-1+2$$ With this expression if I take a divisor prime $p$ of $a^{2^n}+1$ then if $p|a^{2^m}+1$ this prime must divide 2 and the result follows.   But, how can I prove this statement without use of primes? This exercise appears before the concept of prime is introduced then I prefer do not use it.    Any idea?   Thanks!