I pass a string -> NullPointerException
What is a NullPointerException, and how do I fix it?
This is from problem $8$, Chapter II of Rudin's Real and Complex Analysis.  The problem asks for a Borel set $M$ on $R$, such that for any interval $I$, $M \cap I$ has measure greater than $0$ and less than $m(I)$.  I was thinking of taking the Cantor approach: taking $R$ to be the union of $[a,b]$ with $a$ and $b$ rationals, and for each $[a,b]$ we construct Cantor sets inside it. During theconstruction of each Cantor set, in order to have positive measure on it, we need to take off smaller and smaller intervals from it, namely the proportion goes to $0$. As a result, these Cantor sets are extremely "dense" on their ends. If for an interval $I$ it intersects with the Cantor set on $[a,b]$ while $b-a&gt;&gt;m(I)$, we shall expect the measure of intersection to be rather close to $m(I)$ and then we lose control on these cases.  Is there any way to fix this or shall I consider other approaches?  Thank you How to encrypt files using a cross-platform solution? My (very simple) question to a friend was how do I prove the following using basic trig principles:  $\tan75^\circ = 2 + \sqrt{3}$  He gave this proof (via a text message!)  $1. \tan75^\circ$   $2. = \tan(60^\circ + (30/2)^\circ)$  $3. = (\tan60^\circ + \tan(30/2)^\circ) / (1 - \tan60^\circ \tan(30/2)^\circ) $  $4. \tan (30/2)^\circ = \dfrac{(1 - \cos30^\circ)}{ \sin30^\circ}$    Can this be explained more succinctly as I'm new to trigonometry and a little lost after (2.) ?    EDIT  Using the answers given I'm almost there:   $\tan75^\circ$    $\tan(45^\circ + 30^\circ)$   $\sin(45^\circ + 30^\circ) / \cos(45^\circ + 30^\circ)$   $(\sin30^\circ.\cos45^\circ + \sin45^\circ.\cos30^\circ) / (\cos30^\circ.\cos45^\circ - \sin45^\circ.\sin30^\circ)$    $\dfrac{(1/2\sqrt{2}) + (3/2\sqrt{2})}{(3/2\sqrt{2}) - (1/2\sqrt{2})}$   $\dfrac{(1 + \sqrt{3})}{(\sqrt{3}) - 1}$   multiply throughout by $(\sqrt{3}) + 1)$   Another alternative approach:   $\tan75^\circ$    $\tan(45^\circ + 30^\circ)$   $\dfrac{\tan45^\circ + \tan30^\circ}{1-\tan45^\circ.\tan30^\circ}$   $\dfrac{1 + 1/\sqrt{3}}{1-1/\sqrt{3}}$   at point 6 in above alternative What's the simplest way to wrap extruded text around a cylinder? What's the simplest way to wrap extruded text around a cylinder that has a specific radius (for example, the label on a can of baked beans)?  I've tried using the Simple Deform modifier, but that (a) doesn't allow you to choose a radius and (b) requires the text to be converted to a curve.  I'm trying to model a cylinder with radius of 30, which has a line of embossed text that runs around the curved side, facing outward.  Thanks! How do I create this crease effect on glass? Smeared creamy look effect i came across a photo where the gradient looks like it s smeared from cream. It is hard to explained by saying so here is the  Let say i create 2 similar shapes with the gradient pattern then adjust the opacity but the edges will still remain. But in the example the edges are appeared to be soft and hard randomly. Thanks in advance ! What are the rules about take a bike on the London Tube? Can I take a bike on the Tube (underground) in London, if so how much does it cost? My machine has a SSD (fairly small) and a Hard disk (large). I want to have windows and a couple of programs on the SSD but I want to have the documents folders (such as my documents and my downloads) on the HD. I also want the default install directory pointing at the larger HD. Can anyone advise or point me to a relevent guide? Thanks. Should methods in a Java interface be declared with or without a public access modifier? Should methods in a Java interface be declared with or without the public access modifier?  Technically it doesn't matter, of course. A class method that implements an interface is always public. But what is a better convention?  Java itself is not consistent in this. See for instance Collection vs. Comparable, or Future vs. ScriptEngine. Is it possible to follow a user automatically? I've been looking around and I can't seem to find an automatic (i.e. buzz- or Twitter-like) way to follow users inside Stack Exchange. Why haven't the developers added such a feature? It could help beginner users follow other beginners with the same interests. We would be able to learn from each others' questions and pitfalls. Also, it would reduce double posting. What are some practical examples of a constant current source? Please don't state the obvious that nothing is a perfect constant current source.  And please do not give examples of how to create them from components.  I looked at this  which stated the obvious - that you can not have a perfect current source.  So when I say constant current source, I am not referring to the mathematical concept used in circuits, but "natural" components that provide a close approximation to this. Key word is approximation.  A bit of research pulled up one interesting example which was a solar cell.  Is this a valid example?  A google search pulls up a similar Quora question . Which gave the example of a solar cell.  This is a more technical site and I was looking for a more engineering answer not a mathematical or laymen's answer.  Thanks. Avoid trailing zeroes in printf() I keep stumbling on the format specifiers for the printf() family of functions.  What I want is to be able to print a double (or float) with a maximum given number of digits after the decimal point.  If I use:  printf("%1.3f", 359.01335); printf("%1.3f", 359.00999);   I get  359.013 359.010   Instead of the desired  359.013 359.01   Can anybody help me? Is it possible to play D&D 5e solo? Is it at all possible to run a solo game where you act as the DM/GM for yourself? I know there was a 4th edition adventure published in an old issue of one of the D&amp;D magazines but recently I read somewhere (Reddit I think) that the games Outbreak: Undead and Eclipse phase were good games to play solo.  Can anyone with experience with running a game of D&amp;D 5e for themselves explain how to do so? How can I improve viewport performance when using Dyntopo? I'm doing a Blendercookie course on how to sculpt a Scifi weapon with dyntopo. The fact is that when some piece reach a certain level of compleiity (about 1.1 million tris) the systems starts to lags too much and is so frustrating.  I've tried the several options:   Disable double sided lighting Enable VBO    I've so also reduced the topology of hidden faces. But that´s how far I've reached.  I'm using a late Imac Intel I5 Nvidia GPU GTX 680mx  any tips out there? Unitary map between sets of vectors In my opinion the accepted answer should permanently stick as only the original question submitter has the ability to accept. How to reverse the direction of the y axes I have multiple Amazon EC2 accounts and want to quickly be able to switch variables, such as $EC2_HOME, using a script.  I have have a shell script set up like this:  #!/bin/sh export EC2_HOME=/home/me/.ec2 echo $EC2_HOME   When I run the script I know that EC2_HOME is set, but I thought that using export would make the variable stick around after the script completed. It does not, as running echo $EC_HOME does not show anything.  I know this must be very rudimentary Linux scripting knowledge, but I don't know it. I tried looking for related questions without luck - so my apologies if this is a duplicate. Relay: higher voltage allowed at lower current? Is it safe to use a 30VDC/1A relay for a voltage of 60V but a current of &lt;100uA? E.g. this one: Show that $\frac 1{1+x+y^{-1}}+\frac1{1+y+z^{-1}}+\frac1{1+z+x^{-1}}=1$ if $xyz=1$