Rounding a double to two decimal places with a placeholder
How do I display a decimal value to 2 decimal places?
What is the best way to filter a Java Collection? I want to filter a java.util.Collection based on a predicate. I need to use a metaheuristic algorithm to solve an optimization problem on a Python codebase.  Metaheuristics usually need to be written in C++ or Java as they involve a lot of iterations, while Python is weak from this point of view.  Questions:   do any Python metaheuristic packages which wrap faster languages as C++/Java exist? do any Python metaheuristic packages based on maybe cython on numba exist? other solutions? How to find the real user home directory using python? Why is Tony Stark in the Iron Man suit unaffected by G-forces, inertia and blunt force trauma? Tony's suit is an engineering marvel, and they explain many facets of the technology to help give legitimacy to the special powers, abilities and weapons it has.  I never read the Iron Man comics, but in the movie they really don't have a technological explanation for how he miraculously seems to be unaffected by crushing G-forces of sudden acceleration, the inertia of sudden stops and hair-pin turns, and especially the blunt force trauma from getting smashed in the face with Thor's hammer.  Certainly it appears the suit takes punishment, but Tony always remains unscatched, never a collapsed lung, broken bone or even a bloody nose.  In my infantile understanding of theoretical physics, the same technology that would be used to counter G-forces and sudden blunt force trauma to the body inside would be the very same technology used for  which in my honest opinion would be a much more stunning technological achievement than his heralded Arc Reactor.  Was their ever an explanation proferred for this and if so was it indeed attributed to Anti-Gravity? Performance Advantages to Iterators? What (if any) performance advantages are offered by using iterators. It seems like the 'Right Way' to solve many problems, but does it create faster/more memory-conscious code? I'm thinking specifically in Python, but don't restrict answers to just that. Set origin to bottom center of multiple objects I have a lot of 3D objects of various sizes, shapes in blender 2.76b and I would like to set the origin to the bottom center of the objects bounds.  I cannot select the bottom edge and snap to cursor etc as each shapes edges are in different X/Y positions.  Is there a script or tool that will allow me to set the origin to the lowest edge z position? Fibonacci Recurrence Relations Solve the recurrence relation $f(n) = f(n − 1) + f(n − 2)$ with initial conditions $f(0)=1$, $f(1)=2.$   So I understand that it grows exponentially so $f(n) = r^n$ for some fixed $r$.  This means substituting this $r^n = r^n-1 + r^n-2$ which gives the characteristic equation of $r ^ 2 - r - 1 = 0$. I'm not 100% sure where to move on from here. So my teacher gave a pretty tough (for me) problem in class today: Does the series $$ \sum_{n=1}^{\infty}\frac {\sin{\frac 1 n}} {\sqrt n} $$ converge or diverge?  So far I've thought of trying the Comparison Test and Ratio Test but couldn't really get anywhere. Intuitively I think it should converge, but how do I actually show this? I tried to use xrandr to set 1680x1050 as a new mode to VGA output, but it says:  sudo xrandr --addmode VGA-0 1680 X Error of failed request:  BadMatch (invalid parameter attributes) Major opcode of failed request:  140 (RANDR) Minor opcode of failed request:  18 (RRAddOutputMode) Serial number of failed request:  35 Current serial number in output stream:  36 Just installed Ubuntu for the first time... Is there any simple way to browse installed programs?  On Mac there is the Applications top-level folder... here I see Desktop, Documents, Downloads etc but no Apps? That'd be a good idea, no? (is there some way to create this myself?)  On Windows there is the Start menu...  Here it seems like I have to click the 'Dash Home' and then I can see 'Recent Apps' ... I can search for them (I'd rather not)  ...or I can click the ruler/pencil icon at the bottom and see 'Recent Apps' and click to expand 'Installed Apps' ...ok that's all of them - is it possible to get a straight list view instead of the hard-to-scan wrapped rows?  Also, is there any way to get rid of the pointless random selection of 'Apps available for download' at the bottom? Old movie about aliens and a family; father briefly abducted About 15 or so years ago, I dimly recall watching a movie on TV about aliens, which really struck a chord, but I can't remember enough to google a name or anything more specific. The action takes place on Earth, perhaps in the USA. It was a live action movie, not animated.    It was about a family; the father (grandfather?) was an army pilot, and when he was flying, he was abducted by aliens (briefly, then returned, I think?). The (grand?)daughter is a little child, and her nanny is trying to teach her telekinetic abilities (perhaps a result of modifications done to the father?). I think I remember her also conjuring up a glowing orb between her hands. The nanny turned out to work for the aliens. There was also something about the government trying to chase/capture the family.   Any help will be appreciated! Summarizing flatness of county with statistic Elevation variance per square mile I need to classify every county in the US as either hilly, moderately hilly, or flat. Accuracy is not critical, just a rough classification. I used R and followed the advice in  answer to import elevation and counties and calculated the zonal variance. This was inherently biased towards larger counties since they have more surface for hills, so I need to divide by area. If I divide variance by square miles does that reasonably represent hilliness? The preliminary results seem decent, with the highest values being places like Colorado, Hawaii, Montana, etc. Why are our planets in the solar system all on the same disc/plane/layer? How do I install drivers for a Canon LBP-2900 printer? I seen many times how people describe how to's about LBP-2900, and 10-12 steps from start to end of how to download, unpack, build driver, fix driver, make it work... Could be there some .deb package with ready-to-go driver for Ubuntu? This printer is very popular... Attempting official deploy process with single sandbox may reset/remove all existing work? Show by induction: $(1+\frac{1}{n})^{n}<n$ Show by induction that for all natural numbers n>3  $(1+\frac{1}{n})^n&lt;n$  Let $(1+\frac{1}{n})^n&lt;n$ be true !   We show that $(1+\frac{1}{n+1})^{n+1})&lt;n+1$  $(1+\frac{1}{n})^n(1+\frac{1}{n})&lt;n(1+\frac{1}{n})$   $(1+\frac{1}{n})^{n+1}&lt;n+1$  So now we just need to show that   $(1+\frac{1}{n+1})^{n+1}&lt;(1+\frac{1}{n})^{n+1}$  So here , If I show that :   $(1+\frac{1}{n+1})&lt;(1+\frac{1}{n})$   Does that mean im done with exercise ? Find the representing matrix with the respect to the standard basis Let $\Bbb R^2$ be a finite-dimensional vector space and $T:\mathbb{R}^2\to \mathbb{R}^2$ a linear operator. Let $[T]_B =  \begin {bmatrix}0 &amp; 0 \\-1 &amp; 1 \end{bmatrix} $ be a matrix representation of $T$ in the basis $B= (1,1),(-1,0)$.   How can I find the matrix $[T]_E$ where $E$ is the standard basis $(1,0),(0,1)$ if the transformation isn't given in the question?  Thanks,  Alan Are submodules of finitely generated free modules always free? I don't believe it's true that all submodules of a finitely generated free module are free just based on results from google. Is there a canonical simple example of a finitely generated free module with a submodule that is not free? QGIS: ESRI shapefile .shp no longer appears in list of file types under Add Vector Layer I recently installed QGIS 2.18.4 after using ArcMap for many years. I want to add several existing ESRI shapefiles (.shp) created in Arc, to a QGIS project. To add a new layer in QGIS, I select the "Add Vector Layer" button and then click "Browse" to go find the layer. Then I navigate to the proper folder. However, the drop down menu at the lower right of the "Open an OGR Supported Vector Layer" window does not include ESRI Shapefile on the list. The first one on the list is GeoJSON. Everything after "G" appears to be okay (all the way down to "X-Plane/Flightgear") but any file formats from A through F have been cut from the list. Since "ESRI" starts with "E" it does not show up on the list. Strange thing is when I first installed QGIS, ESRI Shapefile appeared on this list. So I must have accidently done something to change how that list is populated and I want to know how to change it back.   If I type in the name of the ESRI shapefile that I know is in the folder, it and all other files starting with those letters appears in the prompt window that appears. And QGIS will correctly load the Shapefile. However, I want to be able to see all those ESRI Shapefiles without having to know and type in the first letter so it will appear in the prompt. I want it to appear in the file type drop down (or drop up?) menu. How to use a field value in Template.php