javascript; convert string to object
Safely turning a JSON string into an object
Let $n$ is a natural number. Prove that $$\left\lfloor\frac{n}{1}\right\rfloor+\left\lfloor\frac{n}{2}\right\rfloor+....+\left\lfloor\frac{n}{n}\right\rfloor+\left\lfloor{\sqrt{n}}\right\rfloor$$   is even.   I used induction and the inequality $$x-1&lt;\lfloor{x}\rfloor\le{x}$$ to prove it.  Is there any other, nicer way to do it? When & How often do 4e Monster powers recharge? How often should I roll power recharge rolls and at which point in the monster's turn do I re-roll them?  I'm trying to find the official definition of the recharge mechanic in the online compendium and I'm not seeing it there. How do I create a custom ringtone for my iPhone? Ex-dividend date: How long do I have to hold a stock in order to get the next dividend? I want to be a stockholder on record for a dividend. So lets assume I bought stock before the ex dividend date. Can I immediately sell the stock after the ex-dividend date to collect the dividend, or do I need to hold for a few weeks to collect the dividend?  Lets say the ex-dividend date is the 15th of the month. I buy stock on the 14th (I think this is soon enough to be a shareholder on record) and then I sell on the 15th. Do I get the dividend in my account when it is distributed?  Don't worry &ndash; I have a proprietary way of hedging the stock's post-dividend price adjustment, and it costs less than the actual dividend so all is well.  I just don't know what the shortest time I can hold a position is. I'd like to know the shortest theoretical time possible in order to get the dividend.  Insight appreciated. Should Suggested Edits change the technical content of a post? I have noticed a significant number of suggested edits that attempt to fix code, or change the original meaning of someone else's post.    Is this really a good idea?    I've been on StackOverflow awhile, and among the editors who have sufficient reputation to edit without approval, I've never seen anyone modify the technical content or meaning of someone else's post.   I would consider obvious syntax and spelling errors OK to change, but I have seen many suggested edits that change the meaning of the code that was posted, or add things to the code that have nothing to do with the original question. A good example of this would be adding parameters to a SQL command, when the question was not asking about SQL injection. How to select a good non-stick pan, price point wise? For every set $A$, the empty set is a subset of $A$. The empty set is a set. Therefore, the empty set has a cardinality $\geq 1\ldots$ How to encode the filename parameter of Content-Disposition header in HTTP? Web applications that want to force a resource to be downloaded rather than directly rendered in a Web browser issue a Content-Disposition header in the HTTP response of the form:  Content-Disposition: attachment; filename=FILENAME  The filename parameter can be used to suggest a name for the file into which the resource is downloaded by the browser.  (Content-Disposition), however, states in  (The Filename Parameter) that the file name can only use US-ASCII characters:     Current [RFC 2045] grammar restricts   parameter values (and hence   Content-Disposition filenames) to   US-ASCII.  We recognize the great   desirability of allowing arbitrary   character sets in filenames, but it is   beyond the scope of this document to   define the necessary mechanisms.   There is empirical evidence, nevertheless, that most popular Web browsers today seem to permit non-US-ASCII characters yet (for the lack of a standard) disagree on the encoding scheme and character set specification of the file name. Question is then, what are the various schemes and encodings employed by the popular browsers if the file name “naïvefile” (without quotes and where the third letter is U+00EF) needed to be encoded into the Content-Disposition header?  For the purpose of this question, popular browsers being:   Firefox  Internet Explorer  Safari Google Chrome  Opera Is GNOME Terminal a type of non-login shell? How do I tunnel and browse the server webpage on my laptop? I run a web app in one of my lab servers, and I have already setup X11 Forwarding on those machines. Other lab members can tunnel through SSH, and browse that web app on their local browser at home.  I can't. Last time I checked with them, there is almost nothing I need to do.  When I type 192.168.1.113/webapp I get nothing.   Any tips?  THanks.    I ended up using the second method :)  ssh -L 8080:&lt;server-ip-address&gt;:80 &lt;username&gt;@&lt;remote-addr&gt; -N How to search for questions and answers between two users? I am searching for the questions posted by me (user:139150) that were answered by another user.    His ID is: 55159    There does not seem to be any way to search for posts where both the users are involved. How was the baby born in the start? Newcommand + Stepcounter I'm trying to come up with a command which should increase a counter and return a string including the current value of the counter.  Have a look at the following minimal example:  \documentclass{article}  \newcounter{mycounter} \newcommand{\mystepFAILS}{\stepcounter{mycounter}foo\themycounter} \newcommand{\mystepWORKS}{foo\themycounter}  \begin{document}  \section{\mystepFAILS}  \section{\mystepWORKS}  \end{document}   Why does the command with \mystepFAILS throw an error? What is so special about \stepcounter? Any ideas? Does an unpublished document you upload to ResearchGate count as prior publication when submitting to a journal? On ResearchGate, if you upload something like a thesis, and then it says publish resources, does this mean the thesis becomes properly published in the sense of the usual requirements of journals that there be no prior publication of the submitted work?   I ask because I’m drafting thesis chapters into journal articles and did not choose to publish the thesis as a whole work in order to do so, so I want to make sure that by clicking publish resources I am not actually publishing the copy I’ve uploaded, I’m just making it publicly available? Does this mean it becomes published despite it not technically being a published work? (If so, I’ll just remove the copy I uploaded). How do I resize my partition in Ubuntu? I had Windows 8 installed on my system, which I screwed up, and now I run Ubuntu 12.04. While installing, Ubuntu used all the 461 GB of HDD space (one partition).   Now I want to make a new partition of maybe 100 GB or so, in order to install Windows 7 alongside Ubuntu (with a dual-boot). But I can't even get a partition done. I can't change the partition in GParted either - the option is disabled. Where's the BIOS on an Intel Mac? Prove that  $ n &lt; 2^{n}  $ for all natural numbers $n$.  I tried this with induction: Inequality clearly holds when $n=1$. Supposing that when $n=k$, $k&lt;2^{k}$. Considering $k+1 &lt;2^{k}+1$, but where do I go from here?  Any other methods maybe? Significance of the second focus in elliptical orbits Where does the idiom "beating around the bush" come from? Where does the idiom "beating around the bush" come from? Question statement is as in the title:     $\varphi:G\to H$ is a Lie Group Homomorphism, then $\ker \varphi$ has Lie algebra $\ker D_e \varphi$   Since $\varphi$ is a Lie group homomorphism, in particular it is continuous. As $H$ must be Hausdorff, every point set is closed, and hence $\{e\}$ is closed in $H$, which implies that $\ker\varphi = \varphi^{-1}(e)$ is closed as well.  So $N=\ker\varphi$ is an embedded Lie subgroup of $G$. Therefore, the inclusion $j:N\to G$ is a Lie Group homomorphism, and induces a Lie algebra homomorphism $D_e j :T_e N \to T_e G$. So I only need to show that $D_e j$ is in fact an isomorphism between $T_e N$ and $\ker D_e \varphi$.  But I'm stuck at this point. I know that for $X\in T_e N$, we have, for $f\in C^{\infty}(H)$,  $$ D_e\varphi (D_e j(X))(f)=D_e j (X)(f\circ \varphi)=X(f\circ \varphi\circ j)=0$$  So $D_ej(T_e N) \subset \ker D_e \varphi$.  At this point, I can either show inverse inclusion: that is, for every $X\in \ker D_e \varphi$, we can find $Y\in T_e N$ such that $D_e j (Y)=X$, or for all $f\in C^{\infty}(G)$, $Y(f\circ j)=X(f)$  Or I can somehow show that dimensions of the two spaces are the same.   But I can't proceed from here.  It'd be great if someone could help me