How to round a float number in Java if its a whole?
How to round a number to n decimal places in Java
When using the Text Editor, what is the best command to include inside a script which will abort the script at that line?  quit() and sys.exit() stop the script, but also kill Blender. Whenever I try to Get then Install any app from the App Store, I get this message:     We could not complete your purchase.  cancelled   I did some searching online, but barely found any useful hits. What is this about?! Biliniear form to inner product Let $f:V\times V\rightarrow F$ be a bilinear form in a finite inner product space V.  If $F=R$, how can I prove that there exists a single linear transformation $T:V \rightarrow V$ so that for each $v,u\in V$, $f(u,v) = (Tu, v)$ ?  Would that sill be the case if $F=C$? Why do all the planets of the solar system orbit in roughly the same 2D plane? Most images you see of the solar system are 2D and all planets orbit in the same plane. In a 3D view, are really all planets orbiting in similar planes? Is there a reason for this? I'd expect that the orbits distributed all around the sun, in 3D. Has an object made by man (a probe) ever left the Solar System? When should I use "a" vs "an"? Pros and Cons of a Decentralized Puppet Architecture We have around 300 RHEL servers that are currently connecting to a Puppetmaster server.  However, we have noticed some performance bottlenecks and it is the point of failure in our system.  I am fairly new to puppet in general and I am considering creating a decentralized puppet architecture instead of having Puppet clients connect to the Puppetmaster server.  Aside from what I would suspect to happen such as performance gain and lack of signing and exchanging SSL certs for new machines, what are other pros and cons to setting up a decentralized architecture? How to tell Max CP? How do I kill a process that won't die? I'm unable to kill a process using any of the techniques I'm aware of ("Force Quit" in Activity Monitor, top, killall from the Terminal) and wonder if there are some additional steps I can take.    ~ $ sudo killall -KILL 77439 Password: No matching processes were found ~ $ killall -KILL 77439 No matching processes belonging to you were found ~ $ killall 77439 No matching processes belonging to you were found ~ $ killall Mathematica No matching processes belonging to you were found   FWIW the process is "Mathematica" which I cannot relaunch, Quit, or Force Quit, or sample, either by name or PID, and it appears to have some odd side effects (screenshots don't appear, can't empty trash, and can't even shut down the system).  Are there additional steps that can be taken to really really kill a badly behaved process? Why should I declare a virtual destructor for an abstract class in C++? I know it is a good practice to declare virtual destructors for base classes in C++, but is it always important to declare virtual destructors even for abstract classes that function as interfaces? Please provide some reasons and examples why. jQuery appended table adds closing tag at the end of the text automatically. Why? How to prove that $\sum_{r=0}^n\binom{n}{r}2^r=3^n$ How can magnets be used to pick up pieces of metal when the force from a magnetic field does no work? I learned that the force from a magnetic field does no work. However I was wondering how magnets can be used to pick up pieces of metal like small paperclips and stuff. I also was wondering how magnets can stick to pieces of metal like a refrigerator? How do I remove code duplication between similar const and non-const member functions? Let's say I have the following class X where I want to return access to an internal member:  class Z {     // details };  class X {     std::vector&lt;Z&gt; vecZ;  public:     Z&amp; Z(size_t index)     {         // massive amounts of code for validating index          Z&amp; ret = vecZ[index];          // even more code for determining that the Z instance         // at index is *exactly* the right sort of Z (a process         // which involves calculating leap years in which         // religious holidays fall on Tuesdays for         // the next thousand years or so)          return ret;     }     const Z&amp; Z(size_t index) const     {         // identical to non-const X::Z(), except printed in         // a lighter shade of gray since         // we're running low on toner by this point     } };   The two member functions X::Z() and X::Z() const have identical code inside the braces.  This is duplicate code and can cause maintenance problems for long functions with complex logic.    Is there a way to avoid this code duplication? To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object? Intervals are connected and the only connected sets in $\mathbb{R}$ As the topic, prove that Intervals are connected and only connected  in $\mathbb{R}$. I know what is the definition of connected set. But not sure how to prove that. When does $P(x)=\sum_{n=0}^{\infty}{\frac{n!}{n^n}\cdot x^n}$ with $x\in \mathbb{C}$ converge? Can't install Ubuntu 18.10 on XPS 15 - EFI\BOOT\mmx64.efi not found I tried to install Ubuntu 18.10 on my XPS 15 9570 earlier. Everything was working fine until I got to the partition selection part of the installation. That's when the installer crashed and I had to shut down my machine. I think it's because I had my SATA configuration set to RAID ON instead of AHCI, which is now fixed.  Now when I try to run the installer from my bootable USB I get the following error  Failed to open \EFI\BOOT\mmx64.efi - Not Found Failed to load image \EFI\BOOT\mmx64.efi: Not Found Failed to start MokManager: Not Fond Something has gone seriously wrong: import_mok_state() failed   Hoping someone might have some idea as to what is going on How do I make my rim brakes stop squealing? My rear rim brakes are squeaking loudly. I don't know what the problem is, but I am sure it has nothing to do with rain because it happens all the time even if it is dry.  Anybody have an idea what could be problem and how to solve it? It makes the rear brakes kind of useless, because if I use them I will scare the people or drivers around me. Kernel requires an x86-64 CPU, but only detected an i686 CPU. How can I install Lubuntu/Ubuntu? View/edit ID3 data for MP3 files What's a quick and easy way to view and edit ID3 tags (artist, album, etc.) using C#?