Here is a simple script to calculate date of birth from getdate or any set date. I've seen many answers to this calculation but all seem to have issues like rounding and such.  Do you see any issues with script below for age calculation?  DECLARE @DoB AS DATE = '1968-10-24' DECLARE @cDate AS DATE = CAST('2000-10-23' AS DATE) SELECT   --Get Year difference      DATEDIFF(YEAR,@DoB,@cDate) -      --Cases where year difference will be augmented     CASE          --If Date of Birth greater than date passed return 0         WHEN YEAR(@DoB) - YEAR(@cDate) &gt;= 0 THEN DATEDIFF(YEAR,@DoB,@cDate)          --If date of birth month less than date passed subtract one year         WHEN MONTH(@DoB) - MONTH(@cDate) &gt; 0 THEN 1           --If date of birth day less than date passed subtract one year         WHEN MONTH(@DoB) - MONTH(@cDate) = 0 AND DAY(@DoB) - DAY(@cDate) &gt; 0 THEN 1           --All cases passed subtract zero         ELSE 0     END
What would be the best way to calculate someone's age in years, months, and days in T-SQL (SQL Server 2000)?  The datediff function doesn't handle year boundaries well, plus getting the months and days separate will be a bear.  I know I can do it on the client side relatively easily, but I'd like to have it done in my .
If all motion is relative, how does light have a finite speed? I've often heard that Einstein shattered the notion of absolute motion (i.e. all things move relative to one another) and that he established the speed of light as being absolute. That sounds paradoxical to me; I cannot understand how the two concepts can be reconciled.  Before going further, I'd like to say: 1) Over the years, I've seen many layman's explanations on these topics (including the nice YouTube video by Vsauce, ). I understand everything that's said (or, at least, I think I do). Just nothing I've found seems to address this apparent contradiction. 2) More recently, I've tried to find the answer on my own. That includes searching the posts on this site. Some come close (), but nothing I've been able to find seems address specifically what I'm asking.  Back to the question: Relativity shows us that there is no universal frame of reference by which to judge motion, so object A might be reckoned as moving at 10&nbsp;m/s relative to object B or as stationary relative to object C. This is fine for me. I can grasp that the universe has no intrinsic coordinate system, that we only think that way on Earth because we have the ground to move over.  Then there's the speed of light (in a vacuum). The speed of light is the ultimate "speed limit," it's often said. But if there is no universal frame of reference, how can there be any such speed? The very idea only make sense if there is a universal frame.   If one object is moving (uniformly) at 60%&nbsp;c and another object is also moving at 60%&nbsp;c, but in the exact opposite direct, then from the perspective of either one (if they could still see each other) the other would appear to violate that speed limit. All these spacetime bending consequences used to explain why nothing can move past this speed only seems to enshrine the concept that there is some ultimate speed standard. If there is only relative speed, then the concept of light having a specific speed in the vacuum should be a nonsensical one since it having speed (x m/s) would only make sense when measured against some other body.   Since I was very young, it has always sounded to me like motion is only mostly relative, that until you get close to the speed of light, the effects of an absolute frame of reference are negligible. Perhaps that there is an actual fabric of space which everything moves relative to, which is why there is something to expand between galaxies (faster than light can propagate) in the metric expansion of space. Growing up, I always thought this would just start makes sense with time. Now I'm up to a first year (college) level in physics, I even know basic calculus, yet I'm still hopelessly confused.  EDIT:  Thank you to whoever suggested this may be a duplicate of . It and others are very much related and at least partially answer my question. Unfortunately, explaining that distances become shorter and time becomes slower as a way to stop you from exceeding the speed of light does not explain how that speed is not an absolute.  By my reckoning, if all speed is relative, then no matter how fast you go light should always race away from you at the same apparent speed. I.e. there should be no speed limit. For there to be a speed which you cannot exceed or you would catch up (and make time irrelevant) requires the very concept of some external speed by which light can travel and nothing else can reach - thus my logical paradox continues unabated. Why do neural networks need so many training examples to perform? A human child at age 2 needs around 5 instances of a car to be able to identify it with reasonable accuracy regardless of color, make, etc. When my son was 2, he was able to identify trams and trains, even though he had seen just a few. Since he was usually confusing one with each other, apparently his neural network was not trained enough, but still.  What is it that artificial neural networks are missing that prevent them from being able to learn way quicker? Is transfer learning an answer? Proving that two vector spaces of equal dimension are isomorphic 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. Seeking English term for relationship between two members of extended family? Is it possible to exit the airport without going through the customs? Removable singularities and an entire function Function $f(z)$ is an entire function such that $$|f(z)| \le |z^{n}|$$ for $z \in \mathbb{C}$ and some $n \in \mathbb{N}$.  Show that the singularities of the function $$\frac {f(z)}{z^{n}}$$ are removable. What can be implied about the function $f(z)$ if moreover $f(1) = i$? Draw a far-reaching conclusion.  My attempt: If the singularities of $\frac {f(z)}{z^{n}}$ are removable, it is entire (not sure, need help with the justification) and bounded, so constant from Liouville's theorem, the constant value of the funcion is $i$, hence $f(z)=iz^{n}$.   But what about the $n$ here, is it arbitrary? Could somebody help me prove the removability of the singularities and suggest if my attempt is going the right way? Geiger and Marsden's experiment led Rutherford to believe that the positive charge and most of the mass of the atom was concentrated in a small region. I understand what led him to conclude the way the positive charge is positioned in the atom. But how did he conclude that most of the mass was in a small region (the nucleus)?  How did the distribution of the mass matter after all? Given that the electric force is greater than the gravitational force by many magnitudes, the force between the positice charge and the electrons was predominantly electric.   So how did Rutherford conclude that most of the mass is in the nucleus? How do I access $HOME/storage Termux directory on Android Pie with a GUI File Explorer?  In Termux I print the working directory with pwd and it shows $HOME/storage as:  /data/data/com.termux/files/home   My internal storage looks like this:  . ├── Alarms ├── Android |   ├──data |   |  ├── ... |   |  ├── com.termux |   |  |   └── files |   |  |       └── 0 items |   |  └── ... |   └── ... ├── DCIM ├── Download └── ...   My external storage looks like this:  . ├── Android |   ├──data |   |  ├── ... |   |  ├── com.termux |   |  |   └── files |   |  |       └── 0 items |   |  └── ... |   └── ... └── LOST.DIR   Neither my internal storage, nor my sd card, contain a /data/ directory at the root level. Where is this /data/ directory? For that matter, where is the root /storage/ directory? Where is the root /emulated/ directory? Where are any of these directories and why cant I access any of them? Cannot Buy Land in Falkreath Is $\bar X$ a minimum variance unbiased estimator of $\theta$ in an exponential distribution? I proceeded by finding $\operatorname E(\bar X).$ I considered $\bar X$ as a constant and simply got the term itself. This should suggest that $\bar X$ is not an unbiased estimator of $\theta$. That's obvious too cuz it's a constant(from what I assumed). However, I'm also aware that $\mu = \theta$ so that's probably not right.  I have to demonstrate first that $\bar X$ is an unbiased estimator of $\mu$. Terminal command 'login' fails with error message Coming from Mac OS X, there is a possibility for every ordinary user to open Terminal and type in 'login' to change to a different user account.  When I do this with Ubuntu, it provides the following error message:  login: Cannot possibly work without effective root   Is there any way to remedy this?  Which file do I need to edit and with what to enable the use of this command (even for a standard user)? How to prove $\sqrt{x + y} \le \sqrt{x} + \sqrt{y}$? How do I prove $\sqrt{x + y} \le \sqrt{x} + \sqrt{y}$? for $x, y$ positive?  This should be easy, but I'm not seeing how.  A hint would be appreciated. How to revert to GNOME Classic Desktop? I'm used to GNOME Classic and personally don't want to change to anything else, but it seems there is no more GNOME Classic in the Oneiric release. After apt-get installed gnome-session and all, though there comes back the GNOME Classic option in the session listbox, however, after logged in, it seems not the expected one.  There is no System menu in the top bar, and I couldn't customize panels at all. I want to change the appearance(theme), but I can't find Appearance menu at all. And much more differences to my previous experience of GNOME classic shell.    There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below:    and up      &amp; Radiation– white vs black house, hot or cool? Height/Radius ratio for maximum volume cylinder of given surface area Determining direction of longest segment of polygon using ArcGIS Desktop? I have a shapefile with 9000 agriculture fields and what I like to do is to determine for each field (=each polygon) the direction of the longest segment.  For instance, the selected polygon in the screenshot has its longest segment from west to east so I would like to mark give the polygon the attribute W (for west) or either E (for east).   Is there any solution to solve my problem in a fast but generalized way?   I do not need very detailed results. It's just for the interpretation of a question.   I'm seeking an answer using ArcGIS 10.2 for Desktop.  To be more precise on what I'm looking for I try to explain more practical: I'm doing winderosion analysis for a specific area with 9000 fields. As result I have a potential susceptibility for each field. I like to check, if the fields with high susceptibility are correlated to a certain orientation of the fields, e.g. check if most of the fields with high risk are oriented in the main winddirection or not.   The search for the longest segment is not really important for me. It was just an idea I had to determine the direction. So forget about the longest segment if there is a way to determine the direction with another method ;) What is the relation between the Higgs field and chirality? Wikipedia  that the spontaneous breaking of chiral symmetry "is responsible for the bulk of the mass (over 99%) of the nucleons".  How do the nucleons gain mass from the spontaneous breaking of chiral symmetry? Why don't leptons gains mass from it? What is the role of the Higgs field in this all? "Where" in careers' search seems to be broken Let's say I want to find a company in Ontario, Canada. Ok, I navigate to company pages and type ON, Canada to Where in search:        but there are no companies in there. So why if I type just Canada it finds companies in ontario; and if I type specific area (ON, CA)  it doesn't find anything ? I am using Ubuntu 16.04, with Gnome 3.18. Using extensions I have gotten rid of the dash panel and only use the Applications Menu in the upper left-hand corner of the screen. (I don't have Unity.) What I can't figure out is how do you add a new program, move software around to different categories, and create new categories?  Also, any keyboard shortcut to access the Applications Menu? How many $6$-integer subsets of $\{1, 2, 3, \ldots, 20\}$ have no consecutive integers?