Not getting the correct output from this if statement in for loop?
How do I compare strings in Java?
Introductory measure theory textbook I would like to teach myself measure theory and I am looking for a good introductory textbook at the advanced undergraduate or early graduate level. A reader-friendly text with plenty of examples would be ideal. How can I calculate the number of work days between two dates in SQL Server?   Monday to Friday and it must be T-SQL. I am designing the layout for a touchscreen for outside use, What are some good color combination to use that will be visible under the sun light for outside use? Maybe bright neon colors? Had it not been vs If it were not for ls command operating differently depending on recipient How does commands like ls know what its stdout is?  It seems ls is operating different depending on what the target stdout is. For example if I do:  ls /home/matt/tmp    the result is:  a.txt b.txt c.txt   However if I do  ls /home/matt/tmp | cat   the result is (i.e. new line per result):  a.txt b.txt c.txt   The process is passed a file descriptor 1 for stdout right? How does it determine how to format the result? Does the file descriptor reveal information? Sort Order on Close Vote Queue The Close-Vote queue is large and growing. I searched for definitive information on how that queue is sorted for reviewers, and the nearest I could find is that it is randomized - but that post was some years old.  Would it be possible to sort on order of votes already received? That is, all questions with 4 votes to close are surfaced first (in random order) to reviewers? Questions with 3 votes would come up before ones with 2, etc. In that manner a given question gets out of 'will it close?' limbo faster.   This feature request would, in my opinion, be supportable if the majority of reviewer votes were going to single-vote questions. I cannot (I think) actually find these numbers. If this is the case, the majority of the work is going to an ever-increasing queue, and proportionally fewer votes are being resolved.  Note there are other distributions that could help get in this direction without being a strict ordering, like weighting the chance a given question is surfaced to a reviewer by the number of votes. However, for discussion purposes I thought I'd keep it simple.  Usual apology if this has actually been addressed. Search is sad-making. This is basically the same as  for the Android app, except I am making the request for the iOS app.  When viewing a question in the iOS app, I'd like to see the total number of views for the question. If an email message contains an email address in the body, Gmail automatically converts it into a mailto: link, which is helpful.  And many times each day I've enjoyed being able to right-click a mailto: link in an email (within Gmail) and then click "Copy email address" in the context menu.  Then I can paste that email address into a program (such as when I want to search a database).  However, within the past month or so, I've noticed that I can't right-click and click "Copy email address" without Gmail then popping open a "New Message" panel and changing my current URL to have ?compose=new at the end.  I wonder if it's related to .  How can I disable it?  I'm tried of having to click the "Discard draft" trash can button so many times throughout the day. Limit of ${a_n}^{1/n}$ is equal to $\lim_{n\to\infty} a_{n+1}/a_n$ if $A$ subset of $B$ then $P(B)-P(A)=P(B\setminus A)\ge 0$ Let $P$ be a probability measure on $(\Omega, \mathscr{F})$, If $a,b,\in\mathscr{F}$ and $A\subset B$, then $P(B)-P(A)=P(B\setminus A)\ge 0$.  So far I have:  $A\subset B \implies B\setminus A = B\cap A^c = \emptyset$ as $A$ and $B^c$ are disjoint. Since $A\cup (B\setminus A)=A\cup (B\cap A^c)=(A\cup B)\cap (A\cup A^c)=B\cap\Omega = B$  Then for $A,B\in \mathscr{F}\implies P(A\cup (B\setminus A))=P(A)+P(B\setminus A) = P(B)$ by countable additivity.  Rearranging, $P(B)-P(A)=P(B\setminus A) \ge 0$. Are global variables bad? In C/C++, are global variables as bad as my professor thinks they are? Accuracy Vs. Precision  What I would like to know is whether I should use System.currentTimeMillis() or System.nanoTime() when updating my object's positions in my game?  Their change in movement is directly proportional to the elapsed time since the last call and I want to be as precise as possible.  I've read that there are some serious time-resolution issues between different operating systems (namely that Mac / Linux have an almost 1 ms resolution while Windows has a  50ms resolution??).  I'm primarly running my apps on windows and 50ms resolution seems pretty inaccurate.  Are there better options than the two I listed?  Any suggestions / comments? What exactly is a photon? Consider the question, .  The answers say, "an elementary particle" and not much else. They don't actually answer the question. Moreover, the question is flagged as a duplicate of,  &ndash; the answers there don't tell me what a photon is either. Nor do any of the answers to  mentioned in the comments. When I search on , I can't find anything useful. Questions such as,  look promising, but bear no fruit.  say things like, "the photon is an excitation of the photon field." That tells me  nothing. Nor does the , which says:     The photon is the quantum of the electromagnetic four-potential, and therefore the massless bosonic particle associated with the electromagnetic force, commonly also called the 'particle of light'...   I'd say that's less than helpful because it gives the impression that photons are forever popping into existence and flying back and forth exerting force. This same concept is in the  too - but it isn't true. As , "Virtual particles only exist in the mathematics of the model." So, who can tell me what a real photon is, or refer me to some kind of authoritative informative definition that is accepted and trusted by particle physicists? I say all this because I think it's of paramount importance. If we have no clear idea of what a photon actually is, we lack foundation. It's like what :     Photons seem to be one of the foundation ideas of quantum mechanics, so I am concerned that without a clear definition or set of concrete examples, the basis for understanding quantum experiments is a little fuzzy.   I second that, only more so. How can we understand pair production if we don't understand what the photon is? Or the electron? Or the electromagnetic field? Or everything else? It all starts with the photon.   I will give a 400-point bounty to the least-worst answer to the question. One answer will get the bounty, even if I don't like it. And the question is this:    What exactly is a photon? Or operand with int in if statement If a two vectors $\bf u$ and $\bf v$ in linearly independent, can their images be linearly dependent given they were transformed by a linear transformation $T$? I think not. My reasoning If the images are linearly dependent, then $c_1T({\bf u})+c_2T({\bf v})={\bf 0}$ for scalars $c_1$ and $c_2$, not both $0$. Then $c_1T({\bf u})+c_2T({\bf v})={\bf 0}$ $T(c_1{\bf u}+c_2{\bf v})=T({\bf 0})$ $c_1{\bf u}+c_2{\bf v}={\bf 0}$ Therefore, ${\bf u}$ and $\bf v$ are linearly dependent. My reservation A homework problem seems to contradict the above. Here's the problem: Let $\mathbb R^n\rightarrow\mathbb R^m$ be a linear transformation. Suppose $\{{\bf u},{\bf v}\}$ is a linearly independent set, but $\{T({\bf u}),T({\bf v}\})$ is a linearly dependent set. Show that $T({\bf x})={\bf 0}$ has a nontrivial solution. I have one site with two languages: English and Spanish for example. What would be the proper convention to name image files?  From my point of view it would be stupid to duplicate image and then name it according to on which site it will be uploaded. It would be waste of resources IMO and unnecessary job to do.  What do you think about this one? Say I have a Python function that returns multiple values in a tuple:  def func():     return 1, 2   Is there a nice way to ignore one of the results rather than just assigning to a temporary variable? Say if I was only interested in the first value, is there a better way than this:  x, temp = func() 'Thank you for taking your time writing' or 'Thank you for taking your time to write' ? A person gave me an answer on English.SE and I commented:     Thank you for taking your time writing this wonderful answer!   Now, looking at the sentence in retrospect, even though I am not a native English speaker (duh, otherwise I wouldn't be asking a question on ELL.SE), I find the sentence a bit odd.  To get my point across, let me rephrase the sentence:     Thank you for taking your time to write this wonderful answer!   With my relatively little knowledge and understanding of English, I feel that using 'writing' (as I did in the original sentence) emphasizes the very process of writing the answer, whereas using 'to write' emphasizes the mere fact that an answer has been given, and a wonderful one at that.  This is exactly why I feel the original sentence is a little bit awkward and the second, revised one would have been more apt.  Am I correct or are the quoted sentences virtually synonymous? How to maintain a file's 'last modified' date? Path.Combine for URLs? is handy, but is there a similar function in the .NET framework for ?  I'm looking for syntax like this:  Url.Combine("http://MyUrl.com/", "/Images/Image.jpg")   which would return:  "http://MyUrl.com/Images/Image.jpg"