find (19,456)


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

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…


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


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


Decoding T-SQL CAST in C#/VB.NET

Recently our site has been deluged with the resurgence of the Asprox botnet SQL injection attack. Without going into details, the attack attempts to execute SQL code by encoding the T-SQL commands in…


SQL Server 2005 implementation of MySQL REPLACE INTO?

MySQL has this incredibly useful yet properitary REPLACE INTO SQL Command. Can this easily be emulated in SQL Server 2005? Starting a new Transaction, doing a Select() and then either UPDATE or INSERT…


Using 'in' to match an attribute of Python objects in an array

I don't remember whether I was dreaming or not but I seem to recall there being a function which allowed something like, foo in iter_attr(array of python objects, attribute name) I've looked over the…


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…


How to get the Country according to a certain IP?

Does anyone know of a simple way to retrieve the country for a given IP Address? Preferably in ISO_3166-1 format?…


How do I delete a file which is locked by another process in C#?

I'm looking for a way to delete a file which is locked by another process using C#. I suspect the method must be able to find which process is locking the file(perhaps by tracking the handles, althoug…



How do I calculate these statistics?

I'm writing an app to help facilitate some research, and part of this involves doing some statistical calculations. Right now, the researchers are using a program called SPSS. Part of the output that…




how get from not the and python with java all