If there is a charge in space, it is possible to calculate the magnitude of electric field generated by the charge at a point in space by using the formula $E = {{kQ}\over{r^2}}$ However,  If there is a permanent magnet in space, how is the magnitude of magnetic field (B) calculated at a certain distance away from the magnet?  For example, if there was a neodymium magnet graded at N42, how do we calculate the value of magnetic field $0.1 $m away from the center of the magnet?
We are always introduced to magnets by pictures illustrating a parallepiped magnet, a horseshoe magnet, etc... Anyway the first time we actually calculate a magnetic field is for eelectromagnets. Indeed I've rarely seen explaining or calculating the magnetic field of a permanent magnet. I know formulas for the magnetic field of a moving charge, around a conductive wire, inside a solenoid, but I don't have idea on how to go about calcualting the filed of a simple permanent magnet. It's like that without the help of electricity I'm stuck. I'd guess it would be heavily dependent on the magnetic material, its shape and the medium in which is placed. I hope that someone would provide me some insights on why such formulas are  never introduced in most physics courses and lay down some examples of a permanent magnet field caluclation.
SVM for unbalanced data I want to attempt to use Support Vector Machines (SVMs) on my dataset. Before I attempt the problem though, I was warned that SVMs dont perform well on extremely unbalanced data. In my case, I can have as much as 95-98% 0's and 2-5% 1's.   I tried to find resources which talked about using SVMs on sparse/unbalanced data, but all I could find was 'sparseSVMs' (which use a small amount of support vectors).  I was hoping someone could briefly explain:   How well SVM would be expected to do with such a dataset   Which, if any, modifications must be done to the SVM algorithm What resources/papers discuss this What kind of lubrication should I use for a lock? I recently made the Yale lock on my front door much easier to open by spraying some WD-40 in there.  However, I just saw  on WD-40 not being a “true” lubricant, and wondered whether it was appropriate to use on Yale locks? Intuitive examples of importance sampling My background is computer science. I am fairly new to monte carlo sampling methods and, although I understand the math, I have hard time coming up with intuitive examples for importance sampling. More precisely, could someone provide examples of:    an original distribution one cannot sample from but one can estimate an importance distribution which can be sampled from and adequate for this original distribution. I need a list of integers from 1 to x where x is set by the user.  I could build it with a for loop eg assuming x is an integer set previously:  List&lt;int&gt; iList = new List&lt;int&gt;(); for (int i = 1; i &lt;= x; i++) {     iList.Add(i); }   This seems dumb, surely there's a more elegant way to do this, something like the What's the best way to deal with hot/stuck pixels in long exposure night photographs? I discovered red/blue/white pixels on my night photographs tonight. Trying to confirm this, I took a black image with the lens on and indeed I saw a whole lot of them (I didn't count them but at least a good fifty on the whole picture).   I'm not exactly sure if they are hot pixels, stuck pixels or anything else.  I quickly gave a check to my last exported JPEG files (I get RAW out of the camera) and couldn't find anything. After a quick search, I've seen that Lightroom is caring about those pixels after RAW conversion.  I've read that, with Canon DSLRs, there is a software process that could take care of that directly on my camera. I don't know if I can use it without getting things even more messy.   My question is: Considering my crazy pixels are not visible on my pictures, should I get too emotional about them? My camera is under warranty but is it really worth it to return it to Canon? If it's only to receive it back 1 month later after Canon just used the very same menu to map out the pixels, it's a bit ridiculous. Could this be a sign that my camera has a bigger problem?  It seems related to shutter speed. When shooting a black image at 1/250s I get nothing. When shooting the same setup but 1s, I get a few of them. The more I increase the shutter speed, the more crazy pixels I get. Why use a prime number in hashCode? I was hoping I would find some people in the industry that could help me decide what's the best price to charge to design (in this case) business cards.  What are standard prices for professional designers?  From a firm point of view? From a freelancer?  I don't want to overcharge clients but I don't want to ruin the industry by underselling my services. Suppose that:  $0 \rightarrow M_{1} \rightarrow M \rightarrow M_{2} \rightarrow 0$  Is an exact sequence of $R$-modules (for $R$ commutative integral domain). Show that $\mathrm{rk}(M) = \mathrm{rk}(M_{1})+\mathrm{rk}(M_{2})$    I have shown the inequality $\mathrm{rk}(M) \geq \mathrm{rk}(M_{1})+\mathrm{rk}(M_{2})$, however for the opposite direction I'm lost. I tried to take $N$ as a linear independent subset and tried to decompose it into $N_{1}$ (the elements in $\mathrm{Ker}(g)$) and $N_{2}$ (the elements not in $\mathrm{Ker}(g)$), but I haven't got far, since $N_{1}$ gives us a linearly independent set in $M_{1}$, however $N_{2}$ can give us a linearly dependent set in $M_{2}$.   We define $\mathrm{rk}(M)$ in this case as the supremum over all cardinalities of the linearly independent subsets of $M$ (where the only finite linear combination equaling $0$ implies trivial coefficients for $r \in R$).  Would this be the proper way to show the result? I think I'm missing something important. List of tables, db schema, dump etc using the Python sqlite3 API Why is the gravitational force always attractive? Why does this PNG image on twitter look different when clicked? This morning on twitter there was a tweet with the text "click on this picture".  When picture is clicked, it's opened in wider viewer, but looks completely different.  I tried to analyze this picture in ACDSee, and I also tried uploading on Facebook, but it's happening only when embedded on twitter. I don't have much knowledge about graphics so please explain this to me. Why does this PNG image change only when clicked on Twitter?  Screenshots (left = before clicking; right = after clicking):     Here's the original . Reading an Excel file in PHP I'm trying to read an Excel file (Office 2003). There is an Excel file that needs to be uploaded and its contents parsed.  Via Google, I can only find answers to these related (and insufficient topics): generating Excel files, reading Excel XML files, reading Excel CSV files, or incomplete abandoned projects. I own Office 2003 so if I need any files from there, they are available. It's installed on my box but isn't and can't be installed on my shared host.  Edit: so far all answers point to  and/or  about how to use it. How can i disable totally the prompts that appear while installing a Debian package, i've used all the options that i've found but there are some packages that are still prompting.  I'm using this command:  apt-get -y --allow-unauthenticated --force-yes -o DPkg::Options::="--force-overwrite" -o DPkg::Options::="--force-confdef" install x11-common   Why the x11-common package is still prompting? how can i get rid of these prompts?  Thanks in advance  --Victor  Edit: just to clarify, the prompts are not "yes/no" prompts, are open questions in a coloured screen (typical two color screen) but i want to set the default option of these questions PDF of function of X I'm learning about functions of random variables and am trying to work out an example I made up. If $y = \sin(x)$ and $x$ has domain $[0, 4\pi]$, is the following the correct expression for the pdf of $y$: $$\begin{align*} f_Y(y) &amp;= \frac{d}{dy}F_Y(y)\\ &amp;= \frac{d}{dy}[F_X(2\pi) - F_X(\pi) + F_X(4\pi) - F_X(3\pi)]\\ &amp;= \frac{d}{dx}F_X(2\pi)\left|\frac{dg^{-1}(y)}{dy}\right| - \frac{d}{dx}F_X(\pi)\left|\frac{dg^{-1}(y)}{dy}\right| + \frac{d}{dx}F_X(4\pi)\left|\frac{dg^{-1}(y)}{dy}\right| - \frac{d}{dx}F_X(3\pi)\left|\frac{dg^{-1}(y)}{dy}\right|\\ &amp;=f_X(2\pi)\left|\frac{1}{\sqrt{1-0}}\right| - f_X(\pi)\left|\frac{1}{\sqrt{1-0}}\right| + f_X(4\pi)\left|\frac{1}{\sqrt{1-0}}\right| - f_X(3\pi)\left|\frac{1}{\sqrt{1-0}}\right|\\ &amp;= f_X(2\pi) - f_X(\pi) + f_X(4\pi) - f_X(3\pi)\\ \end{align*}$$ Are all simple left modules over a simple left artinian ring isomorphic? How do I install a fingerprint reader on Lenovo ThinkPad? I have a  with a fingerprint reader:    How to make Ubuntu recognise it and use it for login?  I already tried:  sudo add-apt-repository ppa:fingerprint/fingerprint-gui sudo apt-get update   ... but this GUI did not recognizes my device. Does anyone knows any other option? When should static_cast, dynamic_cast, const_cast and reinterpret_cast be used? The summer training or (just) summer training Should we use the summer training or just summer training in the paragraph. As per me training is a noun and before singular noun we have to use an article and I am using the because I am talking about a specific training for engineers, I also know that before very common nouns we avoid articles, like bed, school, bus, university, so if you say we should use summer training then please give me a valid reason.     Company(name) has been providing the summer training for engineers   since 2010. We have been giving completely professional atmosphere for   engineers to complete the summer training with practical knowledge.   Our each faculty has a great experience in the education field. We   make sure you get all the important resources to make your summer   training a learning and an enjoyable summer training. You may call or   email us to get your confirmation about the training.   Thanks in advance. How can I see all versions of a package that are available in the archive? Is there a way I can see all the versions that are in the archives that I have configured in sources.list. I can see the last version of each archive withapt-get policy, but how can I see them all?  Is there any way that this can also include PPA and anything in sources.list.d? Can I run Ubuntu OS on a Android 4.0 tablet?