The electric field strength in a region is given by $\vec{E}=\dfrac {x\widehat{i} +y\widehat {j}}{x^{2}+y^{2}}$.  In order to calculate the net charge inside a sphere of radius $a$ centred at origin, I evaluated $\vec{\nabla }\cdot \vec{E}$ using quotient rule of differentiation as   $$\frac{(x^2+y^2)-2x(x)}{(x^2+y^2)^2} + \frac{(x^2+y^2)-2y(y)}{(x^2+y^2)^2} = \frac{(y^2-x^2)+(x^2-y^2)}{(x^2+y^2)^2}=0 = \frac{\rho}{\epsilon_{0}}\\ \Downarrow \\ \rho=0$$(vector form of gauss law). So this gives charge inside the sphere as 0(which is incorrect).  However, on using the integral form of gauss law equation, and noting that the field is radial and spherically symmetric,  $$\int \vec {E}\cdot \vec{dA} =|E|\times4 \pi a^2 = \frac{1}{a} \cdot 4\pi a^2=4\pi a = \frac{q}{\epsilon_{0}} \implies q=4 \pi a \epsilon_{0}$$ which is correct.  Why is the first method incorrect?
I just started in Griffith's Introduction to electrodynamics and I stumbled upon the divergence of $\frac{ \hat r}{r^2} \equiv \frac{{\bf r}}{r^3}$, now from the book, Griffiths says:  Now what is the paradox, exactly? Ignoring any physical intuition behind this (point charge at the origin) how are we supposed to believe that the source of $\vec v$ is concentrated at the origin mathematically? Or are we forced to believe that because there was a contradiction with the divergence theorem? Also how would the situation differ if $\vec v$ was the same vector function but not for a point charge? Or is it impossible?
Does there exist a bijective $f:\mathbb{N} \to \mathbb{N}$ such that $\sum f(n)/n^2$ converges? We know that $\displaystyle\zeta(2)=\sum\limits_{n=1}^{\infty} \frac{1}{n^2} = \frac{\pi^2}{6}$ and it converges.        Does there exists a bijective map $f:\mathbb{N} \to \mathbb{N}$ such that the sum $$\sum\limits_{n=1}^{\infty} \frac{f(n)}{n^2}$$ converges.      If our $s=2$ was not fixed, then can we have a function such that $\displaystyle \zeta(s)=\sum\limits_{n=1}^{\infty} \frac{f(n)}{n^s}$ converges Damage reduction and damage resistance: how to calculate? Assume a character has both damage reduction and damage resistance vs an incoming attack.  One example of damage reduction is the Heavy Armor Master feat:     While you are wearing heavy armor, bludgeoning, piercing, and slashing damage that you take from non magical weapons is reduced by 3.   One example of damage resistance is the blade ward cantrip:     You extend your hand and trace a sigil of warding in the air. Until the end of your next turn, you have resistance against bludgeoning, piercing, and slashing damage dealt by weapon attacks.    Let's assume a character with both effects above is hit by a nonmagical weapon attack dealing slashing damage. The attack deals 10 damage. What happens:   Damage reduction applies reducing damage to 7, then damage resistance (rounds down). Character takes 3 damage. Damage resistance applies, halving to 5, then damage reduction takes it to 2 damage. Java2D Performance Issues I'm having performance oddities with Java2D. I know of the sun.java2d.opengl VM parameter to enable 3D acceleration for 2D, but even using that has some weird issues.   Here are results of tests I ran:  Drawing a 25x18 map with 32x32 pixel tiles on a JComponent Image 1 = .bmp format, Image 2 = A .png format  Without -Dsun.java2d.opengl=true  120 FPS using .BMP image 1 13 FPS using .PNG image 2  With -Dsun.java2d.opengl=true  12 FPS using .BMP image 1 700 FPS using .PNG image 2  Without acceleration, I'm assuming some kind of transformation is taking place with every drawImage() I do in software, and is pulling down the FPS considerably in the case of .PNG. Why though, with acceleration, would the results switch (and PNG actually performs incredibly faster)?! Craziness!  .BMP Image 1 is translated to an image type of TYPE_INT_RGB. .PNG Image 2 is translated to an image type of TYPE_CUSTOM. In order to get consistent speed with and without opengl acceleration, I have to create a new BufferedImage with an image type of TYPE_INT_ARGB, and draw Image 1 or Image 2 to this new image.   Here are the results running with that:  Without -Dsun.java2d.opengl=true  120 FPS using .BMP image 1 120 FPS using .PNG image 2  With -Dsun.java2d.opengl=true  700 FPS using .BMP image 1 700 FPS using .PNG image 2  My real question is, can I assume that TYPE_INT_ARGB will be the native image type for all systems and platforms? I'm assuming this value could be different. Is there some way for me to get the native value so that I can always create new BufferedImages for maximum performance?   Thanks in advance... Installing titling.sty onto an offline Windows machine I'm trying to compile a file for which I need titling.sty:  ! LaTeX Error: File `titling.sty` not found.  The two biggest issues are 1) it's on a Windows machine (I'm really only &quot;comfortable&quot; with the Unix command line) and 2) the machine cannot be connected to the internet (so automatic approaches are impossible). Assuming the error means I'm missing a package and following some related advice (e.g., ), I downloaded the file , transferred it to the offline machine, and unzipped it, then tried to run: latex titling.ins  But this gave me an error (given I can't copy-paste, I'm including what I think may be relevant):  ******************************************************** * No Configuration file found, using default settings. * ******************************************************** ! ************************************************** * Could not find your \batchfile=titling.ins. **************************************************. \processbatchFile ...****************************}                                                  \fi \else \ifDefault \Msg ... 1.1092 \process@first@batchfile  I have no idea how to proceed from this. How can I install titling.sty on this machine? Where is the icon used in this dialogue box? Where on my disk can I find the icon used in this dialogue box in OS X？    It may be Security.icns in OS X 10.7.3    I cannot find it in:   /System/Library/CoreServices/CoreTypes/Contents/Resources There are only LockedIcon.icns and UnlockedIcon.icns in this folder who looks like the icon in the dialogue box,the size of the icon in the dialogue box is 128x128px, but LockedIcon.icns and UnlockedIcon.icns is 32x32px.   lockedIcon.icns    So they are not the same icon.   /System/Library/CoreServices/Finder.app/Contents/Resources/ /System/Library/CoreServices/Problem Reporter.app/Contents/Resources /Applications/System Preferences.app/Contents/Resources /Applications/Utilities/Keychain Access.app/Contents/Resources /System/Library/CoreServices/Certificate Assistant.app/Contents/Resources/ ID for Contact portion of Person Account Is it possible to get the ID of a Contact which is part of a Person Account?  I have a custom object which has a custom field referencing the Person Account, though it seems to be referencing the Contact directly. I have created a button which I am using to pass the ID into a Visualforce Page.  With the Insert Field drop-down on the create/edit button page I can put in {!Account.Id} or {!Contact.Id} but neither of these work. The Account ID is placed in the URL but is not the correct ID and the Contact ID is blank, which I assume is because the button is on a Person Account page and not a Contact Page. Is 3+1 spacetime as privileged as is claimed? I've already read all the pages in this site trying to find the answer to my problem but no one seems to be the right one form me...  First I explain you the kind of data I'm working with...  Let's say that I have an array vector with several names of city, one for each of 300 users. I also have another array vector with scores response to a survey of each user or a continuous value for each user.  I would like to know if exist a correlation coefficient that compute the correlation between these two variables so, between a nominal and a numeric/continuous or ordinal variables.  I've searched on the Internet and in some pages they suggest to use the contingency coefficient or Cramer's V or Lambda coefficient or Eta . For each of this measure the just say that they could be applied for such data in which we have a nominal variable and interval or numerical variable. The thing is that searching and searching, trying to understand every one of them, sometime is written or watching the examples that they are reasonable to use them if you have dichotomous nominal variable, except for Cramer's V, other time is not written any requirement for the type of data. A lot of other pages say that is right to apply regression instead, that is right, but I would just simply like to know if there is a coefficient like pearson/spearman for this kind of data.  I also think that is no so properly to use Spearman Correlation coeff since the cities are not sortable.  I have also built the function of Cramer'sV and Eta by myself (I'm working with Matlab) but for Eta they don't talk about any p-value to see if the coefficient is statistically significant...  In the matlabWorks site there is also a nice toolbox that says to compute eta^2 but the kind of input it needs is not understandable.  Is here someone that have done a test like mine? If you need more detail to understand the kind of data I'm using just ask me and I'll try to explain you better. Duo of alien xenologists study couple of Terran explorers, later save them Draw a bivariate normal distribution in TikZ For a small class I want to draw a bivariate normal distribution and show where the means from the two variables meet in the space. Has anyone done this in TikZ? Which infinity is meant in limits? For example, when we write $\lim_{x\rightarrow \infty} f(x)$ - which infinity is meant and why? Countable? If uncountable - which and why? $\sum_{k=1}^nH_k = (n+1)H_n-n$. Why? What is the safest way to move the iTunes Library from one hard drive to another? This may happen later with my iMac, but right now it is happening for my iTunes on PC.  The PC had 60GB of partition to install Windows 7, and right now it is down to about 2GB of free space.  All iTunes purchases, including Music and Movies, are downloaded to  C:\Users\mike\Music\iTunes\iTunes Media\Music  C:\Users\mike\Music\iTunes\iTunes Media\Movies   which will make the C: drive have less and less free space.  (and C: will be more healthy if it has at least a couple of GB of free space).  What is the safest, most proper way to migrate all the media to an external hard drive J: ?  On J:, the path might be:  J:\iTunes\iTunes Media\Music   or  J:\iTunes Media\Music   My guess is that we can change the folder in iTunes, but won't iTunes go to that folder or create it, and find nothing, and index everything wrong?  So, should an exact copy of C:\Users\mike\Music\iTunes\iTunes Media be made as J:\iTunes Media first (probably 30GB of files copying), and then start iTunes and change the preference for the folder to the J: one?  Is there a standard or official method to do this? How can I read a large text file line by line using Java? Detailed Bathymetric/Bathymetry contour data (0-200M) How To Get Command Blocks Talking in Chat I need a way for a command block to say things in chat when it is powered, or more preferably whenever someone spawns into the world. Opposite of "straight talk" What is the opposite for the straight talk idiom? How do I best call the activity when someone makes a very long preamble before he says what he wants? How do I determine the size of my array in C? How do I determine the size of my array in C?   That is, the number of elements the array can hold? So today I woke up and noticed new item in inventory which was a booster pack containing 3 cards from L4D 2. From what I see on market these booster packs are new (graph only shows up to 19 of June). No matter the game it seems to always contain 3 cards. There are two actions I can do with it: unpack or sell. There is fancy animation when you unpack the booster ;)    I'm not exactly sure why I got it, I have few guesses:   I got new badge, power player - this could give me a booster? Because of new badge I reached level 10 - maybe every couple levels there are gifts? It just dropped randomly for everyone?   Maybe together we could rule out above guesses. It's also interesting from the point of market, to estimate how many boosters are there. With some games they seem to be more valuable than 3 cards separately, but that maybe only initial confusion. Often when I mistype a command such as ls (e.g. I hit ENTER before I type 's') there is a long (~2s) delay after the terminal displays:  bash: l: command not found...   I can understand the reasons for a similar delay after an incorrect password is entered, per . But why delay after an unrecognized command? Does FAIL_DELAY in /etc/login.defs affect this also?