Pass-by-value (StringBuilder vs String)
Is Java "pass-by-reference" or "pass-by-value"?
Why are my converted CMYK blacks coming out grey? I'm having a rather annoying problem! I have RGB images made in Photoshop that I need to convert to CMYK.  When I save the file my black background is converted to a light grey! I tried deleting my background and adding a pure black background in my PSD file but even that comes out grey! There is no way to save black? The colors all look fine in Photoshop, it's just when I save them as TIFF/JPEG.  How can I prevent this? Interpretation of ROC curve I have a ROC curve like the figure below:   What can be inferred given this kind of curve in general?  What are the differences of states 1, 2 and 3 in the figure?  What causes the diagram to jump straight from state 1 to state 3? Most of the ROC curves on the internet look like the figure below: Suppose we have a natural number $n \ge 0$.  Given natural numbers $\alpha_1,\ldots,\alpha_k$ such that   $k\le n$ $\sum_i \alpha_i = n$   what is the maximum value that $\Pi_i \alpha_i$ can take?  I'm quite sure that there is a theorem telling me the result, but I cannot find it. For sure an upper bound is $n^k$ but I'm searching for a real upper bound. I'm pretty sure that upper the bound should be $n^2$, but I don't know I could prove it. How do I create a PDO parameterized query with a LIKE statement? Here's my attempt at it:  $query = $database-&gt;prepare('SELECT * FROM table WHERE column LIKE "?%"');  $query-&gt;execute(array('value'));  while ($results = $query-&gt;fetch())  {     echo $results['column']; } Injecting variables into an import namespace Plot a data/Table from Mathematica using `pgfplots` I want to emphasize that I only have 5 dollars, so can I use the sentence:     Five dollars is all I have.   Or must it be:      Five dollars are all I have.   Please give the explanation as well. Interpretation of p-value in Mann-Whitney rank test I am testing Mann-Whitney rank test with two vectors a and b. Vectors are almost similar so I expect a p-value near 0, but the returned p-value is near 1. What is the reason? I read  and also run the code with different parameters, but don't get anything near to what I expect.  from scipy.stats import mannwhitneyu import operator import numpy as np  a = [1000,100,10,1,10,100,1000,10000,1000,100,10,1] b = [999,100,10,1,10,100,1000,10000,1000,100,10,1]  print(mannwhitneyu(a, b))   The output of the code:  MannwhitneyuResult(statistic=73.5, pvalue=0.95291544831453867)   Edit:  Let's formalize the problem to eliminate any misunderstanding (please edit the question if something is wrong):  What I try to prove is that rank distribution of data are approximately equal,   Null hypothesis ($H_0$)= "ranked distribution of a and b are approximately equal"  Alternative hypothesis ($H_a$)= "ranked distribution of a and b are not equal"  significance level (alpha) = 0.05  p-value= 0.95  (p-value > alpha) so there is no sufficient evidence that $H_a$ is correct, but we cannot also conclude that ($H_0$) is true.   Instead if (p-value &lt; alpha) was true, then we would have enough evidence against H0 and Ha can be accepted.  So what happened here is that I could not disprove the null hypothesis. However, it doesn't mean that null hypothesis is false. It is like an investigation to accuse MR X of being guilty:   $H_0$=" MR X guilty" $H_a$=" MR X not guilty"  We guess he is not guilty, but we don't have enough proof against him: (p-value > alpha), but that doesn't mean that ($H_0$) would not be true. If we could obtain enough evidence and state (p-value &lt; alpha), then we disprove $H_0$ and we can conclude that Ha is true and he is not guilty. How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version How can I automatically save screen shots by the press on the Prt Scr button? I want a screen shot to be saved automatically to a location I specify, as soon as I press the Prt Scr button on my keyboard, or the Alt+Prt Scr combo. I also want the date and time to be used as file name for each new screen shot. And I want the files to be saved as PNG images.  Is there a Windows program that would allow me to do just this? I don't want any other fancy features like editing and making notes, etc. just a plain simple program that will either automatically save the screen shots to a pre-set location or prompt me where I want to save it. I don't want to go through MS Paint to save the shots.  I guess what I'm after is a little bit of Linux behavior of Print Screen, but only for Windows. And I additionally want the files to be named by the date and time they were taken.  Update:  Meanwhile, I have found one called Greenshot. But I don't know how to get the file name pattern right.  This is the default pattern.  ${capturetime:d"yyyy-MM-dd HH_mm_ss"}-${title}   Can someone explain this? Why do they have the title capturetime and the quotation marks? It produces file names like this.  2013-01-26 15_24_28-Greenshot.png   And this is what it says about the file patterns in the program description.  ${YYYY} year, 4 digits ${MM} month, 2 digits ${DD} day, 2 digits ${hh} hour, 2 digits ${mm} minute, 2 digits ${ss} second, 2 digits ${NUM} incremental number, 6 digits ${title} Window title ${user} Windows user ${domain} Windows domain ${hostname} PC name   How do I get files that include year, month and day, separated by a dash, followed by hour, minute and second? I want to include a time for uniqueness of the file name. Proof that every repeating decimal is rational This is an exercise in some textbooks.     Let $E$ be an algebraic extension of $F$. Suppose $R$ is ring that contains $F$ and is contained in $E$. Prove that $R$ is a field.   The trouble is really with the inverse of $r$, where $r\in R$. How to prove that $r^{-1}\in R$, in apparent lack of a characterization of $R$.  It occurred to me to use the smallest field containing $R$ ($R$ is easily shown to be an integral domain), that's the field of quotients, and proving that it's $R$ itself, but I don't really know how to proceed.  A not-too-weak, not-too-strong hint will be much appreciated.   Beware $ $ Readers seeking only hints should  beware that there is now a complete answer. Some issues with timezones in PHP have been in the back of my mind for a while now, and I was wondering if there are better ways to handle it than what I'm currently doing.  All of the issues revolve around reformating database stored dates:  When dealing with a site that has to support multiple timezones (for users), to normalize the timezone offest of stored timestamps I always store it with the server timezone using the CURRENT_TIMESTAMP attribute or the NOW() function.   This way I don't have to consider what timezone was set for PHP when the timestamp was entered (since PHP time functions are timezone aware). For each user, according to his preference I set the timezone somewhere in my bootstrap file using:  date_default_timezone_set($timezone);   When I'm looking to format dates with the php date() function, some form of conversion has to take place since MySQL currently stores timestamp in the format Y-m-d H:i:s. With no regard to timezone, you could simply run:  $date = date($format,strtotime($dbTimestamp));   The problem with this is that date() and strtotime() are both timezone aware functions, meaning that if the PHP timezone is set differently from the server timezone, the timezone offset will apply twice (instead of once as we would like).  To deal with this, I usually retrieve MySQL timestamps using the UNIX_TIMESTAMP() function which is not timezone aware, allowing my to apply date() directly on it - thereby applying the timezone offset only once.  I don't really like this 'hack' as I can no longer retrieve those columns as I normally would, or use * to fetch all columns (sometimes it simplifies queries greatly). Also, sometimes it's simply not an option to use UNIX_TIMESTAMP() (especially when using with open-source packages without much abstraction for query composition).  Another issue is when storing the timestamp, when usage of CURRENT_TIMESTAMP or NOW() is not an option - storing a PHP generated timestamp will store it with the timezone offset which I would like to avoid.  I'm probably missing something really basic here, but so far I haven't been able to come up with a generic solution to handle those issues so I'm forced to treat them case-by-case. Your thoughts are very welcome If a mass moves close to the speed of light, does it turn into a black hole? I am not an expert of random forest but I clearly understand that the key issue with random forest is the (random) tree generation. Can you explain me how the trees are generated? (i.e. What is the used distribution for tree generation?)  Thanks in advance ! Rollback Committed transaction in SQL Server Is it possible to rollback a committed transaction?  I have deleted all the data in a table. The delete statement is inside Begin Transaction and I have committed the transaction with a commit transaction command. Now is it possible to rollback and get the data back? I know that big O is used to describe the upper bound of a function, so doesn't this mean that if the upper bounds f and g are the same, they are the same function? If this is the case, then we can say that  f ∈ Θ(g) because if that were not the case, then the two upper bounds would not be the same and thus one would out grow the other. Is this correct? Show that some monomial ideal is primary Show that $I=(X_{k_1}^{a_1},...,X_{k_s}^{a_s})$ is $(X_{k_1},...,X_{k_s})$-primary.   I noticed  that $$\sqrt{({X_{i_1}}^{a_1},...,{X_{i_k}}^{a_k})}=\sqrt{({X_{i_1}}^{a_1})+\cdots+({X_{i_k}}^{a_k})}=\sqrt{\sqrt{(X_{i_1})^{a_1}}+\cdots+\sqrt{(X_{i_k})^{a_k}}}=\sqrt{(X_{i_1})+\cdots+(X_{i_k})}=\sqrt{(X_{i_1},...,X_{i_k})}=(X_{i_1},...,X_{i_k}).$$ I have to show that $I$ is $P$-primary (where $P=(X_{k_1},...,X_{k_s})$), i.e., if $u v\in I$ then $u\in I$ or $v\in P$. I tried to prove that if $u\notin I$ and $v\notin P$ then $uv\notin I$. (There is a similar question, but the answer is too hard for me.) Mavericks unusually high RAM usage I thought Mavericks was suppose to utilize RAM memory better, thus run smoother.  Running ML on Mac mini 2012, with 16GB RAM...always running smoothly even with over a dozen apps running.  Now, after installing Mavericks, my Mac is SLOW, eating up RAM like crazy! Looking over usage, of the 16GB of installed memory...on average it uses 10-14 GB RAM when barely running a few apps!!!   There is this kernel_task that is always running with over 1GB of RAM and most apps are not taking that much RAM, so what is using up all my RAM?! File cache? It shows very high in that new description, with about 1/3 of my total RAM So one of this question's  answers got me curious. What is the maximum damage a 20th level character can do with a 9th level Magic Missile by the rules to a single target.  So my best I've been able to find is Aasimar or Goblin WLK 1/WIZ 19   9th Level slot (1D4+1)(11) [keep in mind you only roll once for damage not 11 times]  per  Empowered Evocation (+5)(11) (assuming 20 INT) Hexblade Curse (+6)(11) (Proficiency Bonus +6)    Radiant Soul/Fury of the Small +20 (Level 20 Aasimar/Goblin)   For a total of (D4+12)(11)+20 for (min-max)avg (163-196)179.5  Am I looking at this correctly? Are there other abilities out there that can increase this?  Feel free to include non legendary magic items. NO TOMES PLEASE  Only use things available on D&amp;D Beyond please.  Acceptable books are :   Basic Rules DMG, MM, PHB Sword Coast Adventure's Guide The Tortle Package Volo's Guide to Monsters Xanathar's Guide to Everything and any officially released Adventure Book