What are the differences between:  An algorithm to solve optimization problems  and  An algorithm for solving optimization problems  I think only the second one is correct but I can’t explain why the first one is wrong.
Are the following sentences grammatical or not? If not, does substituting a to-infinite make them grammatical? (Optional: designate if the sentence expresses purpose, reason, aim, or function)  1 I have decided to purchase a jet for getting to NYC and back more quickly. 2 I have decided to buy a jet for having a quicker way to get to NYC and back.  This is my only reason and aim; this will be the jet's only purpose and function.  3 I hate hairdryers, so I am buying a space heater for drying my hair more naturally, and that is my only aim &amp; purpose &amp; reason and that will be its only function 4 For having a lasting shine in your hair, buy ShineOn Shampoo. 5 My neighbor and I have decided to cooperate more for having a better life together.   Research done: ELL  (Note the  here is a restatement of Cambridge Dictionary's ) ELL  ELL  BBC English  (Currently the best site I've found.) ELU  All of which have answers that I find  (i) incomplete (ii) contradictory (iii) terribly confusing, if not (iv) wrong. To sort through the haze, I am focusing on one issue. Background Some sources say that you need to use a to-infinitive for expressing purpose, aim, function, reason, etc. I find these to be rather hazy distinctions, given that the ODO defines  as The reason for which something is done or created or for which something exists and the same work lists as : aim, reason, function, etc. It is my assertion that at least some of the following sentences demonstrate that one can use the -ing form (be it a gerund, verbal noun, participle) to express individual purpose (aim, reason, function, intention, whatever you want to call it). Do you agree, or not? Why (not)?  In shorter terms, are the sentences grammatical? or do we have to substitute a to-infinitive (including in order to + infinitive) to make them grammatical? (Optional: designate if the sentence expresses purpose, reason, aim, function, etc.)
How to fix "This build of Windows will expire soon" after switching Windows Insider Program channel from Dev to Beta? Can I run 64 bit apps in 32 bit Linux? There are some proprietary apps that are being provided only in 64-bit version. I'm Australian and have obtained my Canadian working visa. However rather than flying direct to Canada I am meeting an American friend in LA and driving across the border. I have a return flight booked back to Australia from LA in March of next year too. Will the esta visa will be enough to enter the USA because I have my Canadian working visa and plan to travel there? Or will there be a problem because my return flight is booked later then the 90 days allowed on the visa. How to know if an object has an attribute in Python Is there a way in Python to determine if an object has some attribute?  For example:  &gt;&gt;&gt; a = SomeClass() &gt;&gt;&gt; a.someProperty = value &gt;&gt;&gt; a.property Traceback (most recent call last):   File "&lt;stdin&gt;", line 1, in &lt;module&gt; AttributeError: SomeClass instance has no attribute 'property'   How can you tell if a has the attribute property before using it? product distribution of two uniform distribution, what about 3 or more How to remove the top horizontal bar in fancyhdr? When using fancyhdr, how do you remove the top horizontal rule?  I do not want a header at all, just a footer.  This is what I do now:  \documentclass{article} \usepackage{fancyhdr} \pagestyle{fancy}  \lfoot{text} \cfoot{text 2} \rfoot{text 3}  \begin{document} Foo Bar \end{document} what is the difference between - I make it to go and I make it go? What is the difference between sentences like these:     I make it to go.   I make it go.   or     You make me to cry.   You make me cry. Access-Control-Allow-Origin Multiple Origin Domains? Place label in middle of line with TikZ What is the best way to place a label in the middle of a line with TikZ? I mean smack dab in the middle of the line, not above or below it. The following is close  \begin{tikzpicture} \draw[|-&gt;, color=red] (-4cm, 0.5cm) -- (2.5cm, 0.5cm) node[midway, color=black] {$\tau_{r}$}; \end{tikzpicture}   But the line crosses right through the node and its text, which is bad.  I don't know if there is an option to choose the background color of a node, which I think would solve the problem (e.g. background=white). fill doesn't seem to work. Can't Use /Summon Command I've seen several examples of code like this:  if not someobj:     #do something   But I'm wondering why not doing:  if someobj == None:     #do something   Is there any difference? Does one have an advantage over the other? Dollar cost averaging - Should I still do it if I have a large pile of cash now? I currently have a large pile of cash savings ($240,000) which I really should have been investing all this time, but the past is past and no point dwelling on it.  I am currently 38 years old (2 kids. Wife who is also a high earner - $100,000), with a high salary ($150,000). I have read "The Intelligent Investor" and am really sold on dollar cost averaging as a strategy, using the index funds offered by Vanguard.  My current dilemma is what to do with the cash I already have. My current plan is to still follow the dollar cost averaging and slowly move it into vanguard over a period of 4 years (~$5000 per month). While leaving the remaining parts of the cash in term deposits. So $50,000 in a 3 year term deposit at 3%, $50,000 in a 2 year term deposit at 2.8% etc.  But in someways it feels overly conservative. Should I just move all the money now? Or perhaps in a shorter time frame (3 years? 2 years? 1 year?).  There are a few other questions on the site similar to mine, but they are from 2013/2014 etc. Given that currently the stock market is at a high and there is a lot of economic uncertainty on the horizon, putting everything in the stock/bond market at once now seems like a risky move. And it seems to violate the principle of dollar cost averaging. Or am I violating dollar cost averaging by trying to "time the market" by looking at it's current value?  Reading this section  seems to indicate that I should just invest everything now. But the first paragraph also seems to suggest giving more weight to that advice if the market was trending upwards (Which I am not certain the current market is/will be for long).  PS: My current investment horizon is long. Basically retirement, about 20 years from now. Finding the limit $ \lim_{x\to a^+} \frac{\cos(x)\ln(x-a)}{\ln(e^x-e^a)} $ When I was using ubuntu 14.04, it's easy to set title. Just press F2 or move mouse to top menu. But there is no menu on ubuntu 16.04 and press F2 can't change the title. What should I do? no match for ‘operator<<’ in ‘std::operator How to make 'python' program command execute Python 3? The python program command executes Python 2. Python 3 can be executed using the python3 command.  How can Python 3 be executed using the python command? Are comments on answers to my question supposed to show up in my recent activity I cannot stand the auto-completion of TeXStudio (formerly TexMakerX) regarding parentheses, braces, etc. I agree auto-completion is useful sometimes, but here it does just not work as I would like. How can I remove it completely?  Under configuration -&gt; completion nothing is checked. From where do I remove the auto-completion of these? How to prove $\sum_{k=1}^{n}F_k = F_{n+2}-1$ by induction when $F_n$ is the Fibonacci sequence Let $F_n$ be the Fibonacci sequence where  $F_0$ = 0  , $F_1$ = 1 and  $F_n$ = $F_{n-1}$ + $F_{n-2}$.                   I want to prove the following by induction. $$\sum_{k=1}^{n}F_k = F_{n+2}-1$$ Here is what I have so far.  Can anybody tell me if I am right?  Base case = n=1  $F_k$ = 1 = LHS  $F_{1+2}$ - 1 = 2 - 1 = 1 = RHS  Statement is true for n=1.  Assume statement is true for n=i.  $$\sum_{k=1}^{i}F_k = F_{i+2}-1$$  Prove statement is true for n=i+1.  $$\sum_{k=1}^{i+1}F_{k} = F_{((i+1)+2)}-1$$  $F_1$ + $F_2$ +...+ $F_i$ + $F_{i+1}$ = $F_{((i+1)+2)}-1$  $F_{i+2}$ - 1 + $F_{i+1}$ = $F_{((i+1)+2)}-1$  $F_{((i+1)+2)}-1$ = $F_{((i+1)+2)}-1$  Statement holds for n=i+1 Hydrostatic pressure - doesn't density vary with depth? Our class is learning about hydrostatic water pressure and we have been told that we can calculate the force of the liquid on an object at any depth using "the density x 9.8 x the depth". However, as the depth increases, wouldn't the density of the liquid increase because of the weight of the liquid above it compressing it? So should't there be something in the equation to account for the varying density? To me, "density x 9.8 x depth" seems like it is saying that the density will be constant...