How to calculate Birthday to Age
How do I calculate someone's age based on a DateTime type birthday?
I have recently upgraded SQL Server 2000 database to 2008 R2.    What I did was:   Shutdown SQL Server 2000 (express) service on old machine, Move datafiles (mydatabase.mdf and mydatabase.ldf) to new machine, Run SQL Server Management Studio 2008, Connect to local database engine, Attach datafiles to database. Change the compatibility level of database to SQL 2008 (100).     Question: What else should I do to make migration complete?  I want to:   use new features like checksumming and full recovery model, make this database to be exactly as it was created in SQL 2008 R2, make this database to be fully compatibile, correct and be perfect suited for new, SQL 2008 R2 database engine.     In other words: I just want to know how to correctly and completly convert old SQL 2000 database to new 2008 R2 database, be calm that everything is done right and be happy with all new features.    I'm asking this question, because I've found a lot of sites on the Internet that says so many different things that makes me confused: some say that it is required to rebuild indexes, another says to do other things... and now I know nothing so I want to hear experienced person opinion and clear, step-by-step instructions. I work for very small company, I'm on my own and I don't want to screw things up.    Sir, I'm really impressed with your answer, I wasn't expecting so much.    So some comments:   The database is now in production. As I said, it was upgraded using deattach-attach method as I desribed in first post and as described on MSDN:  It had to be done quickly, so I was forced to do it that way. Let's forget about how inappropriate could it was and focus on current situation. The users/persmission is not a problem here - there are only few and permissions are simple. The application which use database is compatibile with SQL 2000 till 2012 so this is not a problem either. The database file (MDF) isn't big - only about 1GB.     Few more questions:   You recommend to use backup/restore method, but I did as written above, so can I encounter any problems now? Everything worked without any problem. About checksumming and full recovery model: it wasn't available/enabled on SQL 2000, so I want to use them now. You said that the only thing I need to do is to enable those options in database properties? I've read somewhere, that it isn't enough and I should also rebuild indexes or something. I really don't know, I just asking. I'm prepairing to migrate this database to SQL 2012 - so first it was from SQL 2000 to 2008 R2, now it will be from 2008 R2 to 2012 (it was impossible to do this directly because of lack of support of SQL 2000 databases in SQL 2012). So I understand that I should follow your guide: backup it in 2008 R2 and restore in 2012, then do the rest of your tips, right? Please explain me the backup/restore method: Is it like a dump of database to SQL queries and then restoring it by executing a bunch of queries? Will this method by the way "defragment" my database? If not, how to defragment/optimize it manually? As we were using SQL 2000 Express for years (no management interface), we were doing backups simply by stopping engine and RAR the DATA directory. For now, as we are on SQL 2008, isn't this still better than using backup function in Management Studio? Full recovery mode with frequent Transaction log backups - Where is the Transaction log stored - is it the LDF file? How sould I backup it properly?     I know that my questions may sound silly, I'm not professional database admin, but I am the only person here who can do such "hard core" task like upgrading the database engine. I'm also sure that your knowleadge will help a lot to other people like me.  Thank you very much for your time and knowleadge, I really appreciate this. Please help me prove this. I'm not sure how to apply the parallelogram law to the norm. No space left on device -- but there is space I'm running an Ubuntu 12.04.1 server in a VMware virtualized environment that has a strange issue. Twice now, at seemingly random times, the machine has suddenly been unable to write to the root partition despite plenty of space seemingly available. I'm at a loss trying to figure out what's wrong.  "df -h" shows all mounted volumes with 40% or more free space. Both times this has happened, rebooting resolved it for a few minutes, and then it was back to saying "no space left on device." Restoring it from a snapshot seems to fix it for longer, but since this has now happened again, I'm not sure what to do with it.  If it helps, the machine is a network print server running CUPS 1.5.3 and Samba 3.6.3. How to remove the URL from the printing page? I want to remove the URL that gets printed on the bottom of the page.   like:  yomari.com/.../main.php?sen_n   How can it be omitted or prevent from getting printed?  To be more specific, is there any way I can prevent the page URL, date and the page title being printed along, while printing the web page? Prove that $p \in \mathbb{R}[x]$ can be represented as a sum of squares of polynomials from $\mathbb{R}[x]$ Is using passive voice "bad form"? How to monitor who is pinging me? Is there a way to know who is pinging my PC on my network? Is it possible to monitor all ICMP packets? How can I do that? How to shut down the computer safely by pressing the power button? So this is pretty simple: when I press the power button whilst the machine is on, it comes up with a menu (of which one of the options is to shutdown)  However, I just want it to just start shutting down once I press the power button without any further interaction!  How do I accomplish this? Compactness and axiomatisability Let $C$ be an axiomatisable class of structures for some given first-order signature, i.e. there is a set $T$ of sentences whose models are exactly the members of $C$.  Apparently it follows from the compactness theorem that: If $C$ contains arbitrarily large finite structures then it must contain an infinite structure.   Can someone explain this result? The compactness theorem tells me that $T$ has a model if each finite subset of $T$ has a model but I don't see how this relates to the size of structures in $C$. I've noticed that man pages and other documents formatted by Unix utilities often use double backticks `` followed by double single quotes '' to wrap quoted phrases instead of the double quote character ". Single quotes are similarly replaced. Why is this?  Here are a couple examples, from the man page for grep:   To find all occurrences of the pattern `.Pp' at the beginning of a line:         $ grep '^\.Pp' myfile   The apostrophes ensure the entire expression is evaluated by grep instead  of by the user's shell.  The caret `^' matches the null string at the  beginning of a line, and the `\' escapes the `.', which would otherwise match  any character.   The grep utility is compliant with the IEEE Std 1003.1-2008 (``POSIX.1'')  specification. A number of times I have asked a certain kind of ‘attractive nuisance’ question – that is, one in which I anticipate a certain kind of answer would be given that I already know I am going to find insufficient or entirely inadequate. Some examples:      A more abstract example would be asking ‘is it possible to do this 100% correctly’, where people itch to come up with hacks, workarounds and half-baked solutions of various degrees of robustness – while the point of the question is obtaining a fully correct and reliable solution.0 I try to be very explicit in the question body about what kinds of answers I am not interested in. And yet, every time I ask such a question, someone gives such an answer anyway, or an outright XY-type, i.e. frame-challenge answer – where in fact the framing of the question is exactly how I want it, and I don’t want it challenged. Since I have already said in the question body that such an answer would be inaqeduate, when I get one, I downvote it. I believe it’s only appropriate, but it tends not to be received very well – I get insulting comments and downvotes in retaliation. I realise that a proper answer would be much harder to come up with than an ‘obvious’ inadequate answer. I suspect that often a real answer should be negative: ‘there is no way to do that’ or ‘there is no way to answer that for sure’. Nevertheless, if that is the right answer, this is the one I want posted – I don’t want the Internet polluted with more tumbleweed of what is already well-known (and may even be subtly wrong), and I don’t want to give ‘A for effort’ upvotes. What is the most appropriate way to act in such a situation?  0 I am also reminded of when Gary Bernhardt  while trying to avoid reflexive ‘don’t use eval’ replies. Of course, expecting nuance from Twitter of all places is silly, but that’s beside the point. How do I concatenate const/literal strings in C? I'm working in C, and I have to concatenate a few things.  Right now I have this:  message = strcat("TEXT ", var);  message2 = strcat(strcat("TEXT ", foo), strcat(" TEXT ", bar));   Now if you have experience in C I'm sure you realize that this gives you a segmentation fault when you try to run it. So how do I work around that? strictly positive elements in $C^*$-algebra Let $A$ be a $C^*\text{-algebra}$ and $A_+$ denote the positive elements. An element $a\in A_+$ is called strictly positive if $\overline{aAa}=A$. Want to find the following:a)What are the strictly positive elements of $C_0(\Omega)$ where $\Omega$ is locally compact Hausdorff space, and $C_0(\Omega)$ is the space of continuous complex valued functions that vanishes at $\infty$.b)If $A$ is unital, then $a\in A_+$ is strictly positive iff $a$ is invertible.c)if $(e_n)$ is an approximate identity of $A$, then $a:=\sum_{n=}^{\infty}\frac{1}{2^n}e_n$is strictly positive.What I tried and know:a) I know that positive elements in this space are functions with positive images, and thus, strictly positive elements are functions with positive images and now real root. is this correct? and how can I show that the positive elements are these kind of functions.b) I figures out that if $a$ in invertible then $a$ is strictly positive, but no idea how to do the other direction.c)I did this but using another characterization of strictly positive elements but want to do it with this one, and I don't know how.Thank you for your help. Making a logic circuit with only NAND GATES? How can I speed up combat with a large number of enemies? I'm DMing for a campaign where the player characters will sometimes face small squads of creatures, most recently six ground troops and two archers helping out. In this setting, these creatures dominate the land the PCs are in and have an organised military, hence squads of enemies.  Combat tends to go quite slowly, however. Eight enemies and three players means the players spend a lot of time waiting between their turns!  Without reducing the number of enemies in the encounter, how can I speed up combat when the players are fighting many enemies? Are moving objects producing stronger gravity fields? If the strength of gravitational influence exerted by a body is derived from its mass and energy then is it true that a moving object which has some kinetic energy should also produce stronger gravitational pull than a static/slower one?  If that's correct then would it be also possible for an object moving fast enough to produce gravity so strong that it would collapse into a (fast moving) black hole? How to keep processes running after ending ssh session? Where is composition tab in QGIS Composer to change page size? I am trying to change the page size in the QGIS 3.0 Composer but I am not able to see the Composition tab.  I have right clicked an empty space in the toolbar but did not see anything about composition.  I am using Windows 7.  I tried looking at the QGIS docs but they are still in testing. Prove that free modules are projective I'm confused about the use of symbols $\vdash$ and  $ \models$. Reading the answers to  and  I see that:  the turnstile symbol $ \vdash $ denotes syntactic implication. Then $ S \vdash \psi$ means that $\psi$ can be derived from the formulae in $S$  the double turnstile $ \models $, denotes semantic implication. Then the notation $A \models B$ means simply that B is true in every model in which A is true.  So I understand that, e.g., $(ZFC+ A) \vdash B$ means that $A \Rightarrow B$ is a theorem in ZFC and, in this sense $\vdash$ is a mathematical symbol for a theorem. While $(ZFC+ A) \models B$ means that $ B$ is true in every model of ZFC in which $A$ is true, and, in this sense $\models$ is not a mathematical but a metamathematical symbol.  I understand correctly? And those are the only uses of the two symbols?