Round a double to 2 decimal places
How to round a number to n decimal places in Java
I would like to set my monitor's scale under 100%, but Win10 only lets me set it to 100% or higher. Why won't Windows let me do that? Is there any workaround to do that? I am aware of the fact that scaling below 100% will result in merged pixels. Inverse of a Positive Definite How to know if Google Sheets IMPORTDATA, IMPORTFEED, IMPORTHTML or IMPORTXML functions are able to get data from a resource hosted on a website? The qtree package seems to facilitate the drawing of simple trees only. Is there a way to incorporate:   Multiple roots &amp; Nodes with multiple parents   in a tree in LaTeX? Does the (relativistic) mass change? Why? I learned recently that when an object moves with a velocity comparable to the velocity of light the (relativistic) mass changes. How does this alteration take place? Can I find out which tags I have created? This would be interesting to know.  The tags could be highlighted on the users page for example. Create bash file to open minecraft launcher I use this command in the terminal to run the minecraft launcher with java 8:  /home/max/Java/jre1.8.0_25/bin/java -jar Minecraft.jar   I included the full java path because I installed it on /home as a normal user and i want to include it.   That command works, it opens the launcher with Java 8 but I want to make a bash file so I don't have to open the terminal. And, most important, I don't want the terminal to remain open when I click play in the Minecraft launcher and the game starts.  Now if i close manually the terminal when the game have started, the game is closed too. These 2 questions have clearly wrong answers with upvotes. And they're still getting votes.  The log file one especially could be tried out, it would fail, but someone still voted it up. A downvote and comment has no effect.  Like we have "vote to close", what about a "vote to delete" for answers. I'd suggest a fairly high rep limit. Or badge ownership realting to the question tags (eg SQL Server)   (SF)   (SO)  Could be similar to this meta question: Suppose that $f(z)$ is analytic function in the disk $|z|\le R$ and $A(r)=\max_{|z|=r}Re(z)$ then prove that $r&lt;R$  $$\max_{|z|=r}\left|\frac{f^n(z)}{n!}\right|\le \frac{2^{n+2}R}{(R-r)^{n+1}}\{A(r)+|f(0)|\}$$  MY attempt   Using Cauchy generalized integral formula   $f^{(n)}(z_0)=\frac{n!}{2\pi i}\int _c\frac{f(z)dz}{(z-z_0)^{n+1}}$  then $\max_{|z|=r}\left|\frac{f^n(z)}{n!}\right|=\left|\max_{|z|=r} \frac{1}{2\pi i}\int _c\frac{f(z)dz}{(z-z_0)^{n+1}}\right|$  and i think we can solve by using Borel caratheodory theorem  Let $f(z)$ be holomorphic function on $|z|\le R$ and let $M(r)=\max_{|z|=r}|f(z)|$ and $A(r)=\max_{|z|=r}Re f(z)$ then  for $0&lt;r&lt;R$  $$ M(r)\le \frac{2r}{R-r}A(R)+\frac{R+r}{R-r}|f(0)|$$  from here how to processed ? Problem with "scopes" of variables in try catch blocks in Java Thunderbolt 2 docks have been quite expensive and they will be obsolete once I purchase the new Macbooks with USB-C ports. I currently use a 2014 MacBook Pro with Thunderbolt 2 ports, and I want to futureproof my purchase by acquiring a cheaper USB-C dock now.  The cheapest Thunderbolt 2 dock costs around $200 while USB-C docks cost around $30. Being able to use a USB-C dock with older Thunderbolt 2 Macbook Pros would not only be cheaper but also allows me to use the same USB-C dock if I decided to upgrade to a future Macbook.  For that to work I need a Thunderbolt 2 (male) to USB-C female adaptor, after some searching it doesn't seem to exist. Is there a reason why something like this hasn't been made? Or is the USB-C specification designed such that it is impossible? (hence businesses can still continue to sell expensive Thunderbolt 2 docks...)  I will accept an answer that meets the following requirements:   If there is such an adapter please give a link and some form of evidence that these would have 100% compatibility with USB-C docks. If there is no such adapter please explain:   Is it impossible to produce? If not, why hasn't a vendor created one yet? I've explained that its a better financial investment than buying a TB2 dock... surely there's a market for those still using TB2 MBPs wanting to upgrade in the next couple of years. Not only docks but it would open a gateway to cheaper alternatives to those hideously expensive TB2 peripherals. "Screaming" noise while steaming milk? Typically Apt packages are served over bare HTTP and the downloaded contents are verified with GPG signatures. This makes it easy for  to proxy the HTTP connections and add the downloaded packages to its cache. apt-cacher-ng is unable to directly MITM an HTTPS connection created by Apt. It is possible to  apt-cacher-ng, but then the contents are not cached--they are re-downloaded from the remote server every time. This quickly gets annoying when rebuilding Docker containers that install many packages from Apt repositories served over HTTPS. Is there a way to get apt-cacher-ng to cache packages downloaded from HTTPS repositories? I need to create a request for a web page delivered to our web sites, but I need to be able to set the host header information too.  I have tried this using HttpWebRequest, but the Header information is read only (Or at least the Host part of it is).  I need to do this because we want to perform the initial request for a page before the user can.  We have 10 web server which are load balanced, so we need to request the file from each of the web servers.    I have tried the following:  HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://192.168.1.5/filename.htm"); request.Headers.Set("Host", "www.mywebsite.com"); WebResponse response = request.GetResponse();   Obviously this does not work, as I can't update the header, and I don't know if this is indeed the right way to do it. What is the best way to handle a lot of misused tags? So today I noticed a question that had the  tag. As the question was not about JSFiddle, and only included a link to the site, I thought somebody has just created this for the sake of it. So I decided the best action would be to remove it, and try to stop it from getting out of control.  But then I searched (clicked the tag) for other questions that used it and I was amayonaised to see over 500 questions had the very same tag! Most of which were incorrectly tagged. So I cleaned up a couple and then quickly got bored.  So I am wondering, aside from going through them all by myself, is there a more efficient way?  I think it would be a great idea if there was some feature (probably an admin feature) that allowed a new tag queue to be added to the review list. I think this could work well as follows:   Somebody brings up the problematic tag in question (e.g. Me on here) An admin reviews my concern, and decides that the tag is very misused That admin adds the tag for review in a (temporary) new review queue. All users that can review can then go through existing tags, and vote for "No action" or "Remove tag" The world becomes a slightly better place   ...or not?    By the way, I tried to add some new tags to this post but I don't have the rep. So if someone could create them for me that would be swell: "musefan", "today", "sunny-spells", "pointless-tags" How to get the last argument to a /bin/sh function What's a better way to implement print_last_arg?  #!/bin/sh  print_last_arg () {     eval "echo \${$#}"  # this hurts }  print_last_arg foo bar baz # baz   (If this were, say, #!/usr/bin/zsh instead of #!/bin/sh I'd know what to do.  My problem is finding a reasonable way to implement this for #!/bin/sh.)  EDIT: The above is only a silly example.  My goal is not to print the last argument, but rather to have a way to refer to the last argument within a shell function.    EDIT2: I apologize for such an unclearly worded question.  I hope to get it right this time.  If this were /bin/zsh instead of /bin/sh, I could write something like this  #!/bin/zsh  print_last_arg () {     local last_arg=$argv[$#]     echo $last_arg }   The expression $argv[$#] is an example of what I described in my first EDIT as a way to refer to the last argument within a shell function.  Therefore, I really should have written my original example like this:  print_last_arg () {     local last_arg=$(eval "echo \${$#}")   # but this hurts even more     echo $last_arg }   ...to make it clear that what I'm after is a less awful thing to put to the right of the assignment.  Note, however, that in all the examples, the last argument is accessed non-destructively.  IOW, the accessing of the last argument leaves the positional arguments as a whole unaffected. I'm a fourth year undergraduate student in a university in the U.S., and this is my last semester. I have already applied to graduate schools, and I'm currently awaiting responses. Since I have already finished all my requirements and am ready to graduate, I wanted to go part time this semester. I am aware of how it affects my financial aid; however, I do not know if it has an effect on my admittance to graduate school. I do not mean whether or not I get accepted (the decisions will happen without knowledge of my current semester), but whether I am eligible to attend graduate school if I have been part time for a semester. That is, will there be any potential issues when the schools that have accepted me see my final transcript and see I was part time? Is there a universal answer to this? Or should I contact each school individually and ask about their policy?   Also, are there any other potential issues with going part time that I haven't mentioned? Anything noteworthy I might have missed? Is there a way to see what were the Candidate Execution Plans generated by the Query Optimizer? The Query Optimizer creates more than one possible execution plan. How can I see all the plans generated before the executed one was chosen?   :     The Query Optimizer must analyze the possible plans and choose the one   with the lowest estimated cost.   Please, notice that I'm not talking about , I'm talking about candidate execution plans, the ones that were generated but not selected to be executed.  According to Benjamin Nevarez's article :     The generation of candidate execution plans is performed inside the   Query Optimizer using transformation rules, and the use of heuristics   limits the number of choices considered in order to keep the   optimization time reasonable. Candidate plans are stored in memory   during the optimization, in a component called the Memo.   Would it be possible to visualize the candidate plans rendered the way we can ? In Magic: The Gathering, the rules for a player losing in a multiplayer game are quite complex, so I'd like to try to understand them by example. I would be happy to ask each of these situations as a separate question if that is preferred, but they all seem related, and I would love to have one place to look up all of these answers.  Let's say I'm playing with two friends, Bob and Chloe, in a simple free for all. Unfortunately, I lose. When I lose, suppose the following:   I controlled an  which has exiled Bob's , does he get his bear back? I have a  on the stack targeting Chloe, does Chloe take the 2 damage still? Earlier in the turn I cast  to prevent damage to one of Bob's . If it later takes 3 damage, will that damage be prevented? Something I controlled gave Bob a 1/1 soldier token. What happens to the token? Something Chloe controlled gave me a 1/1 soldier token. What happens to the token? I had a  enchanting one of Bob's army of . What happens to the bear? I had also played  on Bob's final . What happens to the last bear? Chloe had  my . What happens to the Clone? Are there any other situations specifically addressed by the rules? I recently started an account on , and went to add an answer to a question which was protected. I have enough rep on other sites that I have the "Association Bonus", so I was confused as to why I wasn't being allowed to answer the question.     This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.   After re-reading the message and reviewing , I realized that the bonus didn't count as points earned toward that site.  This is a really minor issue, but I think it's worth fixing (not sure if bug or feature).  I believe that users who have enough rep to receive the association bonus should generally already know not to post "thanks!" and "me too!" style answers, so if the message is accurate, users who receive the association bonus should be able to answer protected questions.  If there's another reason to keep users from answering protected questions, such as  claim that:     For protected questions, you are expected to have experience on the target site itself. Experience at other sites is not enough.   then the message should be updated to reflect this.  Option 1:  make protected questions open to anyone who has >10 rep on that site and update the message to read:     This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have at least 10 reputation on this site.   Option 2:  leave protected questions the way they are, but update the message to read:     This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site to show that you have experience on this topic; experience on other StackExchange sites is not enough.   Option 3:  Answer with your own suggestions/improvements to these ideas.