System.out.println() is printing [S@123772c4 instead of actual string
What's the simplest way to print a Java array?
How to make a file (e.g. a .sh script) executable, so it can be run from a terminal I have a script.sh file and type of this file is shellscript file. I want to make this file as application/x-executable file. How can I make it? Children’s books, one in space setting, the other in a jungle How to copy text out of a PDF without losing formatting? How to do relative imports in Python? Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function? Explaining Infinite Sets and The Fault in Our Stars In watching The Fault in Our Stars I could not help but cringe at a line that flew in the face of mathematics and subsequently ruined the movie for me:     "There are infinite numbers between 0 and 1. There's .1 and .12 and .112 and an infinite collection of others. Of course, there is a bigger infinite set of numbers between 0 and 2, or between 0 and a million. Some infinities are bigger than other infinities." - John Green   While walking out of the theater I tried to explain to my friends why there were, in fact, exactly the same amount of numbers between 0 and 1 as 0 and 2, but Cantor and bijective functions are not great learning tools to English majors.  Does anybody have an eloquent or elegant way to enumerate this phenomenon using an example accessible to those not familiar with advanced mathematics? Practical hyperparameter optimization: Random vs. grid search Redirect all requests to HTTPS, except for one subdirectory I'm trying to move from self-signed certificates to Let's Encrypt certificates on my nginx webserver.  Currently, I redirect all requests to http/80 to https/443, which uses a self signed certificate I created a while ago.  Now - from what I understand Let's Encrypt makes a request to port 80 (as I am using the webroot option of certbot). These requests are redirected, which renders the certificate generation unsuccessful.  I tried to achieve this with the following server block, listening at port 80:  server {         listen  80;              server_name     sub.domain.tld;         server_tokens   off;           location /.well-known {                 root /var/www/letsencrypt;         }          location / {                 return 301 https://$host$request_uri;         } }   But requests to /.well-known are redirected to https/443 anyways.  How can I redirect all requests from http/80 to https/443, except the requests to /.well-known/? Function whose inverse is also its derivative? What are some good examples of a function  $f : \mathbb{R} \to \mathbb{R}$ where its derivative is equal to its inverse? I attempted to find a monomial that satisfied it by starting with $f(x) = ax^b$ and showing that $f^{-1}(x) = f'(x) \implies b-1=\frac{1}{b} \implies b=\phi$ and got $$f(x) = \frac{x^\phi}{\sqrt[\phi]{\phi}}$$ Which seems to work according to WolframAlpha, but I'm having trouble double-checking it. Any other ideas? Different probability density transformations due to Jacobian factor $ \frac{1}{a^{2} + b^{2} + 1} + \frac{1}{b^{2}+c^{2}+1} + \frac{1}{c^{2} + a^{2} + 1} \ge 1 $, prove $ab + bc + ca \le 3$ If $a,b,c$ real numbers such that $$ \frac{1}{a^{2} + b^{2} + 1} + \frac{1}{b^{2}+c^{2}+1} + \frac{1}{c^{2} + a^{2} + 1} \ge 1 $$,  prove that $ab + bc + ca \le 3$.     Attempt:  Assume that $a,b,c &gt; 0$.   $$ \frac{1}{a^{2} + b^{2} + 1} + \frac{1}{b^{2}+c^{2}+1} + \frac{1}{c^{2} + a^{2} + 1} \ge 1  $$ $$ \implies  (a^{2} + b^{2} + 1)(b^{2}+c^{2}+1) + (a^{2} + b^{2} + 1)(a^{2}+c^{2}+1) +  (a^{2} + c^{2} + 1)(b^{2}+c^{2}+1) \ge (a^{2} + b^{2} + 1)(b^{2}+c^{2}+1)(c^{2} + a^{2} + 1)$$  $$ \implies  ((ab)^{2} + (ac)^{2} + (bc)^{2} + a^{2} + 2 b^{2} + c^{2} + b^{4} + 1) + ((ab)^{2} + (ac)^{2} + (bc)^{2} + b^{2} + 2 a^{2} + c^{2} + a^{4} + 1) + ((ab)^{2} + (ac)^{2} + (bc)^{2} + a^{2} + 2 c^{2} + b^{2} + c^{4} + 1) \ge (a^{2} + b^{2} + 1)(b^{2}+c^{2}+1)(c^{2} + a^{2} + 1)$$  $$ \implies  3((ab)^{2} + (ac)^{2} + (bc)^{2}) + 4(a^{2} + b^{2} + c^{2}) + (a^{4}+b^{4}+c^{4}) + 3  \ge (a^{2} + b^{2} + 1)(b^{2}+c^{2}+1)(c^{2} + a^{2} + 1)$$  Next, notice  $$(a^{2} + b^{2} + 1)(b^{2}+c^{2}+1)(c^{2} + a^{2} + 1) = ((ab)^{2} + (ac)^{2} + (bc)^{2} + a^{2} + 2 b^{2} + c^{2} + b^{4} + 1)(c^{2} + a^{2} + 1) $$ $$ = (abc)^{2} + a^{2}c^{4} + b^{2}c^{4} + (ac)^{2} + 2(bc)^{2} + c^{4} + b^{4}c^{2} + c^{2} + a^{4} b^{2} + a^{4}c^{2} + (abc)^{2} + a^{4}  + 2(ab)^{2} + (ac)^{2} + b^{4}a^{2} + a^{2} +  (ab)^{2} + (ac)^{2} + (bc)^{2} + a^{2} + 2 b^{2} + c^{2} + b^{4} + 1 $$ $$ = 2(abc)^{2} + 3(ac)^{2} + 3(bc)^{2} + 3(ab)^{2} + c^{4}a^{2} + c^{4} b^{2} + b^{4}a^{2} + b^{4} c^{2} + a^{4}b^{2} + a^{4} c^{2} + a^{4} + b^{4} + c^{4} + 2(a^{2} + b^{2} + c^{2}) + 1  $$  So we have  $$ \frac{1}{a^{2} + b^{2} + 1} + \frac{1}{b^{2}+c^{2}+1} + \frac{1}{c^{2} + a^{2} + 1} \ge 1 $$ $$ \implies  2(a^{2} + b^{2} + c^{2}) +  3  \ge 2(abc)^{2}  + c^{4}a^{2} + c^{4} b^{2} + b^{4}a^{2} + b^{4} c^{2} + a^{4}b^{2} + a^{4} c^{2} + 1 $$ Proving a combinatorial identity without double counting Consider the following problem:  We have a collection of m white and n black balls. We pick k balls (k ≤ m+n) without replacement. What is the expected number of white balls in the sample?  Counting method 1: The ratio of white balls in the collection is m/(m+n). If we repeatedly sample the collection, we expect that on average, our sample has the same ratio. Therefore, the expected number of white balls in a sample of size k is km/(m+n). As a side note, I think the above argument somehow depends on the unbiasedness of  the mean estimator. Am I right?  Counting method 2: We directly compute the expected number of white balls in the sample: $$ \frac{\sum_{i=0}^{k} i\binom{m}{i}\binom{n}{k-i}}{\binom{m+n}{k}} \enspace.$$  So, we reach at the identity: $$ \sum_{i=0}^{k} i\binom{m}{i}\binom{n}{k-i} = \frac{km}{m+n}\binom{m+n}{k} \enspace.$$  How to prove the above result without double counting? It seems to be provable using  as well as $i\binom{m}{i} = m\binom{m-1}{i-1}$. But is there a simpler approach (which does not depend on extra identities such as Vandermonde's)? Importance of series resistor at output of Rectifier Why does Venus spin in the opposite direction? Given: Law of Conservation of Angular Momentum.   Reverse spinning with dense atmosphere (92 times > Earth &amp; CO2 dominant sulphur based). Surface same degree of aging all over. Hypothetical large impact is not a sufficient answer.   Assuming any object large enough to alter a planets rotation or even orbit would likely destroy most of its shape, yet Venus has retained a spherical property with a seemingly flat, even terrain indicating no volcanoes,and few if any visible meteor impacts. It would be fragmented and dispersed for billions of years.  Even the question of what meteor, comet, asteroid composition could survive traveling that close to the sun's temperature, radiation, electromagnetic energy, solar flares, or gravity to equal a mass reactionary change as to alter it's spin. How does iCloud Photo Library's "Optimize iPhone Storage" setting work in relation to other photo apps on iOS? If I have Optimize iPhone Storage enabled on my iPhone and my phone storage is completely full, I understand that iOS will only store a low-res thumbnail of many of my photos on the device. (The full high-res version of the image will only exist in iCloud and on devices with Download and Keep Originals enabled.)  But when only thumbnails exist on the device, how does that work in relation to other photo apps on iOS? For example, do third-party cloud-based photo apps (like Google Photos, Dropbox's Carousel, or Amazon Prime Photos) have access to the full high-res images from the iCloud Photo Library? Or will they only see the low-res thumbnails in some cases? I have an issue with my website: Google isn’t using my meta description, instead it’s using the content of the web page and I’m really confused.  Reason I’m confused is because I have checked and I don’t have duplicate page titles, description nor keywords, neither do I have any robots.txt for my website. My page title, description and keyword is unique, and page description is about 150 characters.  I have my site in Google Webmaster Tools and I checked for errors, but found none.  So I really don’t know why Google Search isn’t using my meta description. Unable to install rJava in R 3.0 in Ubuntu 13.04 Do the beacon lighters really live on top of the mountains? Following this image I found online:    Do the beacon lighters really live on top of the mountains?  It seems really cold on top of some of these mountains and there are no villages or whatsoever. Can I force an iPhone user to upgrade an application? Expectation of Exit Time of Brownian Motion from Interval I am trying to solve the following:  Let $W_t$ be a brownian motion and $a,b &gt;0.$  Define $\tau$ to be the exit time of $W_t$ from $[-a,b]$, that is $$\tau = \inf\{t \ge 0\ :\ W_{t}(\omega) \notin [-a,b]\}.$$  Show that $\tau$ is integrable and compute $\mathbb{E}(\tau)$.  I have seen this stated without proof multiple places that $\mathbb{E}(\tau)=ab.$  What is the logical argument that backs up this statement?  How are we guaranteed $\tau$ is integrable?