calculate (2,015)

How do I calculate someone's age in C#?
Given a DateTime representing a person's birthday, how do I calculate their age in years?…
algorithm - Big O, how do you calculate/approximate it?
Most people with a degree in CS will certainly know what Big O stands for.It helps us to measure how(in)efficient an algorithm really is and if you know in what category the problem you are trying to…
Date arithmetic in Unix shell scripts
I need to do date arithmetic in Unix shell scripts that I use to control the execution of third party programs. I'm using a function to increment a day and another to decrement: IncrementaDia(){ echo…
Came across this error today. Wondering if anyone can tell me what it means: Cannot sort a row of size 9522, which is greater than the allowable maximum of 8094. Is that 8094 bytes? Characters? F…
algorithm - Calculating Distance Between 2 Cities
How do you calculate the distance between 2 cities?…
algorithm - Calculate distance between two latitude-longitude points?(Haversine formula)
How do I calculate the distance between two points specified by latitude and longitude? For clarification, I'd like the distance in kilometers; the points use the WGS84 system and I'd like to understa…
c# - Is DateTime.Now the best way to measure a function's performance?
I need to find a bottleneck and need to accurately as possible measure time. Is the following code snippet the best way to measure the performance? DateTime startTime=DateTime.Now;// Some execution pr…
sql server - CPU utilization by database?
Is it possible to get a breakdown of CPU utilization by database? I'm ideally looking for a Task Manager type interface for SQL server, but instead of looking at the CPU utilization of each PID(like…
javascript - How do I get the(x, y) pixel coordinates of the caret in text boxes?
I am using jQuery and trying to find a cross browser way to get the pixel coordinates of the caret in<textarea>s and input boxes such that I can place an absolutely positioned div around this locatio…
What SQL-server function can I use to get the character or byte length of a nvarchar(max) column?
I have a column which is of type nvarchar(max). How do I find the length of the string(or the number of bytes) for the column for each row in the table?…