Program will not execute unless using System.out.println()
Java code needs a system.out.println statement to run
The choice between the gerund and the infinitive in a certain construction I am pretty much sure that for native speakers the issue I am going to bring up might look as an uncalled question as they can easily figure out which form of a verbal part of speech should be used, be it a gerund, an infinitive, or a bare infinitive. However, it can be pretty much misleading for a foreigner because the same construction works differently with different words and I don’t see a logical explanation. For example:  The purpose of this article is to analyze the issue…  My hobby is reading. One may assume, and many foreigners really come to this conclusion, that it’s OK to switch the “gerund” and “infinitive” as the meaning will stay the same, that is:  The purpose of this article is analyzing the issue… (same as 1 above)  My hobby is to read. (same as 2 above)   However, as I was told, this assumption is erroneous. Another example: His task was watching after them. (not good) His task was to watch after them. Is there any principle which governs the choice of the right form in such cases? Gtk skip_taskbar_hint (seen in Glade-ui-Designer) equivalent in Qt With Glade Designer that lets you set up Gtk-Ui's you can check the option that windows are not shown in the launcher. If I take a look at the ui-file generated by Glade, it says &lt;property name="skip_taskbar_hint"&gt;True&lt;/property&gt;. In gtk code this hint is  window.set_property('skip-taskbar-hint', True). However I believe that this option is not exclusively Gtk-specific, and want to apply this one on my PyQt4-app. The Ubuntu window manager must be able to receive that hint, otherwise I would see the window of a gtk-application i use (stickynotes-indicator). So there MUST be a way of doing this in Qt or any other language, right?  Does anybody know such an option? Python or Qt syntax, doesn't matter! Find unique rows in numpy.array When reading a stack trace like:  [FormatException: Input string was not in a correct format.]    System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp; number, NumberFormatInfo info, Boolean parseDecimal) +2755599    System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +112    System.Convert.ToInt32(String value) +68   What do the +68, +112, etc. numbers mean. I'm guessing that they're offsets to something. If so, what? What is the cost of a function call? Compared to    Simple memory access Disk access Memory access on another computer(on the same network) Disk access on another computer(on the same network)   in C++ on windows. How to partition a list in a specific way I did some mathematical induction problems on divisibility   $9^n$ $-$ $2^n$ is divisible by 7. $4^n$ $-$ $1$ is divisible by 3. $9^n$ $-$ $4^n$ is divisible by 5.   Can these be generalized as $a^n$ $-$ $b^n$$ = (a-b)N$, where N is an integer? But why is $a^n$ $-$ $b^n$$ = (a-b)N$ ?  I also see that $6^n$ $- 5n + 4$ is divisible by $5$ which is $6-5+4$ and $7^n$$+3n + 8$ is divisible by $9$ which is $7+3+8=18=9\cdot2$.  Are they just a coincidence or is there a theory behind?  Is it about modular arithmetic? How to install h.264 decoder? A quick search for currency regex brings up . The problem I have in choosing one is that regex is difficult to verify without testing all the edge cases. Does anyone have a regex for U.S. currency that has been thoroughly tested? My only requirement is that the matched string is U.S. currency and parses to System.Decimal:  [ws][sign][digits,]digits[.fractional-digits][ws]   Elements in square brackets ([ and ]) are optional.  The following table describes each element.   ELEMENT             DESCRIPTION ws                  Optional white space. sign                An optional sign. digits              A sequence of digits ranging from 0 to 9. ,                   A culture-specific thousands separator symbol. .                   A culture-specific decimal point symbol. fractional-digits   A sequence of digits ranging from 0 to 9. Why does the following code in C work?  const char* str = NULL; str = "test"; str = "test2";   Since str is a pointer to a constant character, why are we allowed to assign it different string literals?  Further, how can we protect str from being modified?  It seems like this could be a problem if, for example, we later assigned str to a longer string which ended up writing over another portion of memory.  I should add that in my test, I printed out the memory address of str before and after each of my assignments and it never changed.  So, although str is a pointer to a const char, the memory is actually being modified.  I wondered if perhaps this is a legacy issue with C? Time-Stream Crossing and Forgetfulness In The Day of the Doctor, it's explained that the Doctor doesn't remember having interacted with himself, and if he interacts with a future version of himself, the younger version forgets.  But in Time Crash, 10th solves the problem of the TARDISes occupying the same space because he remembers himself doing it from when he was 5th.  If this is true, 5th wouldn't have wondered whether or not he was going to regenerate when he did.  Does the TARDIS occupying the same space with itself re-instate those memories? Or is it just possible that I'm asking a ridiculous question that will never have an answer because Doctor Who.  :D How to add an extra level of sections with headings below \subsubsection Easier way to debug a Windows service Examples and Counterexamples of Relations which Satisfy Certain Properties Definition: Given a set $X$, a relation $R$ on $X$ is any subset of $X\times X$.  A relation $R$ on $X$ is said to be  reflexive if $(x,x) \in R$ for all $x \in X$, irreflexive if $(x,x) \not\in R$ for all $x \in X$, transitive if $(x,y) \in R$ and $(y,z) \in R$ implies that $(x,z)\in R$, intransitive (or antitransitive) if $(x,y) \in R$ and $(y,z) \in R$ implies that $(x,z)\not\in R$, symmetric if $(x,y) \in R$ implies that $(y,x) \in R$, antisymmetric if $(x,y) \in R$ and $(y,x) \in R$ implies that $x=y$.   Given any combination of the properties listed above, is there a nontrivial (i.e. nonempty) relation which satisfies that combination of properties? Need to give permissions to /tmp/cache and /tmp/templates_c but can't find them How do HttpOnly cookies work with AJAX requests? JavaScript needs access to cookies if AJAX is used on a site with access restrictions based on cookies. Will HttpOnly cookies work on an AJAX site?   Edit: Microsoft created a way to prevent XSS attacks by disallowing JavaScript access to cookies if HttpOnly is specified. FireFox later adopted this. So my question is: If you are using AJAX on a site, like StackOverflow, are Http-Only cookies an option?  Edit 2: Question 2. If the purpose of HttpOnly is to prevent JavaScript access to cookies, and you can still retrieve the cookies via JavaScript through the XmlHttpRequest Object, what is the point of HttpOnly?  Edit 3: Here is a quote from Wikipedia:     When the browser receives such a cookie, it is supposed to use it as usual in the following HTTP exchanges, but not to make it visible to client-side scripts.[32] The HttpOnly flag is not part of any standard, and is not implemented in all browsers. Note that there is currently no prevention of reading or writing the session cookie via a XMLHTTPRequest. [33].   I understand that document.cookie is blocked when you use HttpOnly. But it seems that you can still read cookie values in the XMLHttpRequest object, allowing for XSS. How does HttpOnly make you any safer than? By making cookies essentially read only?   In your example, I cannot write to your document.cookie, but I can still steal your cookie and post it to my domain using the XMLHttpRequest object.  &lt;script type="text/javascript"&gt;     var req = null;     try { req = new XMLHttpRequest(); } catch(e) {}     if (!req) try { req = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) {}     if (!req) try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) {}     req.open('GET', 'http://stackoverflow.com/', false);     req.send(null);     alert(req.getAllResponseHeaders()); &lt;/script&gt;   Edit 4: Sorry, I meant that you could send the XMLHttpRequest to the StackOverflow domain, and then save the result of getAllResponseHeaders() to a string, regex out the cookie, and then post that to an external domain. It appears that Wikipedia and ha.ckers concur with me on this one, but I would love be re-educated...  Final Edit: Ahh, apparently both sites are wrong, this is actually a . IE6 &amp; 7 are actually the only browsers that currently fully support HttpOnly.  To reiterate everything I've learned:   HttpOnly restricts all access to document.cookie in IE7 &amp; and FireFox (not sure about other browsers) HttpOnly removes cookie information from the response headers in XMLHttpObject.getAllResponseHeaders() in IE7. XMLHttpObjects may only be submitted to the domain they originated from, so there is no cross-domain posting of the cookies.   edit: This information is likely no longer up to date. The  of March 01, 2013 put it's distance at 14 hrs 04 mins 23 secs of light-travel time from Earth. A  (earlier today) tweet says it is 14 hrs 04 mins 22 secs of light-travel time from Earth. An  tweet put it still further out at 14 hrs 04 mins 25 secs of light-travel time.  The Voyager 2 tweets on Voyager 1's proximity to Earth too has reduced similarly to  earlier today from  reported on Feb 28 2013  It could quite simply be a typo ... If not a typo then my curiosity is piqued; I was under the impression the Voyagers are outbound from the Solar System now without any major in-system activities now.   How is it the Voyagers are closer to Earth than before? Word for "willing to try new and unfamiliar things" "Knowledge of" vs. "knowledge on" After an AJAX request, sometimes my application may return an empty object, like:  var a = {};   How can I check whether that's the case?