there (1,068)


Best algorithm to test if a linked list has a cycle

Best algorithm to test if a linked list has a cycle

What's the best(halting) algorithm for determining if a linked list has a cycle in it?[Edit] Analysis of asymptotic complexity for both time and space would be sweet so answers can be compared bette…


XmlSerializer changes in.NET 3.5 SP1

I've seen quite a few posts on changes in.NET 3.5 SP1, but stumbled into one that I've yet to see documentation for yesterday. I had code working just fine on my machine, from VS, msbuild command l…


bash - Quick ls command

I've got to get a directory listing that contains about 2 million files, but when I do an ls command on it nothing comes back. I've waited 3 hours. I've tried ls | tee directory.txt, but that seems t…


Using yield to iterate over a datareader might not close the connection?

Here is a sample code to retrieve data from a database using the yield keyword that I found in a few place while googling around:public IEnumerable<object> ExecuteSelect(string commandText){u…


How can I kill all sessions connecting to my oracle database?

I need to quickly(and forcibly) kill off all external sessions connecting to my oracle database without the supervision of and administrator. I don't want to just lock the database and let the users…



Graph Algorithm To Find All Connections Between Two Arbitrary Vertices

I am trying to determine the best time efficient algorithm to accomplish the task described below. I have a set of records. For this set of records I have connection data which indicates how pairs of…


c# - XmlSerializer-There was an error reflecting type

Using C#.NET 2.0, I have a composite data class that does have the[Serializable] attribute on it. I am creating an XMLSerializer class and passing that into the constructor: XmlSerializer serialize…


web services - Error Serializing String in WebService call

This morning I ran into an issue with returning back a text string as result from a Web Service call. the Error I was getting is below************** Exception Text************** System.ServiceModel…


Is there an Eclipse command to surround the current selection with parentheses?

Is there an Eclipse command to surround the current selection with parentheses? Creating a template is a decent workaround; it doesn't work with the "Surround With" functionality, because I want to p…


What are the best resources for design patterns and their uses?

When it comes to the use of design patterns, I am guessing there are three types of shops. Those who wouldn't know a pattern if it hit them in the face-these usually prefer the Ctrl-C/Ctrl-V appr…




the how not are error for with was and java