I have a simple shoe size converter app and I want it to be so that if the answer requires no decimal places, there are none, just whole numbers. If the answer was 2, I don't want it to say 2.000000, it should say 2. If it requires one decimal place, it should show to one decimal place for example 12.8 instead of 12.80. How would I do this?   ViewController.m file  - (void)viewDidLoad         {             [super viewDidLoad];             _countryNames = @[@"Europe", @"United Kingdom", @"Japan"];              _sizeRates = @[ @11.5f, @.875f, @7.0f];         }  -(void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component                  NSString *resultString = [[NSString alloc] initWithFormat: @"%3f USS = %3f %@", size, result, _countryNames[row]];                 _resultLabel.text = resultString;             }
I have the value 25.00 in a float, but when I print it on screen it is 25.0000000. How can I display the value with only two decimal places?
What is wrong with defining \bal as \begin{align}? I'm trying to define two commands \bal and \eal instead of inserting \begin{align} and \end{align} in my document, but in the code below, I'll get some errors. What is wrong with it?    \documentclass{article} \usepackage{amsmath} \makeatletter  \newcommand{\bal}{%  \begingroup  \align% \@ifstar{\nonumber}{}%  }  \newcommand{\eal}{\endalign\endgroup} \makeatother \begin{document} \bal* x=y \eal ‎\end{document} 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 PHP script not executing on Apache server What are the biggest changes between UA Ranger and PHB Ranger? How much money do I need to show as proof of support when applying for a UK Standard Visitor visa? I am an Indian citizen studying in Italy on an Italian visa that expires 19 November, 2015. I have permesso di soggiorno. I want to visit the United Kingdom for my vacations for a week during March. I know the procedures already, however I am a little bit confused about the amount that I must show as a proof of support with my bank statements. I will stay for a week with my friends who are also students in Italy and will be in London for 5 days. What would be the amount in Euros that I need to show for my visit to UK? I'm trying to get through Spivak's Calculus on my own and even though I kinda understand induction I'm not so sure that's the case when it comes to complete induction. So I tried to do a starred problem which involves using it. But I'm not sure that my proof is valid, can someone check this for me?  So the problem is that I have to prove that     For every natural $n&gt;1$, if $n$ is not prime we can write it as a product of primes.   I'm starting with a base case. For $n=2$, $n$ is prime, so the assumption holds.  Let's assume that for some $n &gt; 1$ and also all numbers $p &lt;= n$ the assumption holds.  Then $n+1 = cd$. If $n+1$ is not prime, then $c &lt; n+1$ and $d &lt; n+1$, but as they are natural numbers, we can also write that $c &lt;= n$ and $d &lt;= n$. But we assumed that if $p &lt;= n$, and $p$ is not prime, we can write it as a product of primes. So if $c$ or $d$ are not primes, we can write them as a product of primes. That means that $n+1$ can be written as a product of primes if it's not prime, which completes the proof. Get the size (size in Kb or MB) of an featured image? What's the difference between the nvidia-current, and nvidia-current-updates packages? What's the difference between the , and  packages?  The former has a higher version number, and the description of the packages are the same.    Which do I use? Which is the most recent one What's the purpose of this split packaging? I am given this problem: Suppose you have a complete graph with $n$ edges. How many vertices does your graph have?  I have this math figured out so far: We know that a complete graph has $m$ vertices, with $m-1$ edges connected to each. This makes the sum of the total number of degrees $m(m-1)$. Then, since this sum is twice the number of edges, the number of edges is $\frac{m(m-1)}{2}$.  But I don't think that is the answer. I think I am missing a piece of the math, but I can't figure out what else I need to do. Can anyone help me with what I'm missing or doing wrong? Show that $(L^{p},\|\|_{p})$ is a Banach space.  My approach: I prove the statement for $(L^{1},\|\|_{1})$, of the following way, first all, is easy show that $\|\|_{1}$ is a norm. So,  $(L^{1},\|\|_{1})$ is vector space. To show that is a Banach space, note that  Prop. 1: Let $(f_{n})_{n\in\mathbb{N}}\subset\mathcal{L}^{1}$ (where $\mathcal{L}^{1}=\mathcal{L}^{1}(X,\tau,\mu)$ is the space of all integrals function), such that $\sum_{i}{\|f_{n}\|}_{1}&lt;\infty$, then the sequences $\left(\sum_{n=1}^{N}{f_{n}}\right)_{n\in\mathbb{N}}$ converges almost everywhere to the integral function, that we called $\sum_{n\in\mathbb{N}}{f_{n}}$. Furthermore $$\sum_{n\in\mathbb{N}}{\int{f_{n}d\mu}}=\int{\sum_{n\in\mathbb{N}}{f_{n}d\mu}}\quad\lim_{N\to\infty}{\|\sum_{n=1}^{N}{f_{n}}-\sum_{n\in\mathbb{N}}{f_{n}}\|_{1}}=0$$ Prop. 2: Let $(E,\|\|)$ a normed vector space. Then $E$  is a Banach space if and only if for all $(e_{k})_{k\in\mathbb{N}}\subset E$ such that $\sum_{k\in\mathbb{N}}{\|e_{k}\|}&lt;\infty$, $\left(\sum_{k=1}^{n}{e_{k}}\right)_{n\in\mathbb{N}}$ converges in $E$  We take the proposition 2. Let $(f_{n})_{n\in\mathbb{N}}\subset L^{1}$ such that $\sum_{n}{\|\hat{f}_{n}\|_{1}}&lt;\infty$. Let $f_{n}\in\hat{f}_{n}$, then $\|f_{n}\|_{1}=\|\hat{f}_{n}\|_{1}$ and then $\sum_{n}{\|f_{n}\|_{1}}&lt;\infty$, by prop. 1, there exist $F\in\mathcal{L}^{1}$ such that $\|\sum_{n=1}^{N}{f_{n}-F\|_{1}}\to 0$, and then $\|\sum_{n=1}^{N}{\hat{f}_{n}-F\|_{1}}\to 0$. Finally note that $\hat{F}\in L^{1}$ is a Banach space. This was my answer for  $L^{1}$ space, but how I prove the general statement for $L^{p}$ (I want to do a similar response). Edit: I'm stuck in the problem, any idea or hint is appreciated.Thanks!! Iterating through list of list in Python I am reviewing take aways. I am having trouble  How do I do $342 - 58$?  For the ones column I made the $2$ into a $12$ so I can do $12 - 8 = 4$ but I must take away one tens. So I get $3 - 5$ in tens column but I cant do $3 - 5$. What do I do now do I borrow something else? Can you make a seismograph with an accelerometer? Actual seismograph electronics are very expensive. I'm just wondering if a seismograph can be made with a adequately semsitive accelerometer. To be exact I want to bury the accelerometer based seismograph and have it sense footsteps.  So is this possible and what method would you reccommend for my needs and why? What's the difference between term_id and term_taxonomy_id Escaping WP_Query tax_query when term has special character(s) Here's my issue. I have a custom post type that I'm attaching a custom taxonomy to. This taxonomy will allow the admin to provide search suggestions that will ensure the post is found when a user searches. This taxonomy is also used on the front-end to autocomplete the search field with these suggestions.  The system works fine, except when the term contains a forward slash, a space or other "special" characters.  &lt;?php $keyword = 'Ski-in%2FSki-out';//Submitted via $_GET $keyword = urldecode($keyword); // (string)'Ski-in/Ski-out'  $taxQuery = new WP_Query(array(     'post_type' =&gt; 'ml_properties',     'tax_query' =&gt; array(         'relation' =&gt; 'OR',         array(             'taxonomy' =&gt; 'mc_tax_lifestyle',             'field' =&gt; 'name',             'terms' =&gt; array($keyword),             'operator' =&gt; 'IN'         )     ) )); ?&gt;   I've looked into using the escaping features provided by WordPress, but haven't had any luck there. I thought this would be a simple problem, but either my Google-fu is not strong, or I'm just not having any luck.  I've also verified that that Ski-in/Ski-out is the exact string stored in MySQL. I've looked into using esc_attr(), $wpdb-&gt;esc_like() and esc_sql() but none have an effect.  Perhaps I'm missing something obvious? Induction proof: $S$ contains powers of 2 and predecessors implies $S={\bf N}$ Let $S$ be a subset of $\mathbb{N}$ such that $$2^k\in S\quad\forall\ k\in\mathbb N$$ and, $$k\in S\Rightarrow k-1\in S\quad\forall\ k\ge2,k\in\mathbb N$$  Show by induction that $S=\mathbb N$. What are the best SEO practices when changing domain names? I'm using the Yoast SEO plugin on a WordPress site on a new, more memorable domain to replace an old static HTML site with no SEO. I've followed , set up 301 redirects from the old domain to the new one, and filed a change of address in the Google Search Console. However, after a few days, the old site still shows in search results, and is ranked higher than the new one if you google our company name.   And, if I try to set the preferred domain in the Google Search Console Site Settings for the new site, I see this in place of the options to prefer www/non-www/http/https:     Not all options are available because of a Change of Address request   related to this site.   I've read of some cases where this condition has lasted for .  Is there anything more I can do to fix this? Have I done something wrong, or do I just need to wait, and for how long? How does conservation work in wormholes? My questions might seem naive as I haven't plunged into the mathematical descriptions, but wormholes are interesting even if I don't actually know them :)  First of all, is wormhole making two possible paths betwwen points (like the tunnel in most visualisations) or is it just making two points beside each other like in the game Portal? Of course, second case can be bent into a tunnel, but there would be nothing special about tunnel part and no preferred way to divide into "normal" and "tunnel" part of spacetime.  My main questions are these:   Is momentum conserved? Is kinetic energy conserved? How does potential energy work?   To elaborate... In the game Portal you can fall into floor and fly out of the wall or floor elsewhere with the same speed, but another direction (normal to the portal). So momentum is not conserved, but kinetic energy is. Is that how it would actually work? Where does the momentum go then?  And does it really allow you to increase your potential energy while retaining kinetic? It would seem fair to take away some kinetic energy if you are put in a region where you have more potential energy.  Either way is the change in energy non-continuous like in the game and discussion that's linked below? Or are there just more than one way to move through but the change in potential energy is smooth in any of those? That would mean more potential equilibrium points though...  Similar questions has been discussed , is it correct about how the falling guys gets a lot of energy (in form of a potential one) by draining it from the mouths? Converting a .lasd (Lidar) coordinate system? How can one change a coordinate system for a .lasd (Lidar) dataset?  The file is currently in UTM_Zone_15N and I am trying to convert it to IL_East. Is it true that the order of $ab$ is always equal to the order of $ba$?