In this program I'm printing a value from a calculation of type double to the screen.But at present the calculation is giving 14 decimal places.My question is,is there a facility in Java to wrap the output statement in that could specify the amount of decimal places?For example round(mark1,2)    The way it is printed at present is like this:   double markOne = intent.getDoubleExtra("number1", 0);  result1.setText(String.valueOf(markOne)+"mm");   Is it possible to wrap the setText in a Java method or would I have to create a custom format?Could someone give me an example of this with my code? Thanks
What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -&gt; 0.91239 0.912300 -&gt; 0.9123   What is the best way to achieve this in Java?
I haven't seen the question stated precisely in these terms, and this is why I make a new question.  What I am interested in knowing is not the definition of a neural network, but understanding the actual difference with a deep neural network.  For more context: I know what a neural network is and how backpropagation works. I know that a DNN must have multiple hidden layers. However, 10 years ago in class I learned that having several layers or one layer (not counting the input and output layers) was equivalent in terms of the functions a neural network is able to represent (see Cybenko's ), and that having more layers made it more complex to analyse without gain in performance. Obviously, that is not the case anymore.  I suppose, maybe wrongly, that the differences are in terms of training algorithm and properties rather than structure, and therefore I would really appreciate if the answer could underline the reasons that made the move to DNN possible (e.g. mathematical proof or randomly playing with networks?) and desirable (e.g. speed of convergence?) Adapt V-brakes bicycle to disk brakes I've been thinking in changing my v-brakes to disc brakes. Now that my rear v-brake can't brake anymore I think that it is time change it. I've already seen . My frame is prepared for disc and, as I don't want to change my brake lever, I'll go with mechanical brakes (does  look ok?);  The only problem is the rear wheel hub that has not the six holes for the disk. Is it ok if I just change the rear wheel hub and keep the front one? xdg-open on debian 9 fails to open browser I decided to try lxdm (was using fluxbox and xfce), and discovered that for many programs the url handler was failing, producing this error message;   Quite strange as you can see, it's prepending the user directory to the url.  The example here is from telegram, but it happens in discord, as well as when executing from the command line; xdg-open https://www.google.com produces a similar error. xdg-settings get default-web-browser output's firefox.desktop which works as a link in both xfce and lxdm.  More information; I ran bash -x on it and...  $ bash -x /usr/bin/xdg-open http://www.google.com + check_common_commands http://www.google.com + '[' 1 -gt 0 ']' + parm=http://www.google.com + shift + case "$parm" in + '[' 0 -gt 0 ']' + '[' -z '' ']' + unset XDG_UTILS_DEBUG_LEVEL + '[' 0 -lt 1 ']' + xdg_redirect_output=' &gt; /dev/null 2&gt; /dev/null' + '[' xhttp://www.google.com '!=' x ']' + url= + '[' 1 -gt 0 ']' + parm=http://www.google.com + shift + case "$parm" in + '[' -n '' ']' + url=http://www.google.com + '[' 0 -gt 0 ']' + '[' -z http://www.google.com ']' + detectDE + unset GREP_OPTIONS + '[' -n LXDE ']' + case "${XDG_CURRENT_DESKTOP}" in + DE=lxde + '[' xlxde = x ']' + '[' xlxde = x ']' + '[' xlxde = x ']' + '[' xlxde = xgnome ']' + '[' -f /run/user/1000/flatpak-info ']' + '[' xlxde = x ']' + DEBUG 2 'Selected DE lxde' + '[' -z '' ']' + return 0 + case "${BROWSER}" in + case "$DE" in + open_lxde http://www.google.com + pcmanfm --help -a is_file_url_or_path http://www.google.com ++ file_url_to_path http://www.google.com ++ local file=http://www.google.com ++ echo http://www.google.com ++ grep -q '^file:///' ++ echo http://www.google.com + local file=http://www.google.com + echo http://www.google.com + grep -q '^/' ++ pwd + file=/home/nesmerrill/.local/share/applications/http://www.google.com + pcmanfm /home/nesmerrill/.local/share/applications/http://www.google.com + '[' 0 -eq 0 ']' + exit_success + '[' 0 -gt 0 ']' + exit 0   The important part seems to be pcmanfm --help -a is_file_url_or_path http://www.google.com but, that command if that's how it was used, doesn't seem to do much of anything?  $ pcmanfm --help -a is_file_url_or_path http://www.google.com Usage:   pcmanfm [OPTION…] [FILE1, FILE2,...]    Help Options:   -h, --help                   Show help options   --help-all                   Show all help options   --help-gtk                   Show GTK+ Options  Application Options:   -p, --profile=PROFILE        Name of configuration profile   -d, --daemon-mode            Run PCManFM as a daemon   --no-desktop                 No function. Just to be compatible with nautilus   --desktop                    Launch desktop manager   --desktop-off                Turn off desktop manager if it's running   --desktop-pref               Open desktop preference dialog   --one-screen                 Use --desktop option only for one screen   -w, --set-wallpaper=FILE     Set desktop wallpaper from image FILE   --wallpaper-mode=MODE        Set mode of desktop wallpaper. MODE=(color|stretch|fit|crop|center|tile|screen)   --show-pref=N                Open Preferences dialog on the page N   -n, --new-win                Open new window   -f, --find-files             Open a Find Files window   --role=ROLE                  Window role for usage by window manager   --display=DISPLAY            X display to use In Windows 7, I know you can do Windows + Left to put a window in the left half of the screen.  Is there a feature that will do top and bottom? Is there any way to use a nether portal to travel to y = 250? Mongo find documents where array contains x values of given array I need to group 400 points in 10 groups with 40 points each. The goal is to get the 40 points geographicly together like this:        Any idea how to do this with QGIS? How does the Girl-Genius web-comic relate to the Agatha H. books? After spending some time reading  I was convinced to buy the book.  I've ordered what I think is the  in my local bookstore (yay local) and it seems to relate to the first one or two years of of web content, but I can't be sure.  My question is: "how does the book series line up with the Web comic?"  Does it contain specific episodes/adventures, relate to strips from a specific time-span or is it simply an assortment of episodes?  UPDATE: They are amazing.  It is interplanetary war in the introduction!!!!  Yes! Meaning of 'const' last in a function declaration of a class? What would be the differences between a persistent USB Live Session and a installed Ubuntu in a USB drive? I'm a teacher and will ask my students to either bring their laptops with Ubuntu installed with an specific list of packages preinstalled or bring a USB Drive or External Hard Drive with Ubuntu and the packages preinstalled.  For those who are going to bring the USB are two posibilities:   Install with the Ubuntu's "Startup disk creator" program, and telling it to reserve some space for persistence. Boot with a LiveCD and Install Ubuntu in the USB drive.   Then, in either case, boot with that media and install the packages.  So, for my purpose or any other purpose:   What is the best choice and why? Do we have another option? full explanation please. Is smell a bad way of determining whether meat is still good? The score for the 4 questions are 111, 1218, 261 and 5 respectively, but they display 2 digits per line. This is an obvious bug in design. Suppose I have 30 numbers that vary between 0 and 1.0 and which sum to 1.0.  The mean is obviously 0.033.  A client wants these scaled to lie between 0 and 1.0 but to have a mean of 0.5.  By the way, I'll probably have to do this for any set of numbers (positive, negative, outside the range 0 - 1) so that they lie in the range 0 - 1 and have a mean 0.5.  Any suggestions? I would like to define a theorem environment with custom layout. In particular, I want the body of the theorem to be indented, like this  Text body. Text body. Text body.  Theorem 1 (Pythagoras).     Let a,b,c the sides of a rectangular triangle.     Without loss of generality, we assume that  a&lt;b&lt;c .     Then, the following equality holds:            a^2 + b^2 = c^2  More text. And even more text.   This is similar to the quote environment, I believe.  How can I do this?  Preferably, I would like to use the existing \newtheorem command, but that's not mandatory. How to store date/time and timestamps in UTC time zone with JPA and Hibernate Possible Duplicate:          Can anyone offer me advice on how to clean my camera's sensor?   Should I do this myself, or take the camera to a professional? Is it precarious, or easy with the right amount of care?   I have a Nikon D3000 that has a small dot off-center of the sensor. I believe it is dirt, and I would like to remove it. I'm tempted to use a cotton-bud, but I'm afraid that I might damage the sensor.  The dot appeared after a trip to a tropical area where the camera became wet. I took the lens off and a lot of moisture, and possibly some dirt, went into the camera. The lens became fogged-up.  When I returned from my trip I ran a hair dryer for (air only, without heat) 10 minutes through the battery compartment, believing this would circulate around and dry the camera. Consequently, I noticed many speckled dots around the sensor. I also believe there's a subtle but persistent haze when I look through the lens, but I could be wrong.  It's worth noting that the photos are fine, with no evidence of distortion or blurring. The camera is now dry and it's been months since this happened. But the dot on the sensor has been there since, like an itch I can't rub. How can I calculate this limit? ideas? How can I calculate this limit? $$\lim_{n\rightarrow\infty} \frac{7^{\sqrt{n+1}-\sqrt{n}}\cdot(\frac{n+1}{2})!\cdot(\frac{n+1}{2})!}{(n+1)\cdot(\frac{n}{2})!\cdot(\frac{n}{2})!}$$ I don't have idea and I will be happy for help. Pdf of the square of a standard normal random variable A problem of Schwarz-Pick theorem in complex analysis Set $f \in H(B(0,1)),f(B(0,1)) \subset B(0,1)$，prove that $$|f(z)-\frac{f(0)(1-|z|^2)}{1-|f(0)|^2||z|^2}| \le \frac{|z|(1-|f(0)|^2)}{1-|z|^2|f(0)|^2}$$  I think this problem is supposed to be proved by Schwarz-Pick theorem, I tried hard but failed to build a function to prove it. I even doubted that this problem is wrong, so I want to whether this problem can be proved or be falsified, and how.  Any help would be appreciated. Anyone ever seen a "wok adapter" for induction cooktops? In theory a cheap pressed steel wok would work on an , but the "contact patch" for a traditional round bottomed wok would be so small it would be ineffective.  Has anyone seen a steel or cast-iron "wok adapter" with a flat bottom and a concave "bowl" on top to sit the wok in, serving dual purposes of supporting the wok on the stovetop and transferring the induction heat to the wok?  Could anyone speculate if this would this even work? Or wouldn't you be able to get the wok hot enough?