Unusual Asymptotics Question I want to prove the following$$n - 2\sqrt{n} = \Theta(n)$$  Is it correct to say $$n -1 \leq n \leq n +1 =&gt; f(n)=n=\Theta(n)$$ $$\sqrt{n}\leq|-2\sqrt{n}| = 2\sqrt{n}\leq3\sqrt{n} =&gt;g(n)=-2\sqrt{n}=O\sqrt{n}$$  So:&nbsp;&nbsp;&nbsp;&nbsp; $n - 2\sqrt{n} = max(O(n),O(\sqrt{n}))=O(n)$ And: &nbsp;$n - 2\sqrt{n} = max(\Omega(n),\Omega(\sqrt{n}))=\Omega(n)$ So: &nbsp;&nbsp;&nbsp;&nbsp;$n - 2\sqrt{n} = \Theta{n}$  Edit: I am not interested in the solution to this problem , but whether my methodology for solving the problem is correct or not.
How can I prove $n - 2\sqrt{n} = \Theta(n)$ I want to prove the following $$n - 2\sqrt{n} = \Theta(n)$$  It's $n - 2\sqrt{n} \leq n = O(n)$  How can I prove the same for $\Omega(n)$
$\lim_{n\to\infty}a_nb_n=? $ given that $\lim_{n\to\infty}a_n=0$ and $\lim_{n\to\infty}b_n=\infty$ A. $\lim_{n\to\infty}a_nb_n=?$ given that $\lim_{n\to\infty}a_n=0$ and $ \lim_{n\to\infty}b_n=\infty$  B. $\lim_{n\to\infty}{a_n \over b_n}=?$ given that $\lim_{n\to\infty}a_n=0$ and $\lim_{n\to\infty}b_n=0$  C. $\lim_{n\to\infty}{a_n \over b_n}=?$ given that $\lim_{n\to\infty}a_n=\infty$ and $\lim_{n\to\infty}b_n= \infty$    These seem to be difficult situations I come across when I have to evaluate limits.   Some examples,    $\lim_{n\to\infty}n^a\sin(1/n^b)$ with $a,b&gt;1$   $\lim_{n\to\infty}{n^a\over \sin(1/n^b)}$ with $a,b&gt;1$   $\lim_{n\to\infty}{1/n^a\over \sin(1/n^b)}$ with $a,b&gt;1$   $\lim_{n\to\infty} nf(x_n)$ [where we only know that $\lim \ f(x_n) = 0]$    My first question is : Are the two situations  A and B  equivalent ? I feel that they are equivalent as $\lim_{n\to\infty}b_n=\infty \iff \lim_{n\to\infty}{1\over b_n}=0$, The problem is that I'm not sure if we can apply the product rule for limits to take the limit inside.  My second question is : What are some ways to solve such problems ? I only know that we can apply stolz- cesaro in some cases. What is the difference between building from source and using an install package? What is the solution to the Squirrel sequence of letters question? In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob] Using article published dates effects SEO? In my blog I publish articles with date below under it.  My questions are:   Using dates will have positive impact or negative impact? After few years of publishing the post, since my post age is old will it remain in same position of search results or it will go down? Finally, should I use published dates or not? "the better" vs "the best" of two players What are the advantages of stacking multiple LSTMs? What are the advantages, why would one use multiple LSTMs, stacked one side-by-side, in a deep-network? I am using a LSTM to represent a sequence of inputs as a single input. So once I have that single representation— why would I pass it through again?  I am asking this because I saw this in a natural-language generation program. Let us say I have added a PPA that has X package that I want but it also has Y package that I do not want to use or receive updates from. How can I, from the same PPA, receive updates for a specific package but deny updates from the same PPA for other packages.  A step by step example would be good since this has happened to me in several PPAs that have a particular package I want but also add a whole bunch of others that I do not yet want to update. What's the easiest way to unrar a file? I just realized I can't unrar .rar files on my Ubuntu machine!  What's the easiest way to accomplish this fundamental task? If possible I'd love something like 7Zip that I can just right Click, and extract and have the program worry about how to do it regardless if it's a .zip, a .rar or a .foo compressed file. I'm currently writing an import script/addon.  The file format is one vertex per line: x, y, z, u, v With 3 lines for each triangle (no quads).  So far I've got vertex's, edges and faces all importing correctly.  Now I just need to import the UV coordinates for each vertex.  However I'm having trouble trying to find a way to do this.  The best result so far was copying code from the UV operator template, which gave me a UV Map, but it puts the whole model at one point. Are PDO prepared statements sufficient to prevent SQL injection? Let's say I have code like this:  $dbh = new PDO("blahblah");  $stmt = $dbh-&gt;prepare('SELECT * FROM users where username = :username'); $stmt-&gt;execute( array(':username' =&gt; $_REQUEST['username']) );   The PDO documentation says:     The parameters to prepared statements don't need to be quoted; the driver handles it for you.   Is that truly all I need to do to avoid SQL injections?  Is it really that easy?  You can assume MySQL if it makes a difference.  Also, I'm really only curious about the use of prepared statements against SQL injection.  In this context, I don't care about XSS or other possible vulnerabilities. In the beginning of the series, it's mentioned that Muggle-born wizards/witches are identified due to inadvertent spell-casting. However, it seems like later in the book, disarmed wizards/witches are completely helpless.   What is the explanation for why some spells can be cast without a wand and is there an in-universe explanation for why this isn't done? Also, are there spells that can be cast non-verbally (with/without a wand)? Why can't the Others go around the Wall at sea? As explained in a  earlier , the Wall does not extend all the way to the sea on the East, and the castle there is essentially undefended anyway. Thus, wildlings -- and Stannis' army -- were able to go around it undetected.  We know that the Others and the wights they raise can't cross through the Wall, and I think we can assume that it's built to stand up to any attacks they make trying to bring it down. But there does not appear to be any reason they can't just go around like anyone else.  Possibly related: in the TV Show, we actually see the attempted evacuation of Hardhome, and the Night King allows Jon Snow and his human army and civilians to flee back to their boats to safety, even after raising a massive army of wights. You could interpret this as merely a psychological ploy, but it may be a hint that the dead can't cross the water either.  Has there been any indication (books or show) that the Others/White Walkers and their army of wights are blocked by open water, or are somehow tied to the land of the Frozen North, or that there's any other obstacle keeping them from just sailing/swimming around the Wall? Does the 90 days VWP rule expire if you travel from the US to Canada? I'm on a New Zealand passport.  From most US Embassy webpages:     The Visa Waiver Program (VWP) enables nationals of certain countries,   including Australia, New Zealand, and the U.K., to travel to the   United States for tourism or business for stays of 90 days or less   without obtaining a visa, if certain requirements are met. Under the   VWP, time spent in Canada, Mexico, and adjacent islands counts towards   the maximum of 90 days stay allowed under the program.   I'll be there on a 1-year working holiday visa starting when I arrive in Vancouver. I'm spending 3 days in Hawaii en route to Vancouver. This seems to imply that 90 days after landing in Hawaii, my time will be up and I won't be able to get back into the US, as my living in Canada will not reset the clock. What if after this time I want to say, pop across the border to Seattle? How can I restart the 90 days, without having to resort to say, flying to Japan and back just to reset it? How to disable system beep for non-privileged user How do I remove code duplication between similar const and non-const member functions? Let's say I have the following class X where I want to return access to an internal member:  class Z {     // details };  class X {     std::vector&lt;Z&gt; vecZ;  public:     Z&amp; Z(size_t index)     {         // massive amounts of code for validating index          Z&amp; ret = vecZ[index];          // even more code for determining that the Z instance         // at index is *exactly* the right sort of Z (a process         // which involves calculating leap years in which         // religious holidays fall on Tuesdays for         // the next thousand years or so)          return ret;     }     const Z&amp; Z(size_t index) const     {         // identical to non-const X::Z(), except printed in         // a lighter shade of gray since         // we're running low on toner by this point     } };   The two member functions X::Z() and X::Z() const have identical code inside the braces.  This is duplicate code and can cause maintenance problems for long functions with complex logic.    Is there a way to avoid this code duplication? Can I prevent others from editing my question? edited my question,  where I specifically said that our software sending back stacktrace to one of our servers was a user-known public feature.  He then modified the title of my post, along with the entire content, making it sound like I snuck in the feature and that our application was phoning home without our users knowing.    I specifically wrote in the original post that the feature was not sneaky. He completely changed the meaning of my post. I find this to be rather unacceptable.  A few questions:   Is it possible to prevent editing of my posts? How can I retaliate? Can I file a complaint?   Can people with  do anything they want on Stack Overflow? LINK : fatal error LNK1104: cannot open file 'D:\...\MyProj.exe' Prison problem: locking or unlocking every $n$th door for $ n=1,2,3,...$ View approximate number of users online Is there any way to view the number of users online at any given time (or even an approximation)?  This could be really useful to provide an indication of whether your question is likely to get answered any time soon.  It could also provide a bit of an indication for why your question is getting very low views - if there are only a few users online, then that could be the reason for little interest in a question, whereas if there are lots of users online and the question still doesn't garner many views, then maybe it needs to be rephrased or something.  I know that this can't be used definitively, but it could be used as a rough guide, and could also just be an item of interest.  Perhaps it could show the number of users that have been seen in the past 5 / 10 minutes? (Shouldn't be too hard, since each user page already shows the last time that they were seen).