first (6,870)


Paging a collection with LINQ

Paging a collection with LINQ

How do you page through a collection in LINQ given that you have a startIndex and a count ?…


unit testing - How to use combinations of sets as test data

I would like to test a function with a tuple from a set of fringe cases and normal values. For example, while testing a function which returns true whenever given three lengths that form a valid tria…


performance - Most efficient code for the first 10000 prime numbers?

I want to print the first 10000 prime numbers. Can anyone give me the most efficient code for this? Clarifications: It does not matter if your code is inefficient for n>10000. The size of the code doe…


Format string to title case

How do I format a string to title case?…



asp.net - Are Multiple DataContext classes ever appropriate?

In order to fully use LinqToSql in an ASP.net 3.5 application, it is necessary to create DataContext classes(which is usually done using the designer in VS 2008). From the UI perspective, the DataCo…


regex - What are good regular expressions?

I have worked for 5 years mainly in java desktop applications accessing Oracle databases and I have never used regular expressions. Now I enter Stack Overflow and I see a lot of questions about them;…


How big would such a database be?

I'm trying to figure out how big a certain database would be(it hasn't been created yet). I know how many rows and what the tables will be. Is there a feature in Oracle that will tell me the size of…


.net - Update database schema in Entity Framework

I installed VS SP1 and played around with Entity Framework. I created a schema from an existing database and tried some basic operations. Most of it went well, except the database schema update. I ch…


How to create a C++ Boost undirected graph and traverse it in depth first search(DFS) order?

How to create a C++ Boost undirected graph and traverse it in depth first search(DFS) order?…


How do I do a string replacement in a PowerShell function?

How do I convert function input parameters to the right type? I want to return a string that has part of the URL passed into it removed. This works, but it uses a hard-coded string: function CleanUrl…




how from get string and entity framework with the last