Base and suffix String java
How do I compare strings in Java?
What and where are the stack and heap? Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster? Passing named arguments to shell scripts Is there any easy way to pass (receive) named parameters to a shell script?  For example,   my_script -p_out '/some/path' -arg_1 '5'   And inside my_script.sh receive them as:  # I believe this notation does not work, but is there anything close to it? p_out=$ARGUMENTS['p_out'] arg1=$ARGUMENTS['arg_1']  printf "The Argument p_out is %s" "$p_out" printf "The Argument arg_1 is %s" "$arg1"   Is this possible in Bash or Zsh? Distribution of range of Uniform $(0,1)$ distribution Let $X_1,...,X_n$ be iid as $U \sim [0,1]$ with pdf $f(x) = 1(0 &lt;x&lt; 1)$. Determine the range distribution.   I have managed to determine the distribution of the minimum and the maximum, however I cannot/do not know how to determine the distribution of range.   Minimum:  $f_N = n(1-x)^{n-1}$ and maximum $f_M= nx^{n-1}$   I am aware that the calculation of range distribution is based on convolution: $f_R=\int f_{N,M}(x,x-r)dx$, However I cannot get the correct result, which according to my lecture slides is : $f_R= n(n-1)r^{n-2}(1-r)$  Could someone break this down for me ? My math background is not great Mirror Modifier making ugly smoothing on mirrored faces The model is vivisected right down the middle along the z axis. The right leg is rendering funny and I assume if I can get that fixed everything else will fall into place. I tried flipping normals, changing shading types - can't think of anything else to do. Often floats may land quite a bit later in the document than the point they are created, sometimes after a section break.  Is there a way to force a new section to start on a new page, after any unplaced floats? Let $X$ be a space that satisfies the hypotheses used to construct a universal cover $\overline{X}$. Let $\pi = \pi_1(X)$ and consider the action of the group $\pi$ on the space $\overline{X}$ given by the isomorphism of $\pi$ with $\text{Aut}(\overline{X})$. Let $A$ be an abelian group and let $\mathbb{Z}[\pi]$ act trivially on $A$, $a \cdot \sigma = a$ for $\sigma \in \pi$ and $a \in A$.  Now, assume that $X$ is a CW complex. How do I see that $\overline{X}$ is a CW complex such that the action of $\pi$ on $\overline{X}$ induces an action of the group ring $\mathbb{Z}[\pi]$ on the cellular chain complex $C_*(\overline{X})$ such that each $C_q(\overline{X})$ is a free $\mathbb{Z}[\pi]$-module and$$C_*(X; A) \cong A \otimes_{\mathbb{Z}[\pi]} C_*(\overline{X})?$$ sorry fresh user. I installed about 9 days ago and had issues with Unity disappearing which took 5 days of headaches to fix. It never did fix, I reinstalled.   I set up Plex (media server) and while the server is running and can be accessed by external network devices, I can't add files. Plex says this is because of permissions. I have gone up and down the forums here and at Plex to get an answer. It seems everyone says   chmod -R 755 /media/My\ Book/Videos   will change permissions to allow the folder "Videos" on my external USB 2.0 NTFS 3TB Western Digital drive (which is mounted and accessible through the file manager) as well as every sub-directory and file contained therein to be accessible to user "Plex".  I have used file manager and as soon as you click to change permissions it changes right back. When I chmod with -c it tells me every file is changed (usually 600) to 755 as I commanded it to do. I did   ls -l   to verify and there is no change. (I also used ls -l to make sure I knew who the owner was and it is me (mvl1014). ls -al gives me the same info.)  I swear to god I tried to sudo it and after smashing my head against this keyboard for basically the entirety of my day, I tried it as root. I was scared shi-less but couldn't come up with anything else. sudo su to root and then chmod -R -c /media/My\ Book/Videos  Same result. -c told me every single file was changed and a check in Unity or in terminal confirmed not a darn thing changed.  Now it seems to me that even if that isn't the thing stopping Plex from working there is still a problem with this command not going through.  12.04LTS -- on gen 1 i7 (2.7 GHz I believe) with 6 GB ram   I've attempted to attach a screenshot but I'm told I need 10 reps to do so, which means I'm copy/pasting too.  Please excuse my obfuscation, but Lorem Ipsum seemed unnecessary. And I tried multiple ways to format this but it looks perfect every way and messed up each time in the preview below. (Ugh, I'm a mess.)  $ chmod -R -c 755 /media/My\ Book/Videos  .....  .....  .....  mode of `/media/My Book/Videos/xxxx/xxxx/xxxx.mkv' changed from 0600 (rw-------) to 0755 (rwxr-xr-x)    ls -al shows:  mvl1014@FX6800:/media/My Book/Videos$ ls -al   total 88  drwx------ 1 mvl1014 mvl1014     0 Aug 28 15:17 .   drwx------ 1 mvl1014 mvl1014 20480 Sep  3 14:29 ..  drwx------ 1 mvl1014 mvl1014  8192 Aug 28 15:18 xxxx drwx------ 1 mvl1014 mvl1014 49152 Aug 16 14:02 xxxx drwx------ 1 mvl1014 mvl1014  8192 Aug 27 21:36 xxxx drwx------ 1 mvl1014 mvl1014  4096 Jul 23 19:09 xxxx   I apologize if this has been asked. I looked through this place plus at all the suggested "Similar Questions". The closet thing I got to an answer , but running the provided code with my own UID didn't work either. I have come across a question about determining possible minimal polynomials for a rank one linear operator and I am wondering if I am using the correct proof method.  I think that the facts needed to solve this problem come from the section on Nilpotent operators from Hoffman and Kunze's "Linear Algebra".     Question: Let $V$ be a vector space of dimension $n$ over the field $F$ and consider a linear operator $T$ on $V$ such that $\mathrm{rank}(T) = 1$.  List all possible minimal polynomials for $T$.   Sketch of Proof:   If $T$ is nilpotent then the minimal polynomial of $T$ is $x^k$ for some $k\leq n$.  So suppose $T$ is not nilpotent, then we can argue that $T$ is diagonalizable based on the fact that $T$ must have one nonzero eigenvalue otherwise it would be nilpotent (I am leaving details of the proof of diagonalization but it is the observation that the characteristic space of the nonzero eigenvalue is the range of T and has dimension $1$).  Thus the minimal polynomial of $T$ is just a linear term $x-c$.    Did I make a mistake assuming that $T$ can have only one nonzero eigenvalue?  Thanks for your help I've already installed Steam, but when I click on the program I get this message  ERROR- You are missing the following 32-bit libraries, and Steam may not run: not   I don't know what to install or even do. Identifying a short story about time travel and paradoxes Why do clocks measure arc-length? Apologies in advance for the long question.  My understanding is that in GR, massive observers move along timelike curves $x^\mu(\lambda)$, and if an observer moves from point $x^\mu(\lambda_a)$ to $x^\mu(\lambda_b)$, then his clock will measure that an amount of time $t_{ba}$ given by the curve's arc length; $$   t_{ba} = \int_{\lambda_a}^{\lambda_b}d\lambda \sqrt{-g_{\mu\nu}(x(\lambda))\dot x^\mu(\lambda)\dot x^\nu(\lambda)} $$ will have elapsed where $g_{\mu\nu}$ is a metric on spacetime with signature $(-,+,+,+)$.    Why is this so?     Here is how I would attempt to justify this fact in special relativity with $g_{\mu\nu} = \eta_{\mu\nu}$.  Consider an inertial observer $O$ in $\mathbb R^{3,1}$, and suppose that this observer sees a clock, which I'll call observer $O'$ moving around on a curve $x^\mu(\lambda)$.  If $O'$ were also an inertial observer, then given any event with coordinates $x^\mu$ as measured by $O$, observer $O'$ would measure the coordinates of the event to be $x'^\mu = \Lambda^\mu_{\phantom\mu\nu} x^\nu + x_0^\mu$ for some Lorentz transformation $\Lambda$.  If $O'$ is not inertial, then this is no longer true, and there is some more complicated family of transformations, say $T_\lambda$ between events as seen by both observers.  I would argue, however, that if we were to partition the interval $[\lambda_a, \lambda_b]$ into a large number $N$ of intervals $I_1=[\lambda_a, \lambda_i], \dots, I_N=[\lambda_{N-1}, \lambda_b]$ with $\lambda_n = \lambda_a+n\epsilon_N$ and $\epsilon_N=(\lambda_b-\lambda_a)/N$, then on each interval $I_n$, $O'$ is approximately an inertial observer in the sense that $$   T_{\lambda_n} = P_n + \mathcal O(\epsilon_N), \qquad (\star) $$ for some Poincare transformation $P_n$.  Then we would note that since $O'$ is stationary in his own reference frame, he measures his worldline to have the property $\dot x'^\mu(\lambda) = (\dot t(\lambda), \mathbf 0)$ so that $$   I_{ba}=\int_{\lambda_a}^{\lambda_b}d\lambda \,\sqrt{-\eta_{\mu\nu}\dot x'^\mu\dot x'^\mu} = \int_{\lambda_a}^{\lambda_b} d\lambda \, \sqrt{\dot t^2} = t(\lambda_b) - t(\lambda_a) = t_{ba} $$ On the other hand the integral on the left can be written as a Riemann sum using the partition above, and we can invoke ($\star$) above to get \begin{align}   I_{ba}  &amp;= \lim_{N\to\infty}\left[\sum_{n=1}^N \epsilon_N\sqrt{-\eta_{\mu\nu}\dot x'^\mu(\lambda_n)\dot x'^\nu(\lambda_n)}\right] \notag\\ &amp;= \lim_{N\to\infty}\left[\sum_{n=1}^N \epsilon_N\sqrt{-\eta_{\mu\nu}\dot x^\mu(\lambda_n)\dot x^\nu(\lambda_n)} + \mathcal{O}(\epsilon_N^2)\right] \notag\\ &amp;= \int_{\lambda_a}^{\lambda_b}d\lambda \,\sqrt{-\eta_{\mu\nu}\dot x^\mu\dot x^\mu} \end{align} Combining these two computations gives the desired result.  How do others feel about this argument?  I'm not completely comfortable with it because of the assumption $(\star)$ I made on $T_\lambda$.  I imagine that in GR a similar argument could be made by invoking local flatness of the metric. How fast does electricity flow? How to know if other threads have finished? What to do when witches appear early in the game? A long time ago I played an older version of Minecraft. Back then witches didn't spawn naturally, so you couldn't find them unless you found a hut. Now I'm playing again, but sometimes when I go down a cave I find one or two witches, and it's really hard to find them back.   So, what is the best you can do to kill witches, specially when two spawn at the same time and you don't have milk? How to properly set up a PDO connection My last name is not the same on ticket as on passport; rest of details are same What’s the rule for using “who” and “whom” correctly? I can never figure out whether I should use who and whom. Most people use who for both colloquially, but some people say this is not correct.  What’s the rule for using who and whom correctly? How do I make Chromium use Flash from Google Chrome? Now, that Adobe has stopped issuing new releases for Linux desktops, the only option for users is to use Google Chrome, for those who want to use the latest Flash updates. I use Chromium. Is there any way to get Chromium use the Flash from Google Chrome? The reason I as this question is that I have noticed both these browsers run in the background, so technically, the browsers' plugins are available to use. In the top left corner of the post-race menu, there is a prompt to press + to add (or remove) one star out of six. What do these stars do? How to tell the probability of failure if there were no failures? I was wondering if there is a way to tell the probability of something failing (a product) if we have 100,000 products in the field for 1 year and with no failures? What is the probability that one of the next 10,000 products sold fail?