I made a website which aims at simulating a trading market. There are a list of prices and corresponding volumes that people want to purchase. Users can purchase at any price any time. My website retrieves the prices and volumes from my database every 2 seconds (I have to update the user's browser frequently to allow them to see the current market). Users' database INSERT query can be sent any time if they purchase.  I used ajax to post or get data from my database (sometimes nested ajax calls). So, every 2 seconds, each user will send or retrieve data by using more than 20 database queries (in order to show a users the current prices and volumes). Also, I may have 200 users at a time.  I was not using VPS before, and I got banned because of using too much CPU resources on my host. Now, I've purchased VPS*2 from a hosting servers. I have:  CPU Speed: 2000 Mhz  Memory: 2048 MB  Disk Space: 20000 MB  Bandwidth: 2000 GB  Connection: 40 Mb/s  Dedicated IP's 2 IP's  Is this enough for my 200 users? Also, which VPS OS is suitable for me?  Thank you.
This is a  about capacity planning for web sites. Related:      What are some recommended tools and methods of capacity planning for web sites and web-applications? Please feel free to describe different tools and techniques for different web-servers, frameworks, etc., as well as best-practices that apply to web servers in general.
Check if this proof about real numbers with an irrational product is correct. Can anyone confirm if my proof is correct, please?  Claim:- “If $x$ and $y$ are real numbers and their product is irrational, then either $x$ or $y$ must be irrational.”  Proof:-   Assume that both $x$ and $y$ are rational. Now, let $x = \dfrac pq$ and $y = \dfrac mn$ since both of them are rational. $xy =\dfrac pq * \dfrac mn = \dfrac{pm}{qn}$ Thus, if the product $xy$ can be written as a fraction, it's not a irrational number. Therefore if one of $x$ and $y$ is not irrational, then the product is not irrational.  By the principle of proof by contraposition, If $x$ and $y$ are real numbers and their product is irrational, then either $x$ or $y$ must be irrational. How many times can American Tourist re-enter UK in same 6 month period? Saving Mathematica kernel state? Looking for a short story about an artist and a forger Back in the late 1970s to early 1980s, I read a short story about an artist and a forger.  Between the two of them, they managed to start a revolution that brought down a corrupt dictatorship.  It was science fiction:   The dictatorship was interplanetary, maybe interstellar.   The artist used some kind of advanced technology to make his art works.   Plot:  The artist is one of the best (if not the best) at what he does.  The dictator wants the artist to make what amounts to a family portrait in whatever medium it is he works in.  Think of it like painting - you create the image manually (not a photograph) but it is much more than just a flat image.    The artist doesn't like the dictator - maybe on general principles, maybe because he knows the dictator personally - and refuses to make the "portrait."  The dictator has the artist arrested, and will only let the artist free again if he makes the portrait.  The artists makes the portrait.  He does the work while in the prison or jail.  That's where the forger comes into things. The forger is also in jail for something or other.  The forger makes copies of art works.  He of course recognizes the artist, and knows what the artist works with.  The forger can somehow see what the artist is working on.  The artist finishes the portrait.  At first the dictator is thrilled.  It looks exactly the way he wanted it.  As time goes by, though, the people looking at the picture see that it represents the vileness and corruption of the dictator.  The more you look at it, the more of the evilness of the dictator you see in it.  That is the genius of the artist, and whatever medium he is using.  Once you notice the hidden levels of the portrait, you can't unsee them and you see more and more of it as you look.  I think the effect carries over into reality as well.  Once you've seen the dictator's corruption in the portrait you also begin to see it in the dictator and his works as well.  This of course seriously pisses off the dictator, who has the artist killed and the portrait destroyed.  While in prison, the forger watched as the artist created his masterpiece, and recognized it for the subversive thing it is.  He also recognized it as the ultimate rebellion from the artist - the artist knows what will be seen, and that he will be killed for it.  All of that inspires the forger to do something more meaningful with his life than make forgeries for the money.  The forger is released from prison.  He saw the completed portrait, and knows how it was made.  He begins making forgeries of the portrait - like, hundreds if not thousands of them.  These are distrubuted throughout the nation/empire.  The people realize what evil is controlling them once they see it in the copies of the portrait, and eventually a revolution rises and brings down the dictatorship.  It was probably older than the 1970s.  I expect earlier than 1960.  Any ideas? Sophomore's dream: $\int_0^{1} x^{-x} \; dx = \sum_{n=1}^\infty n^{-n}$ In the solution of the so-called , one of the key steps is to compute $$\int_0^1 x^n (\log x)^n~\mathrm dx$$ using the change of variables $x = \exp\left(-\frac{u}{n+1}\right)$ to obtain the Gamma function.  This substitution to me, looks like it was pulled out of thin air. Can someone help me motivate it? How would I have thought of this substitution? Given the following problem     Let $U$ and $V$ be finite dimensional vector spaces, such that $\dim(U) = \dim(V)$. Prove that $U$ and $V$ are isomorphic.   I was just wondering if somebody could critique and validate my proof.  Proof  Two vector spaces $U$ and $V$ are isomorphic if and only if there exists a bijection $\phi: U \to V$. That is, an invertible linear map between the two. Let $\dim(U) = \dim(V) = n$ and let $\left\{u_1, \dots, u_n\right\}$ and $\left\{v_1, \dots, v_n\right\}$ be bases for $U$ and $V$, respectively. It follows that any vector $u \in U$ can be written as  $$ u = c_1u_1 + \cdots + c_nu_n $$  We define $\phi: U \to V$ as  $$ \phi(c_1u_1 + \cdots + c_nu_n) = c_1v_1 + \cdots + c_nv_n $$  Observe that $\phi$ is invertible. That is, given a vector  $$ v = d_1v_1 + \cdots + d_nv_n $$  in $V$, we define $\phi^{-1}: V \to U$ as  $$ \phi^{-1}(d_1v_1 + \cdots + d_nv_n) = d_1u_1 + \cdots + d_nu_n $$  Since there exists a bijection between $U$ and $V$, they are isomorphic. Is dimensionality reduction almost always useful for classification? So, I just finished off the first part of an important task for school and today when I was going to continue, the document with my notes were gone. The only fragment I've got left of my file is the back up file, which doesn't show in the folder where I saved the document, but I can search for it.  Is there anyway which allows me to open the back up file, save it as a text file and continue my task? I don't really have the time for running restoring tools, which never has helped me in a satisfactory way anyway.  I wrote the document in gedit and my version of Ubuntu is 12.10. In the following code I loop through a map and test if an element needs to be erased.  Is it safe to erase the element and keep iterating or do I need to collect the keys in another container and do a second loop to call the erase()?  map&lt;string, SerialdMsg::SerialFunction_t&gt;::iterator pm_it; for (pm_it = port_map.begin(); pm_it != port_map.end(); pm_it++) {     if (pm_it-&gt;second == delete_this_id) {         port_map.erase(pm_it-&gt;first);     } }   UPDATE: Of course, I then  which I didn't think would be related but answers my question. Is there any way to keep the URLs in the same form they are saved within the .bib files when using biblatex-chicago with Biber? For instance, the entry  @misc{RussianEmpire.1855,  author = {Russian Empire},  year = {1855},  title = {Treaty of Shimoda},  url = {https://ru.wikisource.org/wiki/Симодский_договор_с_Японией_(1855)}, }   results in the following output:    While there certain are benefits to converting the link itself, this sort of output in the footnote makes it both ugly and difficult to re-enter the link when reading a printed copy. How would one proceed about to receive the output along the lines of ""?  Minimal working example:  %!TEX program = xelatex \documentclass{article}  \usepackage{fontspec} \usepackage[russian,british]{babel} \newfontfamily\russianfont[Script=Cyrillic]{CMU Serif}  \usepackage[CJK, Cyrillics]{ucharclasses} \setTransitionsForCyrillics{\russianfont}{} \usepackage{csquotes} \usepackage[labeldate,backend=biber]{biblatex-chicago} \addbibresource{bibliography.bib} \usepackage[unicode,hidelinks]{hyperref}  \begin{filecontents}{bibliography.bib} @misc{RussianEmpire.1855,  author = {Russian Empire},  year = {1855},  title = {Treaty of Shimoda},  url = {https://ru.wikisource.org/wiki/Симодский_договор_с_Японией_(1855)}, } \end{filecontents}  \begin{document}  Cyrillics support test: Тест\\  \cite{RussianEmpire.1855}  \end{document}   Output: Every Artinian ring is isomorphic to a direct product of Artinian local rings Proposition. Let $R$ be commutative ring with $1_R$. We assume that $R$ is an Artinian ring and $M_1,\dots,M_n$ its maximal ideals. Then         $R/\mathrm{Jac}(R)\cong (R/M_1)\times \dotsb \times (R/M_n)$.   The ring $R$ is isomorphic to the direct product of a finite number of Artinian local rings.      Proof. 1. It's obvious that $M_i+M_j=R,\ \forall 1\leq i \neq j \leq n$. So, from Chinese Remainder Theorem, we have  $$R/\bigcap_{i=1}^{n}M_i = R/\mathrm{Jac}(R) \cong (R/M_1)\times \dotsb \times (R/M_n),$$ as we wanted.    Since $R$ is an Artinian ring, we have $\mathrm{Jac}(R)^m=\{0_R\}$, for some $m\in \Bbb Z^+$. But,  $$\{0_R\}\subseteq M_1^m\dotsb M_n^m=(M_1\dotsb M_n)^m\subseteq (\bigcap_{i=1}^{n}M_i=\mathrm{Jac}(R))^m=\{0_R\}.$$ So, if we apply CRT we will take  $$R\cong R/\{0_R\}\cong R/M_1^m\dotsb M_n^m\cong (R/M_1^m)\times \dots \times (R/M_n^m).$$   Questions.   1) Are these thoughts complete and correct?  2) Why $R/M_i^m$ are artinian local rings?  3) Could you please elaborate some examples as an application? Why does 1366x768 resolution exist? I know that there's  but it doesn't have any real answers despite having been viewed 12,400 times, and the fact that it's been closed. With that in mind...  Why in the world is 1366x768 resolution a real thing? It has an aspect ratio of 683:384, which is the weirdest thing I've ever heard of while living in a 16:9 world.   All screens and resolutions I've been familiar with have been 16:9 aspect ratio. My screen, 1920x1080, is 16:9. The 720p that I'm familiar with is 1280x720, also 16:9. 4K that I'm familiar with, 3840x2160, is also 16:9. Yet 1366x768 is 683:384, a seemingly wild break from the standard.  I know there are plenty of other resolutions all over the place, but 1366x768 seems to dominate most of the mid priced laptop world and also seems unique to the laptop world. Why don't laptops use 1280x720 or something else as a standard? How to format a USB drive? What should we do with old, very popular closed questions? Motivated by the deletion of     On one hand, I disagree with these closures, because:  These questions were (and still are) very popular They have some good information in them (or at least the first one does) and it feels like bad sportsmanship to remove good information from the internet, particularly when it was contributed by your fellow users  Number 2 in particular bothers me. A lot. On the other hand, I do agree that:  The community of 10k users should be able to decide which closed questions they wish to delete on their own without me intervening These questions should definitely remain closed, because they either have an absurd # of answers, or are duplicates (though some duplicates ). Which means they are eligible for deletion … forever. These questions wouldn't survive more than 10 minutes if asked today on Stack Overflow, so in some ways they are artifacts from the past, like dinosaurs in an era of mammals.  There is some related discussion in:   While I normally favor code solutions here, I am not sure I like the idea that once a question gets 400 upvotes it should become extremely difficult to delete. It feels like mob rule. Official policy on the blog: I have email addresses encoded with HTML character entities. Is there anything in .NET that can convert them to plain strings? $\operatorname{tr}(A)=\operatorname{tr}(A^{2})= \ldots = \operatorname{tr}(A^{n})=0$ implies $A$ is nilpotent How can I copy location info from geotagged phone images to images taken with my other camera around the same time? So i did quite a big trip recently, and took lots of pictures with my DSLR and occasionally Android phone. Only after coming back did i read about the whole GPX file, tracklog options in Lightroom. meaning i don't have such a tracklog file.  The android phone did geotag most photos it took. (at least, when it got a gps fix i guess)  So my question is, is there some software or way that will automatically copy the geotag from the android's photos to photos taken on the same time with my DSLR?  Or alternatively, generate a tracklog from the geotagged data in the android pictures? Credit cards: How is a cash advance different from a purchase? Why are the fees so high? How to install ns2 on Ubuntu parsing NSJSONReadingAllowFragments