On creating a class object with 'new' keyword,why is an object heap created instead of stack?Would stack not be a better option since it is faster,performs contiguous allocation and does not need manual deletion(free/delete)? If objects of a particular class have the same template then why do we need dynamic allocation?(justification for heap) [×××Please note that my doubt is not about which option a programmer must choose,but instead about why the compiler behaves the way it does in the above case.×××]
Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster?
How do I show that the equation $x^3+10x^2-100x+1729$$=0$ has at least one complex root $a$ such that $|a|$$&gt;$$12$. Upper bound for norm of Hilbert space operator It is a standard result that for a bounded self-adjoint operator $T$ on a complex Hilbert space $H$, we have $\|T\|=\sup_{\|x\|=1}|\langle Tx,x\rangle|:=M(T)$, where $M(T)$ is called the  of $T$. It seems that for any bounded operator on $H$, we have $||T||\leq 2M$. Why is that so? MySQL GUI Tools How does one change to engineering for graduate school after undergrad in a science field? I've always had an interest in electrical engineering (actually all engineering in general) and I've decided that I'd like to pursue a graduate degree.  I guess I'm wondering if I should really try to do this or just keep it as a fun hobby I spend all my free time doing.  So, the question is,  how does one change fields between undergrad and grad school?  A specific example follows, but please provide answers that address a more general case, so that your answers will be helpful to other people with the same general question.  I already have a BS and MS in chemistry with a minor in applied math.I published three papers during my MS, one first author in the top journal in my specialty and two as coauthor in an average and a so-so journal.  I hope those will count for something.  I finished my BS with around 3.1 and my MS with a 3.9 gpa.  I'm sure that my MS advisor would write me a great letter.  My GRE scores are too old to count so I'd have to retake it or try and get a pass on it since I already have a graduate degree.  Since finishing school I've been working for 4 years as a chemist.  I can get great recommendations from my supervisor who is a PhD chemist.      I've been working for a while to cover some of the things I would have learned in a BSEE to try and make up for my lack of one.  I worked through some texts on analog/digital design, lots and lots of programming, built a balancing robot that got a bit of internet attention, and I'm currently working on an autonomous robotics project that's looking really good so far.  After that I have more project ideas than I have time or money for.    I want to apply for PhD programs (specifically in controls/robotics) but I'm worried that my application will get tossed right away because I don't have a BSEE.  Maybe I should just apply to MS programs? SEO preference: does a site with WWW rank better than without WWW? Got problem with installation. "No root file system is defined." I'm very new with Ubuntu and generally with linux. I saw ubuntu and it seems like this OS is really good and stable, and so I decided to install it alongside my windows 7 OS.  I have a few problems with the installation. Here is what I did:   I downloaded the 64bit version from Ubuntu official website, and burned it on a dvd. I set the boot sequence to first load from my CD-Rom. Ubuntu installation started, and I chose "Install Ubuntu" in the menu. (where there is also a "Try Ubuntu" option) I clicked forward until I got into the installation type screen    As you can see, the installation wont show my actual details about my hard drive! I have 1 hard drive with 750 GB - 80 GB - My main drive with windows 7 OS 600GB - All of my stuff 20GB Free space that I saved for Ubuntu But the installation wont show that! How to set date format when manually inserting date on excel, without changing regional settings? In my locale, date is inserted as dd/mm/yyyy or variations of that (including dd-mm-yy). I made an Excel form (in normal Excel file), already formatted to show date as dd/mm/yyyy, but when I typed "05/04/2015" it will be shown as "04/05/2015". I know this can be solved by changing the regional setting to my local setting, but I need to distribute this form to a lot of people with no knowledge of changing regional setting, and assuming no one can teach how to, hence my question :  Is there any way to input "05/04/2015" and be recognized as "5 April 2015", without having to change regional settings ?  Additional note: When I mean "4 May 15" (typed in 4/5/15), Excel will recognize this as "5 April 15" because Excel takes input as "mm/dd/yy" format. I need to change the default behavior of Excel to take as "dd/mm/yyyy" as this is the way the users will input.  If possible, the setting should also included/embedded on the file to allow end-users use the form without even changing setting.  I'm not familiar with macros and VBA, but willing to try those :)  EDIT : this is related to my question :   but I don't need to change the whole formula bar, as long as Excel recognize that I'm typing in dd/mm/yy format. Determinant of a matrix whose $(i,j)$th element is $|i-j|$? Question states: "Let $D_n$ denote the determinant of the $n$-by-$n$ matrix whose $(i,j)$th element (the element in the $i$th row and $j$th column) is the absolute value of the difference between $i$ and $j$. Show that $D_n = (-1)^{n-1}(n-1)2^{n-2}$."  It seems like that I can get a recurrence relation (especially the question was from a book chapter dealing with recursion). In trying to get a recurrence relation, here is what I have done so far:  (Let $R_k$ denote the $k$th row and let $(i,j)$ denote the element/spot of $i$th row and $j$th spot)  1) replace $R_1$ with $R_1-(R_2+R_{n-1})$ to get $R_1^*$  2) replace $R_1^*$ with $R_1^*+R_{n-2}$  3) If I am not mistaken, I should have $-2$ on $(1,1)$, $2$ on both $(1,n-1)$ and $(1,n)$, and all other element in the first row as $0$.  4) take out $2$ from the first row, and expand the determinant about the first row  5) I should have $D_n=2(-D_{n-1}+(-1)^n B_{n-1})$, where $B_{n-1}$ is the determinant of a not-easily-reducible mayrix whose last column consists of $n-1$ ones followed by one $-1$.  How should I go about from now on? Once I get a recurrence relation, it would be pretty easy to get the explicit formula for $D_n$ using induction.  P.S. This question apparently is a question taken from 1969 Putnam Competition Can one construct a non-measurable set without Axiom of choice? Is axiom of choice required to show the existence of non-measurable sets? Is there a Lebesgue non-measurable set that can be constructed without axiom of choice?  Related question on MO says it is consistent: I am in the last year of MSc. and would like to read string theory. I have the Zwiebach Book, but along with it what other advanced book can be followed, which can be a complimentary to Zwiebach. I would like a more mathematically rigorous book or lecture notes along with Zwiebach.   Specifically, mention whether the book discusses string theory   Rigorously? Intuitively?   What's the scope of the book? Does it cover the advanced materials, e.g. Matrix string theory, F-theory, string field theory, etc. Maybe even String Phenomenology? I have a multi-line equation that I want to have matching sized parentheses. The advice I read online was to use \left( equation \right. \\ left. rest-of-equation \right) . However, this syntax leaves first half of the equation unaware of what is in the second half. For example, if you include a square root term after the break, the second parenthesis will be larger than the opening parenthesis. When you are using the aligned environment to split a long equation this can look somewhat offputting.    Compare the top equation to the bottom one. The parentheses match in size for the bottom equation, but the left hand parentheses for the top one is  noticeably smaller.  Top Code:   \begin{aligned}[t]   \gamma_{\text{u}} + \frac{1}{108}   \left(57\gamma_{\text{er}} \right. &amp;+  38\gamma_{\text{se}}\\ &amp; {}\pm  \left.\sqrt{2601 \gamma_{\text{er}}^2 + 3648  \gamma_{\text{er}}\gamma_{\text{se}} + 1444 \gamma_{\text{se}}^2}  \right)   \end{aligned}   Bottom Code:  \begin{aligned}[t] \gamma_{\text{u}} + \frac{1}{16} \left(9\gamma_{\text{er}}  +  6\gamma_{\text{se}} \pm  \sqrt{49 \gamma_{\text{er}}^2 + 76 \gamma_{\text{er}}\gamma_{\text{se}} + 36 \gamma_{\text{se}}^2} \right) \end{aligned} How to redirect apache /var/www to the home directory and access all the directories and files in my home directory? I have installed Apache(LAMP) web server on my ubuntu machine and I want to do the above mentioned thing.I have tried creating symbolic links in the /var/www directory but it only shows files but not directories inside the directory linked.I want to redirect /var/www to my home folder so that I can access all the files and directories contained therein.Please help me. How to plot and solve the numerical solution of a integro-differential equation I want to give a client access to my server, but I want to limit those users to their home directories. I will bind-mount in any files I want them to be able to see.  I've created a user called bob and added him to a new group called sftponly. They have a home directory at /home/bob. I've changed their shell to /bin/false to stop SSH logins. Here is their /etc/passwd line:  bob:x:1001:1002::/home/bob:/bin/false   I've also changed the /etc/ssh/sshd_config to include the following:  Match Group sftponly         ChrootDirectory /home/%u         ForceCommand internal-sftp         AllowTcpForwarding no   When I try to log in as them, here's what I see   $ sftp bob@server bob@server's password:  Write failed: Broken pipe Couldn't read packet: Connection reset by peer   If I comment out the ChrootDirectory line I can SFTP in but then they have free rein over the server. I have found that ChrootDirectory /home works, but it still gives them access to any home directory. I have explicitly tried ChrootDirectory /home/bob but that doesn't work either.  What am I doing wrong? How can I limit bob to /home/bob/?  ----EDIT-----  Okay so I just had a look at /var/log/auth.log and saw this:  May  9 14:45:48 nj sshd[5074]: pam_unix(sshd:session): session opened for user bob by (uid=0) May  9 14:45:48 nj sshd[5091]: fatal: bad ownership or modes for chroot directory component "/home/bob/" May  9 14:45:48 nj sshd[5074]: pam_unix(sshd:session): session closed for user bob   I'm not entirely sure what's going on there,  but it suggests something is wrong with the user directory. Here is the ls -h /home output:  drwxr-xr-x 26 oli      oli      4096 2012-01-19 17:19 oli drwxr-xr-x  3 bob      bob      4096 2012-05-09 14:11 bob Can regular expressions be used to match nested patterns? Let $M$ be the space of all $m\times n$ matrices. And $C=\{X\in M|rank(X)\leq k\}$ where $k\leq \min\{m,n\}$. How to proof that C is a closed subset of M? Do I need an airport transit visa for Dublin, Ireland en route to the UK? I am Haitian, and traveling with a Haitian passport. I have to go to London with a work permit (tier 2 visa) on the 29th of July but I have 2 hour transit in Dublin.  Do I need a transit visa? Can I get it at the airport?  I also have a valid US visa. Why is $\Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}$? It seems as if no one has asked this here before, unless I don't know how to search.  The Gamma function is $$ \Gamma(\alpha)=\int_0^\infty x^{\alpha-1} e^{-x}\,dx. $$ Why is $$ \Gamma\left(\frac{1}{2}\right)=\sqrt{\pi}\text{ ?} $$ (I'll post my own answer, but I know there are many ways to show this, so post your own!) How can I draw annotated braces over and under math expressions? What LaTeX markup would one have to write to produce a result similar to the image below?    Please excuse my Paint-and-mouse drawing skills. :-) I am getting the following error frequently. (Example: when running zenity,firefox etc. commands / applications.)  Fontconfig warning: "/etc/fonts/conf.d/90-fonts-unfonts-core.conf", line 11: Having multiple values in &lt;test&gt; isn't supported and may not work as expected   Here is contents of file /etc/fonts/conf.d/90-fonts-unfonts-core.conf:  &lt;?xml version="1.0"?&gt; &lt;!DOCTYPE fontconfig SYSTEM "fonts.dtd"&gt; &lt;fontconfig&gt;     &lt;match target="font"&gt;         &lt;test name="family" qual="any"&gt;             &lt;string&gt;은 바탕&lt;/string&gt;&lt;string&gt;UnBatang&lt;/string&gt;                 &lt;string&gt;은 돋움&lt;/string&gt;&lt;string&gt;UnDotum&lt;/string&gt;                 &lt;string&gt;은 궁서&lt;/string&gt;&lt;string&gt;UnGungseo&lt;/string&gt;                 &lt;string&gt;은 필기&lt;/string&gt;&lt;string&gt;UnPilgi&lt;/string&gt;                 &lt;string&gt;은 그래픽&lt;/string&gt;&lt;string&gt;UnGraphic&lt;/string&gt;         &lt;/test&gt;          &lt;edit name="antialias" mode="assign" binding="strong"&gt;&lt;bool&gt;true&lt;/bool&gt;&lt;/edit&gt;         &lt;edit name="hinting"   mode="assign" binding="strong"&gt;&lt;bool&gt;false&lt;/bool&gt;&lt;/edit&gt;         &lt;edit name="autohint"  mode="assign" binding="strong"&gt;&lt;bool&gt;true&lt;/bool&gt;&lt;/edit&gt;         &lt;edit name="hintstyle" mode="assign" binding="strong"&gt;&lt;const&gt;hintslight&lt;/const&gt;&lt;/edit&gt;     &lt;/match&gt; &lt;/fontconfig&gt;   How to solve it?