Print current line number in intellij I am trying to print the current line number(line number of ide) of a certain code from intellij. How do I do that?  1 System.out.print(getCurrentLineNo());//sample code 2 System.out.print(getCurrentLineNo());//sample code 3 System.out.print(getCurrentLineNo());//sample code 4 System.out.print(getCurrentLineNo());//sample code
How can we print line numbers to the log in java How to print line numbers to the log. Say when outputting some information to the log, I also want to print the line number where that output is in the source code. As we can see in the stack trace, it displays the line number where the exception has occurred. Stack trace is available on the exception object.  Other alternative could be like manually including the line number when printing to the log. Is there any other way?
How to restore the down arrow icon on the Downloads folder in the home directory? I removed the original Downloads folder in the home directory and created a new one with the same name, but the down arrow icon on the new Download folder now disappeared. Could someone please tell me how to restore that icon?   In addition, from the image above we see "Downloads" disappears also in "Places" category in the left panel. I think it should be there originally. If after restoring the down arrow icon, the "Downloads" is still not in "Places" category, I would also like to ask you to help me put "Downloads" back to "Places". Thank you.  PS: I am not using any theme. Limit $c^n n!/n^n$ as $n$ goes to infinity Let $c&gt;0$ be a real number. I would like to study the convergence of $a_n := c^n n!/n^n$, when $n \to \infty$, in function of $c$.   I know (from  question) that $n!&gt;(n/e)^n$, so that $c^n n!/n^n&gt;1$ for $c ≥e$. But this doesn't imply that the sequence goes to infinity. And I'm not sure what to do for $c&lt;e$. I tried usual tests (D'Alembert...), without any success. I would like to avoid using Stirling approximation.  Thank you for your help! I've noticed that apps (such as Google Contacts Sync) that have been disabled using the stock Android (KitKat) app manager still show up as running when using process observer tools.  This is true even after the device has been rebooted.  Why are disabled apps still running?  Is there an effective (and safe) way to actually disable them?  Solutions requiring root privileges are acceptable.   (Note that for the specific example above, you can tell Android not to sync your contacts, but it still runs the Google Contacts Sync process.  But let's not dwell on that example... it's just an example.) Convert a string to an enum in C# What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do something like this: StatusEnum MyStatus = StatusEnum.Parse(&quot;Active&quot;);  but that isn't a valid code. extract the 4th column from a csv file using unix command I have a csv file formatted as below.  "col1","col2","col3","col4" "1","text1","&lt;p&gt;big       html      text&lt;/p&gt; ","4th column" "2","text2","&lt;p&gt;big2       html2      text2&lt;/p&gt; ","4th column2"   I want to extract the 4th column using.  I think that awk is the best tool for this ( let me know if I am wrong). I tried this   awk -F, '{print $4}' myFile.csv    but it fails.  I think because the 3rd column is multiline one.  How can I use awk or any other unix command to extract the 4th column.  I am looking for an efficient solution since my real file is big (> 2GB) I have an ec2 instance on AWS which already installed a few Wordpress-es in it.  I want to set things up to let more people handle their own projects, with me also being able to go into the server using terminal if I still want to.  I have been following tutorials such as  and a few others.  I figured all of them just teach users how to sftp into their own home folder, also the steps keep saying addUser but some users already existed and removing them might cause some issue.  How can I give existing users the permission to use SFTP for Wordpress projects?  Let's say all my Wordpress projects are already under /var/www/ which has already been set up with www-data:www-data.  Really new with setting things like this.  Thanks in advance for any help. When I'm on my mod site I have my diamond dropdown:    But on Meta.SE and other sites, I have the StackBurger:    This doesn't show on my mod site, so I can't switch between sites easily. What is wrong with this query? (Unknown error parsing query) When I run the following query in query editor I get this error.  Error     Unknown error parsing query   Query  SELECT Id, OwnerId,Account.OwnerId FROM Contact where OwnerId = Account.OwnerId limit 100   Does anybody know what the problem is? I'm looking for a formula to calculate the sum of $(a+b+c+d+...)^n$ but with coefficients equal to 1. For example in $(a+b+c)^2$. I want the sum of $a^2 + b^2 + c^2 + ab + bc + ca$. And for $(a+b+c+d)^3$, I want the sum of $a^3 + b^3 + c^3 + a^2b + a^2c + b^2a + b^2c + c^2a + c^2b + abc$. Similarly, I want the sum of expansion of $(a+b+c+d+e+....)^n$ with coefficient equal to 1. I tried to find the pattern by expanding the $(a+b+c)^2$. And I found that its formula is $a^2 + b^2 + c^2$ + $\frac{((a+b+c)^2 - a^2-b^2-c^2)}{2}$. This works for the power of 2. But fails on other powers. Any help will be really appreciated. I am unable to find the bias of the sample variance estimator in this problem. Unfortunately I keep coming up with   Question: Suppose that the true linear model is   $y = X_1\beta_1 + X_2\beta_2 + e$,   where $e \sim MVN(0,\sigma^2 I)$, $X_1: N \times p_1, \beta_1: p_1 \times 1, X_2: N \times p_2, \beta_2: p_2 \times 1$. But we wrongly fit the model  $y = X_1\beta_1+e$ and calculate the estimators of $\beta_1$ and $\sigma^2$ as:  $\hat{\beta}_1 = (X_1'X_1)^{-1}X_1'y$,  $s^2 = \large \frac{y'[I-X_1(X_1'X_1)^{-1}X_1']y}{N-p_1}$.  (a) Show that, in general, $\hat{\beta}_1$ is a biased estimator with  Bias$(\hat{\beta}_1) = (X_1'X_1)^{-1}X_1'X_2\hat{\beta}_2$  Under what condition on $X_1$ and $X_2$ is $\hat{\beta}_1$ unbiased?  (b) Show that, in general, $s^2$ is a biased estimator with   Bias$(s^2) = \frac{1}{N-p_1}\beta_2'X_2'[I-X_1(X_1'X_1)^{-1}X_1']X_2\beta_2$  Is the bias positive or negative? Under what condition on $\beta_2$ is $s^2$ unbiased?  Attempt:  For part (a):  Bias$(\hat{\beta}_1) = E((X_1'X_1)^{-1}X_1'y - \beta_1)$  $\hspace{15mm}= (X_1'X_1)^{-1}X_1'E(y) - \beta_1$  $\hspace{15mm}= (X_1'X_1)^{-1}X_1'(X_1\beta_1 + X_2\beta_2) - \beta_1$  $\hspace{15mm}= (X_1'X_1)^{-1}X_1'X_1\beta_1 + (X_1'X_1)^{-1}X_1'X_2\beta_2) - \beta_1$  $\hspace{15mm}= I\beta_1 + (X_1'X_1)^{-1}X_1'X_2\beta_2 - \beta_1$  $\hspace{15mm}= \beta_1 + (X_1'X_1)^{-1}X_1'X_2\beta_2 - \beta_1$  $\hspace{15mm}= (X_1'X_1)^{-1}X_1'X_2\beta_2$  If $X_1$ and $X_2$ are orthogonal, then $\hat{\beta}_1$ is unbiased.  For part (b), I am unable to figure out how to derive:  Bias$(s^2) = \frac{1}{N-p_1}\beta_2'X_2'[I-X_1(X_1'X_1)^{-1}X_1']X_2\beta_2$  I can get   $\frac{1}{N-p_1}\beta_1'X_1'+\beta_2'X_2'[I-X_1(X_1'X_1)^{-1}X_1']X_1\beta_1+X_2\beta_2$  after taking the expectation of y on both sides.   Any help would be much appreciated. This is solely a reference request. I have heard a few versions of the following theorem:     If the joint moment generating function $\mathbb{E}[e^{uX+vY}] = \mathbb{E}[e^{uX}]\mathbb{E}[e^{vY}]$ whenever the expectations are finite, then $X,Y$ are independent.   And there is a similar version for characteristic functions. Could anyone provide me a serious reference which proves one or both of these theorems? Density function for RV The density function for a random variable X is given in terms of a constant $c$.  Find the value of $c$.  What is the corresponding distribution function?  Sketch both the density and the distribution functions. Finally, find the probabilities.  5.1 $f(x)=0$ for $x&lt;0$ and $f(x)=\frac{c}{(x+1)^4}$ for $0&gt;x$   $P(X&gt;4)$  $P(X&lt;2)$  $P(1\le\ X&lt;3)$   I get $c=3$ by taking the integral, and then I am a little confused as to why  $F(x)=1-\frac{1}{(x+1)^3}$  Is that because in solving for $c$, I ended up with $1=\frac{c}{3(x+1)^3}$, so substituting c in I get $1=\frac{1}{(x+1)^3}$?  And, then  $P(X&gt;4)=1-P(X\le\ 4)$ $=1-(1-{1}{(1+4)^3})$ $=1/125$  $P(X&lt;2)=1-{1}{(1+2)^3}$ $=26/27$  I guess I am a little confused about what $F(x)$ and $f(x)$ actually MEAN? And thus that leads to my confusion about what the differences between $&gt;$ and $&lt;$ and greater than or equal to are, etc etc in terms of the equations. The ones above I solved by comparing to the book but I still don't understand what they mean really.  So as a result, I don't really get how to solve $P(1\le\ X&lt;3)$.  5.2 $f(x)=ce^x$ for $x&lt;0$ and $f(x)=ce^{-x}$ for $0&gt;x$  5.3 $f(x)=0$ for $x&lt;-1$ or $x&gt;2$ and $f(x)=cx^2$ for $-1&lt;x&lt;2$ Annotation Scaling I made a map with annotations in QGIS 3.0.  This is how it looks like in the layout view:    If I print the map as PDF, one would expect to get the PDF to be WYSIWYG, right? However, it looks like this (it's about half the size):    Is there a way to influence the the scaling of the Annoations? I already tried to play with the Scale and Magnifier in the map view. I also tried to change the Scale in the map item.   The strange thing is, I believe it worked a few days ago. But today I installed QGIS 3.0 on a new PC and it showed the same behaviour... How does Mathematica integrate? How to show or hide Keyboard Viewer with a keyboard shortcut? I would like to display and hide the Keyboard Viewer using a shortcut.   Is there a way to display the Keyboard Viewer via a keyboard shortcut? Is there a way to automatically display the Keyboard Viewer once I switch to a specific language? I'm learning calculus, specifically derivatives and applications of MVT, and need help with the following exercice:      Show that, for all $n &gt; 1$ $$\frac{1}{n + 1} &lt; \log(1 + \frac1n) &lt; \frac1n.$$    I tried to follow the below steps in order to prove the RHS inequality:   Proving that $f &lt; g$ on $I$ from $a$ to $b$:  Step $1$. Prove that $f' &lt; g'$ on $\operatorname{Int}(I)$.  Step $2$. Show that $f(a) \leq g(a)$ or that $f(a^+) \leq g(a^+)$  Following the above steps, let $f(x) = \log(1 + \frac1x)$ and $g(x) = \frac1x$, for all $x &gt; 1$. One has  $$f'(x) =  -\frac{1}{x^2 + x} \quad \text{and} \quad g'(x) = -\frac{1}{x^2}.$$  We note that, for every $x &gt; 1$, $f'(x) &gt; g'(x)$. Moreover, $f(1^+) = \log(2) &lt; 1 = g(1^+).$   My problem is that I got the wrong inequality sign in Step $1$.    Looking at the solution in my textbook, the author suggests using the MVT but I don't know how to apply it in this case. Suppose that $(U,V)$ has the following joint pdf: $$f_{U,V}(u,v)=\exp(-\theta u-\theta^{-1}v)$$ , where $u\geq0$, $v\geq0$, $\theta&gt;0$. Define $X=UV$ and $Y=U/V$. Find the marginal pdf of $X$ and $Y$.  With transformation, I got $U=\sqrt{XY}$ and $V=\sqrt{X/Y}$ and the absolute value of Jacob is $1/2Y$. Then, the joint pdf of $(X,Y)$ is  $$f_{X,Y}(x,y)=\exp(-\theta \sqrt{XY}-\theta^{-1}\sqrt{X/Y})1/2Y, X,Y&gt;0.$$  But I am not sure how to get the marginal pdf?  Thank you! Bug in Mathematica TeXForm generating \left\left Do null and alternative hypotheses have to be exhaustive or not? I saw a lot of times claims that they have to be exhaustive (the examples in such books were always set in such way, that they were indeed), on the other hand I also saw a lot of times books stating they should be exclusive (for example $\mathrm{H}_{0}$ as $\mu_1=\mu_2$ and $\mathrm{H}_{1}$ as $\mu_1&gt;\mu_2$) without clarifying the exhaustive issue. Only before typing in this question I found somewhat stronger statement on the  -- "The alternative need not be the logical negation of the null hypothesis".  Could someone more experienced explain which is true, and I would be grateful for shedding some light on the (historical?) reasons for such difference (the books were written by statisticians after all, i.e. scientists, not philosophers). PhD duration in the USA I am trying to find out what the average duration of PhD studies are in the USA. Here in Spain it used to be 4 years, but it seems that Europe is moving towards a 3-year scheme since students are expected to do their MSc before they start. What is it like in the USA? Is some kind of shortening also occurring?