error class "... is public should be declared in a file named..." but names match
Error: class X is public should be declared in a file named X.java
What does the phrase "Underfull \hbox (badness 10000) in paragraph" actually mean? What does the actual phrase above mean? Is the function strcpy always dangerous? I just wrote an answer to , which was trying to find numeric strings with or without commas (e.g. 1,234,567.89). I wanted to be thorough because I've seen this problem a lot, both on SO and in real-world code.   When I finished, I found 7 other new answers waiting for me, mostly variations on each other. Which would be fine, except for one thing: They're garbage answers. Unless I'm severely mistaken, every answer but mine (so far) is deeply flawed, and I want to downvote all of them. Yeah, I'm a stickler on regex, but IMHO if your pattern lets stuff like  ...,.,,.,,..9 or even ... pass as "numeric input," then you've failed to meet even the bare minimum requirements.  Enough venting. The reason I'm whining to Meta about this is that I'm about to do something that'll REALLY look like tactical downvoting, and I'm mildly concerned about the consequences. If I answer a question and then rain downvotes on every competing answer, will I get flagged for abuse? That would certainly seem like suspicious behavior to me.  More of an opinion question: At what point does a semi-correct answer deserve a downvote? Obviously, if it were just a typo, I'd edit it myself. Where's the line between "close enough" and "this answer sucks?"  Basically, is it just me? You've seen the question; am I right that these answers deserve downvotes? Seven people thought that [0-9,.]+ was good enough to declare something a number, so why am I the only one who doesn't?    Note: I found some related questions, but nothing that seemed like a duplicate:    - More of an etiquette question, plus the voter hadn't posted his own answer.  - I guess this pretty much covers my second question.   Also, as some have noted, my answer ended up pretty long and thorough. I put in a lot of effort because, with all this talk about how the other answers sucked, I wanted to be extra sure mine didn't. I don't expect pages of detail in a normal SO answer. How to specify ec2 instance types for different services? After I have specified a default EC2 instance type for my Juju charm, how do I override that for one of the services?  For instance, the  deploys wordpress and mysql, and I can set the default-instance-type in my environments.yaml so both services are m1.small  But how do I configure it so that (only) the mysql service gets deployed on an instance type better suited to a database, like m2.xlarge ? In classical logic, why is $(p\Rightarrow q)$ True if $p$ is False and $q$ is True? Provided we have this truth table where "$p\implies q$" means "if $p$ then $q$":  $$\begin{array}{|c|c|c|} \hline p&amp;q&amp;p\implies q\\ \hline T&amp;T&amp;T\\ T&amp;F&amp;F\\ F&amp;T&amp;T\\ F&amp;F&amp;T\\\hline \end{array}$$  My understanding is that "$p\implies q$" means "when there is $p$, there is q". The second row in the truth table where $p$ is true and $q$ is false would then contradict "$p\implies q$" because there is no $q$ when $p$ is present.  Why then, does the third row of the truth table not contradict "$p\implies q$"? If $q$ is true when $p$ is false, then $p$ is not a condition of $q$.  I have not taken any logic class so please explain it in layman's terms.       Administrative note. You may experience being directed here even though your question was actually about line 4 of the truth table instead. In that case, see the companion question  And even if your original worry was about line 3, it might be useful to skim the other question anyway; many of the answers to either question attempt to explain both lines. GParted can't resize partition, but unallocated partition is available When to use icons vs. icons with text vs. just text links? Are there any rules on when to use icons vs. icons with text vs. just text links in a web application?  For example:    vs.   save  vs.  save    Extra question: Is  save -or- save  preferable? It was suggested to me recently that Annihilator sacrifices (such as 's) are only chosen during resolution, rather than while they're going on the stack.  Do I choose those sacrifices during resolution? What part of the comprehensive rules backs that up?  I can't find any clarity on the internet, in the rules, on the MTG Salvation wiki for Annihilator, or in the ability's rulings. It seems reasonable, but I'd like to know what's behind it. Plus, if I can choose and then later  some stuff, all the better. table of contents no word separation Is it possible to have in the toc no word separation but have a word separation in the chaptername:  For example:   Contents  1. max Mustermann   Chapter  Max Muster- mann How does "curved space" explain gravitational attraction? They say that gravity is technically not a real force and that it's caused by objects traveling a straight path through curved space, and that space becomes curved by mass, giving the illusion of a force of gravity.  That makes perfect sense for planetary orbits, but a lot less sense for the expression of gravity that we are the most familiar with in our day-to-day lives: "what goes up must come down."  Imagine that I hold a ball in my hand, several feet off the ground, with my fingers curled around it, and my hand is above the ball.  Then I open my fingers, releasing my grip on it, being very careful to not impart any momentum to the ball from my hand as I do so.  An object at rest remains at rest unless acted upon by an outside force.  If the ball is not moving (relative to my inertial reference frame), it has no path to travel that's any different from the Earth's path through space.  It should remain at rest, hanging there in the air.  And yet it falls, demonstrating that an outside force (gravity) did indeed act upon it.  How does curved space explain this? How does Linux handle multiple consecutive path separators (/home////username///file)? I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a double '/ in the path. I know that bash doesn't care if you have multiple file separators, but I'm wondering how exactly that is rectified. Is it bash that strips extra /s or does it really not matter ever?  I ask because it will save me several lines of code to check for extra /s while concatenating. I know it's not a big deal, but I'm curious as well. I have a bash script that has the line cd //usr (instead of cd /usr), which seems to imply there might be a significance to using multiple /s in a path I have connected speakers to the back panel of my computer at work and I would like to have them always enabled (I can switch them off on the speaker casing). However when I connect headphones on the front panel system automatically says that the rear output is unplugged.  I found a solution to disable auto detection with Alsamixer and it works almost ok except the fact that after system restart I need to reconfigure the settings again... How can I set this once and forget about it? I use ps -ef | grep catalina | grep -v grep to print the tomcat process running on the system:  kshitiz   7099     1  0 May11 ?        00:02:29 /usr/lib/jvm/jdk1.8.0/bin/java -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:38156 -Dcatalina.base=/home/kshitiz/Documents/workspaces/ggts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1 -Dcatalina.home=/opt/tomcat-7.0.42 -Dwtp.deploy=/home/kshitiz/Documents/workspaces/ggts/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps -Djava.endorsed.dirs=/opt/tomcat-7.0.42/endorsed -Dfile.encoding=UTF-8 -classpath /opt/tomcat-7.0.42/bin/bootstrap.jar:/opt/tomcat-7.0.42/bin/tomcat-juli.jar:/usr/lib/jvm/jdk1.8.0/lib/tools.jar org.apache.catalina.startup.Bootstrap start   Then I use ps -ef | grep catalina | grep -v grep | awk -F' ' '{print $2}' to extract the process id:  7099   But when I alias the whole command alias tomcat_id="ps -ef | grep catalina | grep -v grep | awk -F' ' '{print $2}'" and use it via alias, it prints the whole text and awk doesn't seem to work.  type tomcat_id gives:  tomcat_id is aliased to `ps -ef | grep catalina | grep -v grep | awk -F' ' '{print }'' Can any one tell me how to prove that the set of rational numbers are countable? Prove give me a prove?  Thanks. There are many examples of this, and I'd like to give a few:   A person who puts a lot of effort to help the community and earns reputation points. But that reputation is the motivation behind helping the community, not because they really want to. A student approaches a professor, and helps them in their teaching and doing research in order to have a good LOR (letter of recommendation). To a SEO, the content of the website must be good (well, this one is a little tricky, but you get the spirit.)   I'm not saying that the reputation/LOR/high-ranked is not deserved. It is. I just want to focus more on the selfish reason(s) behind that.  Any kind of answer can be accepted: single word, phrase, proverb or idiom. First and foremost I am sorry for this; in order to make the questions clear I must first upload the lecture notes from my institution $^\zeta$ for the derivation of Hydrostatic Equilibrium:          $^\zeta$ Lecture notes courtesy of Imperial College London, Astrophysics dept, 2017-2018 edition.    Firstly, in equation $(3.1)$ why is there no negative sign for $F_g$? Last time I checked, Newton's law of gravitation told us that   $$F=-\frac{GMm}{r^2}$$  Nextly, I have a conceptual problem with equation $(3.2)$; when they use the term 'pressure' I am going to assume that they are referring to the radiation pressure that is released due to nuclear fusion reactions taking place in the sun. In that formula it must be the case that $P(r) \gt P(r+\delta r)$ if this is the case then $(3.2)$ should read $$F_p=-\left(\frac{dP}{dr}\right)\delta r\,\delta A $$   Correct me if I'm wrong but Hydrogen nuclei are fused together to generate the more stable Helium and hence lots of radiation pressure acting outwards from the centre of the star. If this is correct then $P(r+\delta r)=0$, since the outside face of that cylindrical volume element in Figure $3.1$ will not 'feel' any of this radiation pressure because this pressure only acts on the inner face. What am I not understanding here?  Moving on to equation $(3.3)$, let's suppose the sign of the gravitational force in $(3.1)$ really is neglected. Does this mean that the negative sign in $(3.3)$ is due to $P(r+\delta r) \lt P(r)$ and hence $$\frac{GM(r)\rho(r)}{r^2}=-\left(\frac{dP}{dr}\right)\,?$$ I know this is the same equation as in $(3.3)$ but I have written it with the negative sign next to the pressure differential as I would like to know where this minus sign originates from. Does anyone know?  My final concern is the sign in $(3.4)$ as last time I checked $$g=-\frac{GM}{r^2}$$ and not $$g=\frac{GM}{r^2}$$  Hence, equation $(3.4)$ should read  $$\left(\frac{dP}{dr}\right)=\rho(r)\,g\,?$$     I forgot to mention that I have done some research and  is the closest derivation I could find, which, needless to say is no less helpful than the notes I have. How to clear the interpreter console? Moderator actions on items in the review queues don't count towards the review totals I have read a lot of the posts on here about consecutive days and how they are calculated, but I am not sure that I can explain this one...which is disappointing since I have been trying to get the consecutive days badges.  I logged in last night (SO) at 8/13/2010 @ 730P EST and my consecutive days count was somewhere in the teens (maybe 20's I don't remember).  I answered a question, browsed around for a bit longer and then went away.  This morning (8/14/2010 @ 815A EST), my consecutive days count is back to 1 (still on SO).    What is the exact method to calculate these?  Can anyone look to ensure that my days really should have been reset?  Its pretty crazy to attempt to go for a badge if when I log in twice within 11 hours I have my days reset.  And, just as an aside, its not so much about the badge as I do enjoy the site without the 'reward', but still would be nice to know why this reset occurred. Why does .NET use banker's rounding as default? According to the documentation, the  method uses a round-to-even algorithm which is not common for most applications. So I always end up writing a custom function to do the more natural round-half-up algorithm:  public static decimal RoundHalfUp(this decimal d, int decimals) {     if (decimals &lt; 0)     {         throw new ArgumentException("The decimals must be non-negative",              "decimals");     }      decimal multiplier = (decimal)Math.Pow(10, decimals);     decimal number = d * multiplier;      if (decimal.Truncate(number) &lt; number)     {         number += 0.5m;     }     return decimal.Round(number) / multiplier; }   Does anybody know the reason behind this framework design decision?  Is there any built-in implementation of the round-half-up algorithm into the framework? Or maybe some unmanaged Windows API?  It could be misleading for beginners that simply write decimal.Round(2.5m, 0) expecting 3 as a result but getting 2 instead.