two (11,150)


How do I calculate someone's age in C#?

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?…


Multiple submit buttons in an HTML form

Let's say you create a Wizard in an HTML form. One button goes back, and one goes forward. Since the back button appears first in the markup when you press Enter it will use that button to submit the…


sql Swap unique indexed column values in database

I have a database table and one of the fields(not the primary key) is having a unique index on it. Now I want to swap values under this column for two rows. How could this be done? Two hacks I know…


algorithm Efficiently get sorted sums of a sorted list

You have an ascending list of numbers, what is the most efficient algorithm you can think of to get the ascending list of sums of every two numbers in that list. Duplicates in the resulting list are…


sql server Editing database records by multiple users

I have designed database tables(normalised, on an MS SQL server) and created a standalone windows front end for an application that will be used by a handful of users to add and edit information. We…


Regex: To pull out a sub-string between two tags in a string

I have a file in the following format: Data Data Data[Start] Data I want[End] Data I'd like to grab the Data I want from between the[Start] and[End] tags using a Regex. Can anyone show me how th…


Mapping values from two array in Ruby

I'm wondering if there's a way to do what I can do below with Python, in Ruby: sum=reduce(lambda x, y: x+y, map(lambda x, y: x*y, weights, data)) I have two arrays of equal sizes with the weigh…



Passing multidimensional arrays as function arguments in C

In C can I pass a multidimensional array to a function as a single argument when I don't know what the dimensions of the array are going to be ? In addition my multidimensional array may contain types…


c# DataTable Loop Performance Comparison

Which of the following has the best performance? I have seen method two implemented in JavaScript with huge performance gains, however, I was unable to measure any gain in C# and was wondering if the…


javascript Wrapping lists into columns

I'm using ColdFusion to populate a template that includes HTML lists(<ul>'s). Most of these aren't that long, but a few have ridiculously long lengths and could really stand to be in 2-3 columns. Is…




how multiple between with and java from compare example one