how (122,224)


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


c# Filling a DataSet or DataTable from a LINQ query result set

How do you expose a LINQ query as an ASMX web service? Usually, from the business tier, I can return a typed DataSet or DataTable which can be serialized for transport over ASMX. How can I do the same…


performance What is the fastest way to get the value of π?

I'm looking for the fastest way to obtain the value of π, as a personal challenge. More specifically, I'm using ways that don't involve using#define constants like M_PI,or hard-coding the number in. T…


Throw an error in a MySQL trigger

If I have a trigger before the update on a table, how can I throw an error that prevents the update on that table?…



Check for changes to an SQL Server table?

How can I monitor an SQL Server database for changes to a table without using triggers or modifying the structure of the database in any way? My preferred programming environment is.NET and C#. I'd l…


Best way to allow plugins for a PHP application

I am starting a new web application in PHP and this time around I want to create something that people can extend by using a plugin interface. How does one go about writing 'hooks' into their code so…


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…


c# How do I get a distinct, ordered list of names from a DataTable using LINQ?

I have a DataTable with a Name column. I want to generate a collection of the unique names ordered alphabetically. The following query ignores the order by clause. var names=(from DataRow dr in…


eclipse Getting Subclipse in Aptana to work with the newest release of Subversion

The version of Subclipse(1.2.4) currently available through Aptana's automatic Plugins Manager does not work with the newest version of Subversion. I see on the Subclipse website however that they h…


flex SQLStatement.execute()-multiple queries in one statement

I've written a database generation script in SQL and want to execute it in my Adobe AIR application: Create Table tRole(roleID integer Primary Key,roleName varchar(40)); Create Table tFile…


.net Anatomy of a “Memory Leak”

In.NET perspective: What is a memory leak? How can you determine whether your application leaks? What are the effects? How can you prevent a memory leak? If your application has memory leak, does it…


java How would you access Object properties from within an object method?

What is the "purist" or "correct" way to access an object's properties from within an object method that is not a getter/setter method? I know that from outside of the object you should use a getter/s…




from example java get with android and file not using